Our API implements intelligent rate limiting to ensure optimal performance and fair usage across all users.
HTTP/1.1 200 OK RateLimit-Limit: 60 RateLimit-Remaining: 50 RateLimit-Reset: 1640995200 Content-Type: application/json
{ "success": false, "message": "Too many requests, please try again later." "payload": {} }
Always check the RateLimit-* headers in responses to track your usage and avoid hitting limits.
When you receive a 429 response, wait for the time specified in the Retry-After header before retrying.
Cache API responses when possible to reduce the number of requests and improve performance.
async function makeAPIRequest(url, options = {}) { const maxRetries = 3; let retries = 0; while (retries < maxRetries) { try { const response = await fetch(url, { ...options, headers: { "x-api-key": "YOUR_API_KEY", ...options.headers } }); // Check rate limit headers if (response.status === 429) { const retryAfter = response.headers.get("Retry-After"); await new Promise(resolve => setTimeout(resolve, waitTime)); } } catch (error) { // Handle error and retry } } }