basketballapi.net

Documentation / Guides

Competitions, seasons and teams

The ids everything else is asked by: competitions, their seasons, the teams in them, each club's details and roster, and the table.

What it covers

  • Every competition we hold, with its country, its kind, its seasons and its games.
  • The seasons of a competition, newest first.
  • The teams of a competition and season, and each club's country, city, home arena, arena capacity, founding year and head coaches where known.
  • A team's roster in a season, and a season's table worked out from its regular-season results.

How the records link

  • Start from Competitions for a cp_ id, then Seasons for its ss_ ids and Teams for tm_ ids.
  • Those ids filter almost every other call: games, standings, leaders, rosters and exports.
  • Ids are kept for good, so store them and join across calls.

Common jobs

Every competition

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

A season's teams

GET https://api.basketballapi.net/v1/teams?competition=cp_...&season=ss_...

A club and its roster

GET https://api.basketballapi.net/v1/teams/{id}
GET https://api.basketballapi.net/v1/teams/{id}/roster

The table

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

Club details are on Live and up. How a season is named and how the table is worked out: Seasons, stages and standings.

Endpoints in this guide