This project has moved and is read-only. For the latest updates, please go here.

Rate Limits and Hits per Query

Aug 29, 2011 at 3:35 AM

With a Rate Limit of 350 hits/hour, checking my Home feed once every 60 seconds should be more than easily afforded.

However, I'm finding that one Query uses about 4-8 hits. Why is this? 

Usually I'm not hitting the limit, but now that I'm trying to grab user info for users mentioned in tweets it's maxing my Rate Limit very quickly.

Two questions: How can I lower the amount of hits per query to get my Home statuses without decreasing the interval? Is there a way I can grab user info (ProfileImageUrl, FollowersCount, etc) for users mentioned in tweets (Not the tweet author/retweeter/etc) without making more queries?


This is the Query I'm using to grab my Home feed that's causing 4-8 hits per.

var twitterCtx = new TwitterContext(auth);
home_tweets = from tweet in twitterCtx.Status
              where tweet.Type == StatusType.Home
              select tweet;

Aug 29, 2011 at 4:50 AM


Besides the guidance on, I don't have any definitive answer as to why you're seeing rate limits that low.  You might try different combinations of parameters, as shown in the Home Status docs.  In particular, setting count to 200 (the max), keeping track of the last ID used and also using SinceID might reduce some duplication and allow you to make less queries.


Aug 31, 2011 at 4:38 AM

Thanks for the advice on SinceID.

Tried using limits such as tweet.Count == 100 etc, but I found that by using tweet.Page == 1 cut the hits down a lot when grabbing uncached statuses from Home.

After caching locally, using SinceID, and using Page I'm only using about 150 callls/hour checking every 60 seconds.


According to public access has 150 calls/hour and OAuth access has 350 calls/hour. 

I thought my limit of 350 was what everyone was limited by.  I'm authenticating with SignInAuthorizer, is there another method that may not incur rate limits?

Aug 31, 2011 at 2:33 PM

I'm not sure if there's a definitive answer on exactly what the rate limits are in each situation.  I recall seeing somewhere that the rate limits can vary, allowing Twitter to scale better with high traffic and surges.  Another option is to check out the streaming APIs.  Right now, the L2T UserStreams seem to be working okay.  Twitter has SiteStreams in beta and L2T supports that too, but I have reports from people who have seen problems with SiteStreams but not with UserStreams.