Rate limiting
Our API implements rate limiting to ensure fair use and maintain optimal performance for all users. Rate limiting is applied to both authenticated and anonymous users, with limits set to balance accessibility and security.
Understanding Rate Limiting
Rate limiting controls the number of requests a user can make to the API within a certain period. When a user exceeds their allotted number of requests, the API will temporarily block further requests from that user.
What Happens When the Limit is Exceeded?
If you exceed the allowed rate limit, you will receive a 429 Too Many Requests
response from the API. This response indicates that you have made too many requests in a short period.
The API response will include the following important header:
Retry-After
Header: This header indicates the number of seconds you should wait before making another request. It helps you understand when your request quota will be reset and when you can resume making requests.
Best Practices for API Usage
To ensure smooth interaction with our API and to avoid hitting rate limits, we recommend the following best practices:
-
Monitor Your Request Patterns: Keep track of how frequently your application is making requests to the API. By understanding your usage patterns, you can adjust your application’s behavior to avoid exceeding rate limits.
-
Implement Retry Logic: Incorporate retry logic into your application. If you receive a
429 Too Many Requests
response, your application should wait for the period specified in theRetry-After
header before retrying the request. -
Optimize Your API Calls: Where possible, reduce the number of API calls by batching requests or minimizing redundant requests. This helps in staying within the rate limits while still achieving your goals.
-
Use Authenticated Requests When Possible: If your API usage requires higher request limits, ensure that you authenticate your requests, as authenticated users may have more favorable rate limits.
-
Graceful Degradation: Design your application to handle rate limits gracefully. If rate limiting affects the performance or functionality of your application, implement fallback mechanisms to maintain a good user experience.