W3C home > Mailing lists > Public > www-archive@w3.org > October 2010

Common APIs with regards to HTTP and Rate Limit

From: Karl Dubost <karl+w3c@la-grange.net>
Date: Tue, 5 Oct 2010 00:02:28 -0400
Message-Id: <C9C720A1-9630-41D7-895F-362533EC51E0@la-grange.net>
To: www-archive <www-archive@w3.org>
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. 


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) 


## 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.


## Etsy 

>Clients are allowed 10,000 requests per 24-hour period, with a limit of 10 queries per second.

>403	Forbidden	You've exceeded the rate limits for your account, or the data you're trying to access is private.

## 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.


## Facebook

>The stream.publish method throws error 340 that feed limit has been reached.

## 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.

Karl Dubost
Montréal, QC, Canada
Received on Tuesday, 5 October 2010 04:02:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:43:43 UTC