Documentation

Rate Limits

Understand ALT Sports Data rate limits, headers, and retry behavior.

Rate Limits

ALT Sports Data applies rate limits so integrations remain stable and predictable across demo, development, and production usage.

Diagram showing request flow, limits, and reset behavior for ALT Sports Data rate limiting.

Rate limit headers

Every API response includes rate limit information in the headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1678886400
  • X-RateLimit-Limit is the maximum requests allowed per window
  • X-RateLimit-Remaining is the remaining quota in the current window
  • X-RateLimit-Reset is the Unix timestamp for the next reset

Example tiers

TierRequests/HourRequests/Day
Demo1001,000
Free1,00010,000
Pro10,000100,000
EnterpriseCustomCustom

When you hit the limit

If you exceed the limit, the API responds with 429 Too Many Requests:

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please retry after 1678886400",
    "retry_after": 1678886400
  }
}

Integration guidance

  1. Read the rate limit headers on every response.
  2. Cache aggressively where it makes sense.
  3. Filter requests early to reduce unnecessary calls.
  4. Back off and retry gracefully after 429 responses.
async function fetchWithRetry(url, headers) {
  const response = await fetch(url, { headers });

  if (response.status !== 429) {
    return response;
  }

  const resetAt = Number(response.headers.get('X-RateLimit-Reset'));
  const waitMs = Math.max(resetAt * 1000 - Date.now(), 1000);

  await new Promise((resolve) => setTimeout(resolve, waitMs));
  return fetch(url, { headers });
}
import time
import requests

def fetch_with_retry(url: str, headers: dict[str, str]):
    response = requests.get(url, headers=headers)

    if response.status_code != 429:
        return response

    reset_at = int(response.headers.get('X-RateLimit-Reset', 0))
    wait_seconds = max(reset_at - int(time.time()), 1)

    time.sleep(wait_seconds)
    return requests.get(url, headers=headers)

On this page