Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nextsportsapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Production integrations should read rate limit headers, cache low-change data, and retry safely.

Read usage headers

X-RateLimit-Limit: 600
X-RateLimit-Remaining: 590
X-RateLimit-Reset: 1780000000
X-Quota-Limit: 50000
X-Quota-Remaining: 48750

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.
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");
}

Cache strategy

Endpoint familyCache strategy
Timezones, countries, seasonsLong-lived cache.
Leagues and teamsDaily cache.
FixturesCache by date, league, season, status, and fixture ID.
StandingsHourly for active leagues, daily otherwise.
Live fixturesShort cache only while live.
Last modified on May 19, 2026