Understand API rate limits to ensure smooth integration.
How many requests you can make depends on your plan. The current limits for each plan are on the Rate Limits page of the API docs. On a Custom plan, ask us for higher limits.
Every API response includes rate limit information:
X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4850 X-RateLimit-Reset: 1234567890
When you exceed the rate limit, you'll receive:
HTTP/1.1 429 Too Many Requests
Retry-After: 3600
{
"error": {
"type": "rate_limit_error",
"message": "Too many requests"
}
}async function makeRequest(url, retries = 3) {
for (let i = 0; i < retries; i++) {
const response = await fetch(url);
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After');
await sleep(retryAfter * 1000);
continue;
}
return response;
}
}Pro Tip: Use webhooks instead of polling to reduce API calls and stay within limits.