basketballapi.net

Documentation / Start here

Limits and quotas

Calls a day, calls a minute, how far back each plan reaches, and the headers that tell you what is left.

What each plan allows

PlanCalls a dayCalls a minuteReaches
Free key10010Yesterday and today
Live10,00060The last 12 months
Archive50,00060Every season
Complete250,000120Every season

The daily limit is shared by every key on your account and resets at 00:00 UTC. GET /v1/usage tells you where you stand and does not count as a call.

The headers on every answer

HeaderWhat it says
X-RateLimit-LimitCalls a minute on your plan.
X-RateLimit-RemainingCalls left this minute.
X-RateLimit-ResetWhen this minute ends, as a Unix time.
X-Quota-RemainingCalls left today.
Retry-AfterOn a 429 only: seconds to wait before trying again.

When you reach a limit

  • 429 rate_limited: too many calls this minute. Wait the seconds in Retry-After.
  • 429 quota_exceeded: today's calls are used up. The answer says when the allowance resets, in resets_at.

Only answers that succeed count towards your daily limit; errors do not.

Dates outside your plan

Asking for a game or a day your plan does not reach answers 403 upgrade_required, naming the plan that does. The same goes for an endpoint your plan does not include.