Rate Limits
Rate limits protect the API from abuse and ensure fair usage across all users.
Limits by plan
| Plan | Requests/month | Burst rate (req/min) | |---|---|---| | Free | 500 | 10 | | Starter | 5,000 | 30 | | Growth | 25,000 | 60 | | Scale | 100,000 | 120 |
Rate limit headers
Every API response includes rate limit information:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum requests per minute for your plan |
| X-RateLimit-Remaining | Requests remaining in the current window |
| X-RateLimit-Reset | Unix timestamp when the window resets |
When you hit the limit
You'll receive a 429 Too Many Requests response:
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded"
}
}
Handling rate limits
Exponential backoff
import time
import requests
def classify_with_retry(email, api_key, max_retries=3):
for attempt in range(max_retries):
response = requests.get(
"https://api.emailclassifier.com/v1/classify",
params={"email": email},
headers={"Authorization": f"Bearer {api_key}"}
)
if response.status_code != 429:
return response.json()
wait = 2 ** attempt
time.sleep(wait)
raise Exception("Rate limit exceeded after retries")
Check headers proactively
const response = await fetch(url, { headers });
const remaining = response.headers.get('X-RateLimit-Remaining');
if (parseInt(remaining) < 5) {
// Slow down requests
await new Promise(r => setTimeout(r, 1000));
}
Monthly quota
When your monthly quota is reached, all requests return 429 until the next billing cycle. You can:
- Upgrade your plan for more requests
- Wait until the next month for the quota to reset
- Monitor usage in your Dashboard to avoid surprises