Skip to main content

Rate Limiting

To ensure service stability, API requests are rate-limited per user and endpoint.

Rate Limit Levels

LevelRequests per MinuteDescription
Level 1120Standard API requests
Level 260Resource-intensive requests
Level 320Heavy server-load requests

Response Headers

Every API response includes rate limit information in the headers:

HeaderDescription
RateLimit-LimitYour quota for this endpoint
RateLimit-RemainingRemaining requests until reset
RateLimit-ResetTime when the limit resets
Retry-AfterWhen to retry (only on 429 responses)

Handling Rate Limits

If you exceed the limit, the API returns status code 429 Too Many Requests.

Best practices:

  1. Check headers - Monitor RateLimit-Remaining to avoid hitting limits
  2. Implement backoff - When you receive a 429, wait until Retry-After before retrying
  3. Batch requests - Combine multiple operations where possible
  4. Cache responses - Avoid repeated identical requests

Example retry logic (Python):

import time
import requests

def api_request_with_retry(url, headers, max_retries=3):
for attempt in range(max_retries):
response = requests.get(url, headers=headers)

if response.status_code == 429:
retry_after = int(response.headers.get('Retry-After', 60))
print(f"Rate limited. Waiting {retry_after} seconds...")
time.sleep(retry_after)
continue

return response

raise Exception("Max retries exceeded")

Let us know what you think about this document :)