Requests the key can make in one window. 600.
Get started
Stay within rate limits
How many requests an API key can make, the headers that show what's left, and what to do when you hit the limit.
Each API key has its own limits, so one busy script doesn’t slow down another. Every response tells you how much room is left.
The limits
Section titled “The limits”| What | Limit per key |
|---|---|
| All requests | 600 a minute |
Requests that make changes (POST, PATCH, DELETE) |
60 a minute, counted inside the 600 |
All of your team’s keys together also share a larger limit. You’ll only reach it with many busy keys at once.
Exports also use your team’s monthly credits, the same as exporting in Onsite.
Rate limit headers
Section titled “Rate limit headers”Every successful response includes these headers, so your code can slow down before it reaches the limit:
RateLimit-LimitintegerRateLimit-RemainingintegerRequests left in the current window.
RateLimit-PolicystringThe limit and the window in seconds, such as 600;w=60.
Retry-AfterintegerOnly on a 429: seconds to wait before the next request.
When you hit the limit
Section titled “When you hit the limit”The API answers 429 with the code rate_limited:
{ "error": { "code": "rate_limited", "message": "Too many requests for this key. Wait for the time in the Retry-After header, then try again.", "requestId": "E-3PQ8-W2LC" }}Wait for the Retry-After seconds, then send the request again. Errors has a retry example.
Make fewer requests
Section titled “Make fewer requests”- Ask for more rows at once. Lists take
limitup to their maximum, so one request can replace several. See Pagination. - Filter on the server. Use parameters like
query,page,countryordeviceinstead of fetching everything and filtering in your code. - Cache what doesn’t change often. A report for a period that has ended rarely changes, so keep its answer for a few hours.
- Spread out scheduled jobs. If a script reads many sites, read them one after another instead of all at once.