Twitter has multiple streaming APIs that allow tweets to flow into thousands of different integrations and channels.  Their streaming APIs give developers low latency access to Twitter’s global stream of Tweet data. A streaming client will be pushed messages indicating Tweets and other events have occurred, without any of the overhead associated with polling a REST endpoint.   On the contrary, Twitter’s Search API allows you to poll data from tweets that have already happened. On the other hand, Twitter’s Streaming API is a push of data as tweets happen in near real-time. With Twitter’s Streaming API, users register a set of criteria and as tweets match the criteria, they are pushed directly to the user.

From Twitter’s docs, the streaming process gets the input Tweets and performs any parsing, filtering, and/or aggregation needed before storing the result to a data store. The HTTP handling process queries the data store for results in response to user requests. While this model is more complex than the first example, the benefits from having a realtime stream of Tweet data make the integration worthwhile for many types of apps.

Resources

Twitter Dev Streaming API

Twitter Stream API NPM Client  – A streaming Twitter Stream API client with extended exposure of the underlaying protocol events. It does also fully adhere to Twitters different reconnect rules.

Text Mining Using Twitter Streaming API – “Text mining is the application of natural language processing techniques and analytical methods to text data in order to derive relevant information. Text mining is getting a lot attention these last years, due to an exponential increase in digital text data from web pages, google’s projects such as google books and google ngram, and social media services such as Twitter. Twitter data constitutes a rich source that can be used for capturing information about any topic imaginable. This data can be used in different use cases such as finding trends related to a specific keyword, measuring brand sentiment, and gathering feedback about new products and services.  In this tutorial, I will use Twitter data to compare the popularity of 3 programming languages: Python, Javascript and Ruby, and to retrieve links to programming tutorials. In the first paragraph, I will explaing how to connect to Twitter Streaming API and how to get the data. In the second paragraph, I will explain how to structure the data for analysis, and in the last paragraph, I will explain how to filter the data and extract links from tweets.”

Tweet Stream – A simple EventMachine-based library for consuming Twitter’s Streaming API.

Twitter Java HTTP Client – A Java HTTP client for consuming Twitter’s Streaming API