Rate limit -- Streaming or REST API


#1

So I’m very new in this using twitter API thing. So my condition is like this. I have a huge number of tweet ids (approximately about hundred thousands)

And I’m creating an android application that retrieve those ids and display the actual tweets on the screen. I’m not going to display a lot, maybe only 100 per query.

Right now I’m using twitter4j library and REST API to get those actual tweets. And I’m keep getting rate limit exceed error. So I begin to find any other alternatives to resolve this.

So if I use Streaming API, there’s no rate limit is it? And if I use streaming API, can I get the actual tweet if the id is given to me? If yes, can I use twitter4j library to do that?

Thanks


#2

Hello Bintang,

The REST and Streaming APIs serve different purpose. The Streaming APIs, in particular the [node:10389] endpoint, will allow your to track Tweets in real-time matching different criteria, but not to look for Tweets which were sent in the past.

The REST API is likely what you need here. It allows you to search in past Tweets and perform actions on Twitter. You can indeed get 100 Tweets per call on most endpoints. You may be interested in this endpoint that we launched recently: [node:27398]. It enables you to retrieve Tweet objects from a list of Tweet IDs, and as documented on the limits page, you can do up to 60 calls (user auth) or 180 calls (app auth) every 15 minutes: https://dev.twitter.com/docs/rate-limiting/1.1/limits.

Let us know if we can help further.


#3

Hmm okay, I’ve check this link https://dev.twitter.com/docs/api/1.1/get/statuses/lookup and I have another question. Is there a way to use that link in my android app without using twitter4j library? Because I’ve searched every where and I couldn’t find it