Rate Limiting
Rate limit details and how to handle 429 responses.
Limits
Each API key is limited to 60 requests per minute using a sliding window.
If you exceed the limit, you'll receive a 429 response:
{
"error": "rate_limited",
"code": "rate_limited",
"message": "Rate limit exceeded. Try again in a few seconds."
}Handling rate limits
Wait and retry with exponential backoff:
import time
import requests
def query_with_retry(url, headers, params, max_retries=3):
for attempt in range(max_retries):
resp = requests.get(url, headers=headers, params=params)
if resp.status_code == 429:
wait = 2 ** attempt
time.sleep(wait)
continue
return resp
raise Exception("Rate limited after retries")Tips
- Use the
/v1/batchendpoint to query up to 50 domains in a single request - Cache responses on your end to avoid redundant calls
- The
/v1/site-explorerendpoint combines multiple queries into one call