Understanding Rate Limits
Learn about API rate limits, how they work, and how to handle them in your application.
What are Rate Limits?
Rate limits control how many API requests you can make within a specific time window. They protect our servers from being overwhelmed and ensure fair usage for all developers.
Why Rate Limits Exist
- • Prevent abuse and ensure fair access for all users
- • Maintain API performance and reliability
- • Protect against accidental infinite loops in code
- • Ensure quality of service for all developers
Current Rate Limits
Standard Plan
Pro Plan
Note: Rate limits are calculated per API key and reset every hour. Enterprise plans have higher limits - contact us for custom requirements.
Monthly API Calls on Your Plan
Separately from the per-minute and per-hour limits above, every API call is counted against the organisation that owns the key, over its billing cycle. The count starts again when the cycle does.
Free plan
100 API calls a month. The 101st call is refused until the next cycle or an upgrade.
Paid plans
No monthly cap. Each call uses 0.0001 units, so 10,000 calls use 1 unit from the plan.
A call over the free plan's monthly allowance is refused with 403 and the code ##LIMIT_EXCEEDED. A refused call is not counted. Do not retry it: it will keep being refused until the cycle resets or the plan changes.
HTTP/1.1 403 Forbidden
{
"success": false,
"error": "Your plan includes 100 Developer API calls a month and they are all used. Upgrade your plan to keep making calls.",
"code": "##LIMIT_EXCEEDED",
"data": { "limitKey": "apiCalls", "limit": 100, "upgradeUrl": "/pricing" }
}Rate Limit Headers
Every API response includes headers that tell you about your current rate limit status:
HTTP/1.1 200 OK X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 999 X-RateLimit-Reset: 1640995200 X-RateLimit-Used: 1
X-RateLimit-Limit
Total requests allowed per hour
X-RateLimit-Remaining
Requests left in current window
X-RateLimit-Reset
Unix timestamp when limits reset
X-RateLimit-Used
Requests used in current window
Handling Rate Limit Errors
When you exceed rate limits, the API returns a 429 status code. Here's how to handle it:
Error Response Example
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1640995200
Retry-After: 3600
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Try again in 3600 seconds."
}
}Recommended Response Strategy
async function makeAPIRequest(url, options) {
try {
const response = await fetch(url, options);
if (response.status === 429) {
// Get retry delay from header
const retryAfter = response.headers.get('Retry-After');
const delayMs = (parseInt(retryAfter) || 60) * 1000;
console.log(`Rate limited. Waiting ${delayMs/1000} seconds...`);
await new Promise(resolve => setTimeout(resolve, delayMs));
// Retry the request
return makeAPIRequest(url, options);
}
return response;
} catch (error) {
console.error('API request failed:', error);
throw error;
}
}Best Practices
Do This
- • Monitor rate limit headers in responses
- • Implement exponential backoff for retries
- • Cache responses when possible
- • Batch requests instead of making many individual calls
- • Use webhooks instead of polling for updates
- • Implement request queuing in your application
Avoid This
- • Making requests in tight loops without delays
- • Ignoring rate limit headers
- • Immediately retrying after a 429 error
- • Making unnecessary API calls
- • Running multiple instances without coordination
- • Not implementing proper error handling
Monitoring Your Usage
Keep track of your API usage to avoid hitting limits:
// Simple rate limit monitoring
class RateLimitMonitor {
constructor() {
this.requestCount = 0;
this.windowStart = Date.now();
}
trackRequest(response) {
const limit = parseInt(response.headers.get('X-RateLimit-Limit'));
const remaining = parseInt(response.headers.get('X-RateLimit-Remaining'));
const used = parseInt(response.headers.get('X-RateLimit-Used'));
console.log(`Rate Limit Status: ${used}/${limit} used, ${remaining} remaining`);
// Warn when approaching limit
if (remaining < limit * 0.1) {
console.warn('⚠️ Approaching rate limit!');
}
}
}
const monitor = new RateLimitMonitor();
const response = await fetch('/api/posts', options);
monitor.trackRequest(response);Pro Tip
Set up alerts when you reach 80% of your rate limit to proactively manage usage before hitting the cap.
Need Higher Limits?
Upgrade Your Plan
Pro and Enterprise plans come with significantly higher rate limits.
View Pricing Plans →Contact Support
Have specific requirements? Our team can help with custom rate limits.
Contact Our Team →