Rate Limits
Understand your plan's request quotas, rate limit response headers, and how to handle 429 errors gracefully.
Limits by Plan
| Plan | Daily Limit | Monthly Limit | Requests/Second |
|---|---|---|---|
| Free | 100 | 3,000 | 1 |
| Starter | 10,000 | 300,000 | 10 |
| Pro | 100,000 | 3,000,000 | 50 |
| Enterprise | Unlimited | Unlimited | 200 |
Rate Limit Headers
Every API response includes rate limit headers so you can monitor your usage in real time:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum number of requests allowed in the current daily window. |
| X-RateLimit-Remaining | Number of requests remaining in the current daily window. |
| X-RateLimit-Reset | Unix timestamp (seconds) when the daily limit resets (midnight UTC). |
| X-RateLimit-Monthly-Limit | Your plan's monthly request quota. |
| X-RateLimit-Monthly-Remaining | Number of requests remaining in your monthly quota. |
| Retry-After | Seconds to wait before retrying (only included on 429 responses). |
Handling 429 Errors
When you exceed your rate limit, the API returns a 429 Too Many Requests response. Follow these steps to handle it gracefully:
1. Check the Reset Header
Read the X-RateLimit-Reset header to determine when you can make requests again. For monthly limits, check X-RateLimit-Monthly-Remaining.
2. Implement Exponential Backoff
If you receive a 429, wait before retrying. Double the wait time for each consecutive 429:
- 1st retry: wait 1 second
- 2nd retry: wait 2 seconds
- 3rd retry: wait 4 seconds
- Maximum: wait 60 seconds, then stop retrying
3. Cache Responses
Cache frequently requested data to reduce API calls. Fuel prices and central bank rates change infrequently, so caching for 1 hour is usually safe.
4. Use Batch Endpoints
When fetching data for multiple countries, omit the country parameter to get all data in a single request instead of making 54 separate calls.
5. Upgrade Your Plan
If you consistently hit rate limits, consider upgrading your plan for higher daily and monthly quotas.
afro_test_*) share the Free plan limits but do not count against your production quota.