This is a very incomplete and approximative list of how Web services APIs are handling rate limits in the context of HTTP. It doesn't seem there is a common approach around it by looking at the documentation.
It would require real testing. The following list contains information found on Twitter, Flickr, Etsy, FourSquare, Facebook and Google Maps sites. ## Twitter They send specific home-made HTTP headers * X-FeatureRateLimit-Limit * X-FeatureRateLimit-Remaining * X-FeatureRateLimit-Reset >If your application is being rate-limited by the REST API it will receive HTTP >400 response codes. http://dev.twitter.com/pages/rate-limiting They use 401 (login rate limit), 420 (too many login attempts in short period of time, too many copies of the same app with the same account) http://dev.twitter.com/pages/streaming_api_response_codes ## Flickr >The Flickr service has no pre-determined rate limit. However, irresponsible >use may result in your application key being temporarily suspended. What's >"responsible"? Keeping a local cache of information that is unlikely to >change, sleep()ing between queries when doing large series of api calls, >debugging your own code, that kind of thing. Keep it under an average of one >query per second and you'll be fine. http://developer.yahoo.com/flickr/ ## Etsy >Clients are allowed 10,000 requests per 24-hour period, with a limit of 10 >queries per second. http://developer.etsy.com/docs#rate_limiting >403 Forbidden You've exceeded the rate limits for your account, or >the data you're trying to access is private. http://developer.etsy.com/docs#standard_response_codes ## FourSquare >Usage of the API is subject to rate limits. The limits are based on a moving >window that tracks the number of requests you send per hour. >{ratelimited}: You've hit a rate limit for this method. Check your code to >make sure you aren't unnecessarily calling the same method multiple times in a >row. This will have an HTTP status code of 400. http://groups.google.com/group/foursquare-api/web/api-documentation ## Facebook >The stream.publish method throws error 340 that feed limit has been reached. http://bugs.developers.facebook.net/show_bug.cgi?id=5763 ## Google Geocoding API They do not use HTTP codes it seems (or at least the documentation doesn't say it) >"OVER_QUERY_LIMIT" indicates that you are over your quota. http://code.google.com/apis/maps/documentation/geocoding/#StatusCodes -- Karl Dubost Montréal, QC, Canada http://www.la-grange.net/karl/
