Overview
To ensure fair usage and maintain service stability, we implement rate limiting on all API endpoints. Rate limits are applied on a per-API key basis and vary depending on your plan.
Exceeding rate limits will result in requests being rejected with a 429 Too Many Requests response. Implement proper error handling and backoff strategies to handle these cases.
Rate Limits by Plan
Each plan has different rate limits:
Plan | Requests per minute | Requests per day | Burst limit |
---|---|---|---|
Free | 60 | 10,000 | 120 |
Professional | 120 | 50,000 | 240 |
Enterprise | 500 | Unlimited | 1000 |
* Burst limit allows for short spikes in traffic above the per-minute rate.
Rate Limit Headers
Every API response includes headers to help you track your rate limit usage:
http
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 56
X-RateLimit-Reset: 1616999999
X-RateLimit-Limit
- Your rate limit per minuteX-RateLimit-Remaining
- Remaining requests for the current windowX-RateLimit-Reset
- Timestamp when the rate limit will reset
Best Practices
Follow these guidelines to work effectively with rate limits:
- Monitor rate limit headers - Track your usage and adjust request rates accordingly
- Implement retries - Use exponential backoff when rate limited
- Cache responses - Store frequently accessed data locally
- Batch requests - Combine multiple operations when possible
Handling Rate Limit Errors
When you exceed the rate limit, you'll receive a 429 response:
json
{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please try again in 30 seconds.",
"retry_after": 30
}
}
Here's an example of how to handle rate limits in your code:
javascript
async function makeRequest(url, options = {}) {
const maxRetries = 3;
let retries = 0;
while (retries < maxRetries) {
try {
const response = await fetch(url, options);
if (response.status === 429) {
const data = await response.json();
const retryAfter = data.error.retry_after || 30;
// Wait for the specified time
await new Promise(resolve =>
setTimeout(resolve, retryAfter * 1000)
);
retries++;
continue;
}
return response;
} catch (error) {
throw error;
}
}
throw new Error('Max retries exceeded');
}