Skip to main content

Rate Limiting

The API limits the number of requests per API key to ensure stability.

Limits

  • 1000 requests per hour by default
  • Based on a token bucket algorithm with Redis

Response Headers

Each response includes rate limiting headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1642435200
  • X-RateLimit-Limit: Maximum number of requests per hour
  • X-RateLimit-Remaining: Remaining requests
  • X-RateLimit-Reset: Unix timestamp of reset

429 Error

If you exceed the limit:

{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Try again in 3600 seconds"
}
}

The Retry-After header indicates the number of seconds to wait.

Best Practices

  • Implement exponential backoff
  • Monitor the X-RateLimit-Remaining header
  • Space out your requests if possible