basketballapi.net

Documentation / Guides

Bulk data

A whole season of one competition in one answer, as JSON rows or a CSV file, for a database or a spreadsheet.

What it covers

GET /v1/export gives one table of a competition's season in one answer: its games, teams, players, player_lines (every player box line) or team_lines (every team box line). It is on Complete.

How the records link

  • Every row carries the same columns, named as the other calls name them; meta.columns lists them.
  • Rows carry the same ids as every other call, so an export and a call made later join on gm_, tm_ and pl_.
  • Leave season out for the competition's latest season.

Common jobs

A season's games as JSON

GET https://api.basketballapi.net/v1/export?competition=cp_...&table=games

Every player line as a CSV file

GET https://api.basketballapi.net/v1/export?competition=cp_...&season=ss_...&table=player_lines&format=csv

Endpoints in this guide