basketballapi.net

Documentation / Guides

Games as they are played

The score, the period, the clock and the last play of every game in progress, by polling or by webhook.

What it covers

GET /v1/live lists every game being played now, and those that finished in the last 15 minutes so a poller sees the end. Each has the score, the period, the clock, the score by period and the last play. It is on Live and up.

How fresh it is

  • meta.poll_seconds is how often to ask; asking more often brings nothing new.
  • seconds_behind on each game, and the smallest of them in meta, says how far the data is behind the court.
  • last_change is when anything last changed.
  • Not every competition is followed while it is played. Those that are show up here; the rest gain their final score when the game ends.

Common jobs

Everything in play

GET https://api.basketballapi.net/v1/live

One competition

GET https://api.basketballapi.net/v1/live?competition=cp_...

Told rather than asking

The game.live webhook sends the same snapshot each time a game's score or last play changes, and game.final when it ends. See Webhooks.

Endpoints in this guide