basketballapi.net

Documentation / Stats

Head to head

GET/v1/teams/{id}/head-to-head

Two teams' meetings: the record from the first team's side, home and away, average score and the last games.

Live and up

Parameters

NameInTypeAbout
id requiredpathidThe team, by its id (tm_…). e.g. tm_Z81WSSTP
opponent requiredqueryidOnly this team, by its id (tm_…). e.g. tm_GX2ASRW0
competitionqueryidOnly this competition, by its id (cp_…). e.g. cp_11A6HQXJ
lastqueryintegerHow many recent games, from 1 to 50. 10 if left out.

What comes back

data is one of these:

FieldTypeAbout
teamobject
team.ididA team id.
team.namestring
opponentobject
opponent.ididA team id.
opponent.namestring
summaryobject
summary.gamesinteger
summary.woninteger
summary.lostinteger
summary.homestringWon-lost at home, like 4-2.
summary.awaystringWon-lost away.
summary.average_points_fornumber or null
summary.average_points_againstnumber or null
summary.first_datedate or null
summary.last_datedate or null
gamesarray of object

Errors

400422401403429404 What each one means