Hi Umashankar,

If you receive a 420 error you should follow the back off strategy I
mentioned to Zaver. We don't discuss how Seach handles it's rate limiting,
just approaches on what to do if you fine yourself rate limited.

Best,
@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris


On Tue, Feb 22, 2011 at 11:19 PM, Umashankar Das <umashankar...@gmail.com>wrote:

> Hi Matt,
>      Do the failed requests count [one's with 420 response] into the tally
> for the next hour?
>
> Regards
> Umashankar Das
>
> On Wed, Feb 23, 2011 at 12:41 PM, Matt Harris 
> <thematthar...@twitter.com>wrote:
>
>> Hi Zaver,
>>
>> A 420 response from the Search API means you have been rate limited. What
>> you should do is stop making requests and then try again 30 seconds later.
>> If you still get 420, wait 1 minute. Continue doubling the time you wait
>> until the 420 stops and you get results. Then gradually increase your
>> request rate again.
>>
>> For extra back off magic add a little jitter (e.g. a random number of
>> seconds between say 0 and 30) to the doubled wait times.
>>
>> Hope that helps,
>> @themattharris
>> Developer Advocate, Twitter
>> http://twitter.com/themattharris
>>
>>
>>
>> On Tue, Feb 22, 2011 at 12:29 AM, zaver <zave...@hotmail.com> wrote:
>>
>>> Hello,
>>>
>>> I am using the search api with multiple keywords (120 keywords) using
>>> curl (curl_multi_init etc.), querying the api every 5 mins and i need
>>> some help on how to handle some of the response codes.
>>> Specifically:
>>>
>>> 420 -> i get this error on some of my keywords not all. Does this mean
>>> that i am rate limited and should wait for the amount of time in the
>>> Retry-after part in general or only for these keywords? Currently I do
>>> wait for the amount of time it specifies for the whole keyword set. Is
>>> that right?
>>>
>>> Haven't come across these yet although i would like to have some
>>> handling for these.
>>>
>>> 502: Bad Gateway: Twitter is down or being upgraded.
>>> 503: Service Unavailable: The Twitter servers are up, but overloaded
>>> with requests. Try again later.
>>>
>>> Any help is greatly appreciated. Thanks
>>>
>>> Zaver
>>>
>>> --
>>> Twitter developer documentation and resources:
>>> http://dev.twitter.com/doc
>>> API updates via Twitter: http://twitter.com/twitterapi
>>> Issues/Enhancements Tracker:
>>> http://code.google.com/p/twitter-api/issues/list
>>> Change your membership to this group:
>>> http://groups.google.com/group/twitter-development-talk
>>>
>>
>>  --
>> Twitter developer documentation and resources: http://dev.twitter.com/doc
>> API updates via Twitter: http://twitter.com/twitterapi
>> Issues/Enhancements Tracker:
>> http://code.google.com/p/twitter-api/issues/list
>> Change your membership to this group:
>> http://groups.google.com/group/twitter-development-talk
>>
>
>  --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to