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 itsss_ids and Teams fortm_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
/v1/competitionsEvery competition held, with its seasons and games.
/v1/seasonsSeasons of a competition, newest first.
/v1/teamsTeams, by competition and season.
/v1/teams/{id}One team: its country, the club's city, home arena, arena capacity and founding year where known, and the competitions and seasons it played.
/v1/teams/{id}/rosterEvery player who played for a team in a season, with games, starts and averages. Leave season out for the team's latest.
/v1/standingsA season's table from its regular-season final scores: played, won, lost, points for and against, home, away, last ten and streak.