Current Limits
An account’s search and document-read limits cover all of its API keys. A per-minute limit counts the requests of the last 60 seconds. A request rejected with 429, or a search answered
503 because the server is busy, doesn’t count, so retrying doesn’t keep you limited.
Rate Limit Headers
Every response to a request with a valid key carries:
When you go over a per-minute limit, the API answers
429 Too Many Requests with a Retry-After header, in seconds. On API v3 the body is:
{"error": "Rate limit exceeded. Maximum 50 requests per minute."} with the same headers.
One search at a time
A v3 search runs one at a time per account, across all of the account’s API keys. A second search sent while the first is still running waits up to 2 seconds for it, then answers429 with the code concurrent_search and a Retry-After header. Send searches one after another, not in parallel. Reading documents and listing datasets have no such limit.
When too many searches are running on the server, a search answers 503 Service Unavailable with the code busy and a Retry-After header. A 429 means your client should slow down; a 503 means the server is busy. Either way, wait Retry-After seconds and retry. See Errors for every code.
Best Practices
Wait as long as Retry-After says
Wait as long as Retry-After says
When you receive a 429 or a 503, wait
Retry-After seconds before retrying. Without the header, double the wait with each retry. To stay under the limit in the first place, pace requests by X-RateLimit-Remaining and X-RateLimit-Reset.Batch your requests
Batch your requests
Instead of making many small requests, ask for more results per request:
limit on v3 search, top_k on the legacy endpoints. Every v3 search request reruns the whole search, so each page costs the same.Cache responses
Cache responses
Cache API responses to avoid making duplicate requests for the same data.