Twitter’s Realtime Streaming APIs
Twitter has a lot of data. Every second, amazing numbers of tweets are created by users and sent to Twitter. Users are constantly reporting everything from their latest meal to firsthand accounts of airplanes landing in the Hudson River. Almost as frequently, and with almost as many different purposes, applications repeatedly ping Twitter's APIs and web browsers pound their servers in hopes of grabbing the latest content.
For a long while, Twitter has offered up fairly complete but also standard API functions to developers wanting to grab the Twitter feed. For example, if a developer wanted to get some tweets from the public timeline, she would make a request to the public timeline API, which would return 20 or so of the latest tweets. Recently, though, Twitter has started providing streaming APIs to developers. So instead of grabbing 20 updates per request, the developer can make one web request and just leave it open. Instead of sending out a set number of updates, Twitter will keep sending them until the developer closes the connection.
Twitter offers several different streaming methods for several different purposes. Each of these methods requires a certain level of access by the user. The basic methods can be used by anyone, but if you want the totally full feed, you’re going to have to talk directly with Twitter to set that up. For us, though, there’s plenty of data to work with. The different streaming API methods are listed next.
statuses/filter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access