Understanding API rate limits and how to handle them
429 Too Many Requests
responses until the next reset window.Parameter | Value | Description |
---|---|---|
Requests per Minute | 100 | Maximum requests allowed per minute |
Window Type | Fixed Window | Resets every minute on the minute boundary |
Identification | API Key | Based on your x-client-key header |
Scope | Per API Key | Each API key has its own independent limit |
Header | Description | Example |
---|---|---|
X-RateLimit-Limit | Maximum requests allowed per window | 100 |
X-RateLimit-Remaining | Requests remaining in current window | 73 |
X-RateLimit-Reset | Unix timestamp when the window resets | 1640995260 |
Field | Type | Description |
---|---|---|
statusCode | number | HTTP status code (429) |
message | string | Human-readable error message |
retryAfter | number | Seconds until you can retry |
Recommended Practices
Always Check Headers
X-RateLimit-Remaining
to prevent hitting limitsRespect Retry-After
Implement Exponential Backoff
Spread Requests
Queue Requests
Handle Gracefully
Monitor Usage
Practices to Avoid
Retry-After
headerX-RateLimit-Remaining
header