node-tweet-stream 0,0 npm

Node twitter module to hook into the public filter streaming, seamlessly updating the tracking keywords.

3 years after

Node Tweet Stream

node-tweet-stream is node twitter module that connects to the public twitter stream. It does not provide endpoints to the REST API. There are other fine node modules that provide this functionality. It doesn't connect to twitter's user streams, since they are useless unless you're writing a mobile app. It also doesn't allow you to connect to site streams, since you probably don't have access to that anyway.

It does provide a nice API for working with public streams, allowing you to track and untrack a list of keywords, updating the public stream behind the scenes.


npm install node-tweet-stream


This code will probably be used at an application level, not a user level because of the twitter API restriction. That said, you need to grab a twitter access token key and secret, because the streaming API doesn't support bearer tokens. This is a limitation of twitter, not this project. If twitter provides bearer token access to their streaming API, we can improve this.

var Twitter = require('node-tweet-stream')
  , t = new Twitter({
    consumer_key: '',
    consumer_secret: '',
    token: '',
    token_secret: ''

t.on('tweet', function (tweet) {
  console.log('tweet received', tweet)

t.on('error', function (err) {
  console.log('Oh no')


// 5 minutes later

// 10 minutes later

Watch yourself when updating your tracking keywords. Twitter has guidelines for connection rate limiting.

Backoff strategy ripped from

License: MIT

Related Repositories



Twitter API client library for node.js ...



The official low-level client for Node.js and the browser. ...



twitter bot microframework on top of node.js ...



Connect to Twitter's Streaming API via Node.js Streams (using EventStreams) ...



A Node, Express and Angular responsive webapp which generates a real-time heatma ...

Top Contributors

nathanbowser robturtle ajwhite rauchg djelic alegrm MichMich nkzawa MethodGrab aboutvale


package version
event-stream ~3.1.0
request ^2.55.0
split ^0.3.0
dev mocha ~1.17.1
nock ~0.27.2


-   v2.0.1 zip tar
-   v2.0.0 zip tar
-   v1.10.0 zip tar
-   v1.9.1 zip tar
-   v1.9.0 zip tar
-   v1.8.3 zip tar
-   v1.8.2 zip tar
-   v1.8.1 zip tar
-   v1.8.0 zip tar
-   v1.7.0 zip tar
-   v1.6.0 zip tar
-   v1.5.1 zip tar
-   v1.5.0 zip tar
-   v1.4.2 zip tar
-   v1.4.1 zip tar
-   v1.4.0 zip tar
-   v1.3.2 zip tar
-   v1.3.1 zip tar
-   v1.3.0 zip tar
-   v1.2.2 zip tar
-   v1.2.1 zip tar
-   v1.2.0 zip tar