basketballapi.net

Documentation / Games

Games in progress

GET/v1/live

Every game being played now, and those finished in the last 15 minutes: the score, the period, the clock, the score by period and the last play, with how many seconds behind the court it is. Poll it every 30 seconds, or take the game.live webhook.

Live and up

Parameters

NameInTypeAbout
competitionqueryidOnly this competition, by its id (cp_…). e.g. cp_11A6HQXJ

What comes back

data is one of these:

FieldTypeAbout
gameobject
statusstring
scoreobject
score.homeinteger or null
score.awayinteger or null
periodinteger or null
periods_endedinteger
clockstring or nullTime left in the period at the last play, mm:ss.
periodsobject or null
periods.homearray of integer
periods.awayarray of integer
last_playobject or null
last_play.seqinteger
last_play.periodinteger
last_play.clockstring or null
last_play.sidestring or null
last_play.playerobject or null
last_play.typestring
last_play.descriptionstring
last_play.home_scoreinteger or null
last_play.away_scoreinteger or null
last_changedate-time or null
seconds_behindinteger or null

Errors

400422401403429 What each one means