API Rate Limits & Error Handling
Complete guide to understanding rate limits, handling errors, and implementing best practices for API usage.
Rate Limits
Standard API Keys
- 100 requests per minute
- 6,000 requests per hour
- 144,000 requests per day
Premium API Keys
- 1,000 requests per minute
- 60,000 requests per hour
- 1,440,000 requests per day
Error Codes
400 - Bad Request
The request was invalid or malformed. Check your request parameters and body format.
401 - Unauthorized
Authentication required or invalid API key. Include valid API key in Authorization header: Bearer YOUR_API_KEY
429 - Rate Limit Exceeded
Too many requests. Check Retry-After header for wait time. Implement exponential backoff for retries.
500 - Internal Server Error
An internal server error occurred. Please try again later or contact support if the issue persists.
Best Practices
- Implement exponential backoff for retries
- Cache responses when appropriate to reduce API calls
- Use webhooks instead of polling when possible
- Monitor rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) in responses
- Use appropriate API key tier for your needs
- Handle errors gracefully with proper user feedback
- Log errors for debugging and monitoring