basketballapi.net

Documentation / Start here

MCP tools

Every tool the MCP server offers, with its inputs.

The 15 tools of the MCP server, in the order the server lists them. Each is one endpoint of the REST API with paging left out; per_page sets how many records a list brings back. Ids are the API's own, such as those get_games and find_teams return.

get_games

Find games by day, date range, competition, season, team or status. Start here to get game ids.

InputTypeRequiredWhat it is
datestring (date)NoA day as YYYY-MM-DD.
fromstring (date)NoA day as YYYY-MM-DD.
tostring (date)NoA day as YYYY-MM-DD.
competitionstringNoA competition id, like cp_11A6HQXJ.
seasonstringNoA season id, like ss_VMJG5K0W.
teamstringNoA team id, like tm_X3JM1FF7.
statusstringNoOne of scheduled, final, no_result.
per_pageintegerNoHow many records, 50 if left out.

yesterdays_results

Every final score from yesterday (UTC), optionally for one competition.

InputTypeRequiredWhat it is
competitionstringNoA competition id, like cp_11A6HQXJ.
per_pageintegerNoHow many records, 50 if left out.

get_game

One game: teams, score by quarter, attendance and which detail it holds.

InputTypeRequiredWhat it is
idstringYesThe game id, like gm_GR6FFRP9.

get_boxscore

Both teams' box scores: every player's line and the team totals.

InputTypeRequiredWhat it is
idstringYesThe game id, like gm_GR6FFRP9.

get_play_by_play

Every event of a game in order, with the clock, team, player and running score.

InputTypeRequiredWhat it is
idstringYesThe game id, like gm_GR6FFRP9.

get_shots

Every shot of a game with its position in feet from the basket, its value and whether it went in.

InputTypeRequiredWhat it is
idstringYesThe game id, like gm_GR6FFRP9.

list_competitions

Every competition held, with its id, country, seasons and games.

InputTypeRequiredWhat it is
per_pageintegerNoHow many records, 50 if left out.

find_teams

Teams by name, competition or season, to get team ids.

InputTypeRequiredWhat it is
competitionstringNoA competition id, like cp_11A6HQXJ.
seasonstringNoA season id, like ss_VMJG5K0W.
qstringNo
per_pageintegerNoHow many records, 50 if left out.

get_team

One team: its country, city, home arena, arena capacity, founding year, head coaches, and the competitions and seasons it played.

InputTypeRequiredWhat it is
idstringYesThe team id, like tm_X3JM1FF7.

get_standings

A season's table from its regular-season results: played, won, lost, points for and against, home, away, last ten and streak. Leave season out for the latest.

InputTypeRequiredWhat it is
competitionstringYesA competition id, like cp_11A6HQXJ.
seasonstringNoA season id, like ss_VMJG5K0W.

get_team_form

A team's last games with margin, pace, ratings and results against the closing spread and total.

InputTypeRequiredWhat it is
idstringYesThe team id, like tm_X3JM1FF7.
lastintegerNo
venuestringNoOne of home, away.
competitionstringNoA competition id, like cp_11A6HQXJ.

find_players

Players by name (3 letters or more) or team, to get player ids; the only way to a player id without a box score first.

InputTypeRequiredWhat it is
qstringNo
teamstringNoA team id, like tm_X3JM1FF7.
competitionstringNoA competition id, like cp_11A6HQXJ.
seasonstringNoA season id, like ss_VMJG5K0W.
per_pageintegerNoHow many records, 50 if left out.

get_player_games

A player's game log: one box line per game.

InputTypeRequiredWhat it is
idstringYesThe player id, like pl_JFEK5S5G.
seasonstringNoA season id, like ss_VMJG5K0W.
fromstring (date)NoA day as YYYY-MM-DD.
tostring (date)NoA day as YYYY-MM-DD.
per_pageintegerNoHow many records, 50 if left out.

get_player_splits

A player's averages split home and away, by result, month, opponent or starting role.

InputTypeRequiredWhat it is
idstringYesThe player id, like pl_JFEK5S5G.
bystringNoOne of venue, result, month, opponent, starter.
seasonstringNoA season id, like ss_VMJG5K0W.
competitionstringNoA competition id, like cp_11A6HQXJ.

get_usage

Your plan, calls used today and the limits. Does not count as a call.

It takes no inputs.