Rate Limiting
The SO API uses a token bucket to control the limit of requests made in a specific time frame. Essentially, within a given window of time there are a specific number of requests that can be made, each request subtracts one available request (token) from the remaining requests available (bucket). We do not throttle requests or control burst requests.
Current Limits
Live Store: 1000 requests per 60 seconds
Sandbox Store: 100 request per 60 seconds
The current rate limit (for Live Stores) is set to 1000 requests per 60 seconds. The time window starts from the first request and resets the bucket 60 seconds after. For example, if your first request was made at 6:59:12 your bucket would reset at 7:00:12. All request types (GET POST PUT and DELETE) count towards your rate limit.
Some GET request endpoints support the use of URL query parameters, these endpoints and the use of URL query parameters should be used with special consideration. Each of these requests will count towards your rate limit. If you are using pagination, for example, and make requests for each page those requests will all deduct a request from your available tokens. Instead, it may be a better choice to request all the data and handle pagination after the request.
Monitoring Your Requests
Every request will also include a Tokens-Remaining header with information about your remaining requests for this bucket. When your rate limit has been reached the Rate-Reset header is also included.
Rate Limit Reached
If you reach your rate limit you will recieve a 429 Too Many Requests response for all requests until the bucket is reset. The response will also include the time, in seconds, until the next bucket reset. This information will be included in the Rate-Reset header and the response body.
{
"status": "429",
"message": "Too many Requests",
"body": {
"text": "Rate Limit reached for this window",
"rate-reset": "53"
}
}