2
votes

I am working on a project which requires getting tweet and user information from twitter. I can't even test the current system because I keep hitting twitter rate limit. Is there any way around it?

Basic information that I am looking to extract from each status is:

  • Status text
  • User follower count
  • User following count
  • Retweet count
  • Geo location co-ordinates

I am using Twitter4J API to do this. Any help will be appreciated. Thanks in advance.
EDIT
I am using twitter's search API to get list of tweets.

1
I am not voting to close, but questions about online services are not programming question even if the web services are accessed through an API.Pascal Cuoq
This question appears to be off-topic because it belongs to Twitter customer service.Geobits
I don't have a problem with the question. There are specific programming techniques you can use to maximize rate limits when working with Twitter. Being able to change your code to optimize rate-limit improves application capability and scalability. Coding to on-line service APIs are becoming increasingly popular and require a technical body of knowledge for working with them effectively.Joe Mayo

1 Answers

7
votes

One option is to use a Twitter Data Reseller (e.g. GNIP) who can sell tweets.

Another option is to maximize your use of the API. Here are some tips:

  1. Check Rate Limit Status for each API you're use to make sure you don't go over and when the rate limit resets (currently every 15 minutes).
  2. Look at the parameters to make sure you request a count of the maximum number of tweets for that API. e.g. a count can default to 20, but you can set it to 200, depending availability and limits on the specific endpoint. This potentially reduces the number of queries you have to make.
  3. Page your results according to the Twitter's Working with Timelines guidance. Use SinceID and MaxID to make sure you're only requesting new tweets. This could reduce requests by reducing the number of tweets you need (through increasing the opportunity to stay within max count) and reducing the number of requests by avoiding queries for tweets you already have.
  4. Essentially, you want to examine endpoint parameters with a perspective for how to decrease bandwidth and reduce the number of queries you have to make.