Skip to main content

Rate Limiting

The API uses in-memory rate limiting keyed by API key ID to protect service quality.

Tiers

TierLimitWindow
Standard100 requests1 minute
Elevated500 requests1 minute
Your rate limit tier is determined by your subscription plan.

Response headers

Every API response (including 429 errors) includes rate limit headers:
HeaderDescription
X-RateLimit-LimitMaximum requests allowed per window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp (seconds) when the window resets

Example headers

HTTP/1.1 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1711234560

Handling rate limits

When you exceed the limit, the API returns a 429 Too Many Requests response. Use the X-RateLimit-Reset header to determine when to retry.
async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fetch(url, options);

    if (response.status !== 429) return response;

    const resetAt = Number(response.headers.get('X-RateLimit-Reset'));
    const waitMs = Math.max(0, resetAt * 1000 - Date.now()) + 100;

    console.log(`Rate limited. Waiting ${Math.ceil(waitMs / 1000)}s...`);
    await new Promise(resolve => setTimeout(resolve, waitMs));
  }

  throw new Error('Max retries exceeded');
}
To avoid hitting rate limits, add small delays between requests when iterating through paginated results, and cache responses where possible.