Read usage headers
Backoff on 429
When the API returns 429 Too Many Requests, stop sending requests until the reset time. If no reset header is available, use exponential backoff.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use headers, caching, and backoff to keep integrations stable.
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 590
X-RateLimit-Reset: 1780000000
X-Quota-Limit: 50000
X-Quota-Remaining: 48750
429429 Too Many Requests, stop sending requests until the reset time. If no reset header is available, use exponential backoff.
async function requestWithBackoff(url, apiKey) {
let delay = 1000;
for (let attempt = 0; attempt < 5; attempt += 1) {
const response = await fetch(url, {
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
if (response.status !== 429) {
return response;
}
const reset = response.headers.get("X-RateLimit-Reset");
const waitMs = reset ? Math.max(Number(reset) * 1000 - Date.now(), delay) : delay;
await new Promise((resolve) => setTimeout(resolve, waitMs));
delay *= 2;
}
throw new Error("Rate limit retry attempts exhausted");
}
| Endpoint family | Cache strategy |
|---|---|
| Timezones, countries, seasons | Long-lived cache. |
| Leagues and teams | Daily cache. |
| Fixtures | Cache by date, league, season, status, and fixture ID. |
| Standings | Hourly for active leagues, daily otherwise. |
| Live fixtures | Short cache only while live. |