Skip to main content
Version: 0.1.5

NBA — NBA Stats API (stats.nba.com) — Cumulative stats

nba_stats_cumestatsplayer​

GET /stats/cumestatsplayer

Endpoint URL: GET https://stats.nba.com/stats/cumestatsplayer

Valid URL: https://stats.nba.com/stats/cumestatsplayer?GameIDs=0022000756&LeagueID=00&PlayerID=1629611&Season=2020-21&SeasonType=Regular+Season

API ParameterPythonPatternRequiredNullableDescription
GameIDsgame_idsY
LeagueIDleague_idY
PlayerIDplayer_idY
SeasonseasonYSeason year (e.g. 2024).
SeasonTypeseason_type_all_starYSeason type, a label: Regular Season, Pre Season, Playoffs, PlayIn or All Star (each endpoint takes a subset). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs / PlayIn roll over in May (NBA, G League), All Star in March (NBA).

Returns​

return_parsed=True (default) — A dict of DataFrames keyed by result-set name (GameByGameStats, TotalPlayerStats) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

GameByGameStats

col_nametypedescription
date_estcharacter
visitor_teamcharacter
home_teamcharacterHome team name.
gpintegerGames played.
gsintegerGames started.
actual_minutesintegerWhole minutes of actual playing time accumulated over the aggregated games.
actual_secondsintegerLeftover seconds of actual playing time beyond the whole minutes.
fgintegerField goals made over the aggregated games.
fgaintegerField goal attempts.
fg_pctnumericField goal percentage (0-1).
fg3integerThree-point field goals made over the aggregated games.
fg3_aintegerThree-point field goal attempts.
fg3_pctnumericThree-point field goal percentage (0-1).
ftintegerFree throws made over the aggregated games.
ftaintegerFree throw attempts.
ft_pctnumericFree throw percentage (0-1).
off_rebintegerOffensive rebounds over the aggregated games.
def_rebintegerDefensive rebounds over the aggregated games.
tot_rebintegerTotal rebounds over the aggregated games.
avg_tot_rebnumericAverage total rebounds per game over the aggregated games.
astintegerAssists.
pfintegerPersonal fouls.
dqintegerDisqualifications (fouled out) over the aggregated games.
stlintegerSteals.
turnoversintegerTotal turnovers.
blkintegerBlocks.
ptsintegerPoints scored.
avg_ptsnumericAverage points per game over the aggregated games.

TotalPlayerStats

col_nametypedescription
display_fi_lastcharacterAbbreviated player name (first initial and last name).
person_idintegerUnique player identifier (V3 endpoints).
jersey_numcharacterJersey number worn by the player.
gpintegerGames played.
gsintegerGames started.
actual_minutesintegerWhole minutes of actual playing time accumulated over the aggregated games.
actual_secondsintegerLeftover seconds of actual playing time beyond the whole minutes.
fgintegerField goals made over the aggregated games.
fgaintegerField goal attempts.
fg_pctnumericField goal percentage (0-1).
fg3integerThree-point field goals made over the aggregated games.
fg3_aintegerThree-point field goal attempts.
fg3_pctnumericThree-point field goal percentage (0-1).
ftintegerFree throws made over the aggregated games.
ftaintegerFree throw attempts.
ft_pctnumericFree throw percentage (0-1).
off_rebintegerOffensive rebounds over the aggregated games.
def_rebintegerDefensive rebounds over the aggregated games.
tot_rebintegerTotal rebounds over the aggregated games.
astintegerAssists.
pfintegerPersonal fouls.
dqintegerDisqualifications (fouled out) over the aggregated games.
stlintegerSteals.
turnoversintegerTotal turnovers.
blkintegerBlocks.
ptsintegerPoints scored.
max_actual_minutesintegerMost whole minutes played in any single aggregated game.
max_actual_secondsintegerSeconds component paired with the single-game maximum minutes.
max_rebintegerMost rebounds recorded in any single aggregated game.
max_astintegerMost assists recorded in any single aggregated game.
max_stlintegerMost steals recorded in any single aggregated game.
max_turnoversintegerMost turnovers recorded in any single aggregated game.
max_blkintegerMost blocked shots recorded in any single aggregated game.
max_ptsintegerMost points recorded in any single aggregated game.
avg_actual_minutesintegerAverage whole minutes played per aggregated game.
avg_actual_secondsnumericAverage seconds component of playing time per aggregated game.
avg_tot_rebnumericAverage total rebounds per game over the aggregated games.
avg_astnumericAverage assists per game over the aggregated games.
avg_stlnumericAverage steals per game over the aggregated games.
avg_turnoversnumericAverage turnovers per game over the aggregated games.
avg_blknumericAverage blocked shots per game over the aggregated games.
avg_ptsnumericAverage points per game over the aggregated games.
per_min_tot_rebnumericTotal rebounds per minute played over the aggregated games.
per_min_astnumericAssists per minute played over the aggregated games.
per_min_stlnumericSteals per minute played over the aggregated games.
per_min_turnoversnumericTurnovers per minute played over the aggregated games.
per_min_blknumericBlocked shots per minute played over the aggregated games.
per_min_ptsnumericPoints per minute played over the aggregated games.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nba_stats_cumestatsplayer(league_id='00')

Last validated n/a.

nba_stats_cumestatsplayergames​

GET /stats/cumestatsplayergames

Endpoint URL: GET https://stats.nba.com/stats/cumestatsplayergames

Valid URL: https://stats.nba.com/stats/cumestatsplayergames?LeagueID=00&Location=&Outcome=&PlayerID=2544&Season=2024-25&SeasonType=Regular+Season&VsConference=&VsDivision=&VsTeamID=0

API ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
Locationlocation_nullableY
Outcomeoutcome_nullableY
PlayerIDplayer_idY
SeasonseasonYSeason label, e.g. 2024-25. Defaults at call time by a calendar cutoff, the month after a season's first games, so it can lag the newest rows by a few weeks. An NBA season tips off in late October and becomes the default in November (2025-26 through October 2026, 2026-27 from November 2026); a G League season (regular season from late December) in January; a Summer League (played in July, which stats.nba.com labels 2026-27 in 2026) in August; a draft combine (May) in June; a draft (drafthistory, a year; late June) in July. With season type Playoffs / PlayIn (or commonplayoffseries) the NBA and the G League roll over in May, after their playoffs start; with All Star the NBA rolls over in March, after the February game (the G League has no All-Star rows and keeps its own rule). A month table cannot follow a lockout or pandemic calendar (1998-99, 2011-12, 2020-21): pass a season then. Without one stats.nba.com answers an empty HTTP 500 or every season summed.
SeasonTypeseason_type_all_starYSeason type, a label: Regular Season, Pre Season, Playoffs, PlayIn or All Star (each endpoint takes a subset). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs / PlayIn roll over in May (NBA, G League), All Star in March (NBA).
VsConferencevs_conference_nullableY
VsDivisionvs_division_nullableY
VsTeamIDvs_team_id_nullableY

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
matchupcharacterMatchup.
game_idcharacterUnique game identifier.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nba_stats_cumestatsplayergames(league_id='00', season='2024-25')

Last validated n/a.

nba_stats_cumestatsteam​

GET /stats/cumestatsteam

Endpoint URL: GET https://stats.nba.com/stats/cumestatsteam

Valid URL: https://stats.nba.com/stats/cumestatsteam?GameIDs=0022201094&LeagueID=00&Season=2024-25&SeasonType=Regular+Season&TeamID=1610612739

API ParameterPythonPatternRequiredNullableDescription
GameIDsgame_idsY
LeagueIDleague_idY
SeasonseasonYSeason label, e.g. 2024-25. Defaults at call time by a calendar cutoff, the month after a season's first games, so it can lag the newest rows by a few weeks. An NBA season tips off in late October and becomes the default in November (2025-26 through October 2026, 2026-27 from November 2026); a G League season (regular season from late December) in January; a Summer League (played in July, which stats.nba.com labels 2026-27 in 2026) in August; a draft combine (May) in June; a draft (drafthistory, a year; late June) in July. With season type Playoffs / PlayIn (or commonplayoffseries) the NBA and the G League roll over in May, after their playoffs start; with All Star the NBA rolls over in March, after the February game (the G League has no All-Star rows and keeps its own rule). A month table cannot follow a lockout or pandemic calendar (1998-99, 2011-12, 2020-21): pass a season then. Without one stats.nba.com answers an empty HTTP 500 or every season summed.
SeasonTypeseason_type_all_starYSeason type, a label: Regular Season, Pre Season, Playoffs, PlayIn or All Star (each endpoint takes a subset). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs / PlayIn roll over in May (NBA, G League), All Star in March (NBA).
TeamIDteam_idY

Returns​

return_parsed=True (default) — A dict of DataFrames keyed by result-set name (GameByGameStats, TotalTeamStats) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

GameByGameStats

col_nametypedescription
jersey_numcharacterJersey number worn by the player.
playercharacterPlayer name.
person_idcharacterUnique player identifier (V3 endpoints).
team_idcharacterUnique team identifier.
gpcharacterGames played.
gscharacterGames started.
actual_minutescharacterWhole minutes of actual playing time accumulated over the aggregated games.
actual_secondscharacterLeftover seconds of actual playing time beyond the whole minutes.
fgcharacterField goals made over the aggregated games.
fgacharacterField goal attempts.
fg_pctcharacterField goal percentage (0-1).
fg3characterThree-point field goals made over the aggregated games.
fg3_acharacterThree-point field goal attempts.
fg3_pctcharacterThree-point field goal percentage (0-1).
ftcharacterFree throws made over the aggregated games.
ftacharacterFree throw attempts.
ft_pctcharacterFree throw percentage (0-1).
off_rebcharacterOffensive rebounds over the aggregated games.
def_rebcharacterDefensive rebounds over the aggregated games.
tot_rebcharacterTotal rebounds over the aggregated games.
astcharacterAssists.
pfcharacterPersonal fouls.
dqcharacterDisqualifications (fouled out) over the aggregated games.
stlcharacterSteals.
turnoverscharacterTotal turnovers.
blkcharacterBlocks.
ptscharacterPoints scored.
max_actual_minutescharacterMost whole minutes played in any single aggregated game.
max_actual_secondscharacterSeconds component paired with the single-game maximum minutes.
max_rebcharacterMost rebounds recorded in any single aggregated game.
max_astcharacterMost assists recorded in any single aggregated game.
max_stlcharacterMost steals recorded in any single aggregated game.
max_turnoverscharacterMost turnovers recorded in any single aggregated game.
max_blkpcharacterMost blocked shots recorded in any single aggregated game.
max_ptscharacterMost points recorded in any single aggregated game.
avg_actual_minutescharacterAverage whole minutes played per aggregated game.
avg_actual_secondscharacterAverage seconds component of playing time per aggregated game.
avg_rebcharacterAverage rebounds per game over the aggregated games.
avg_astcharacterAverage assists per game over the aggregated games.
avg_stlcharacterAverage steals per game over the aggregated games.
avg_turnoverscharacterAverage turnovers per game over the aggregated games.
avg_blkpcharacterAverage blocked shots per game over the aggregated games.
avg_ptscharacterAverage points per game over the aggregated games.
per_min_rebcharacterRebounds per minute played over the aggregated games.
per_min_astcharacterAssists per minute played over the aggregated games.
per_min_stlcharacterSteals per minute played over the aggregated games.
per_min_turnoverscharacterTurnovers per minute played over the aggregated games.
per_min_blkcharacterBlocked shots per minute played over the aggregated games.
per_min_ptscharacterPoints per minute played over the aggregated games.

TotalTeamStats

col_nametypedescription
citycharacterVenue city.
nicknamecharacterTeam or athlete nickname.
team_idintegerUnique team identifier.
wintegerWins.
lintegerLosses.
w_homeinteger
l_homeinteger
w_roadinteger
l_roadinteger
team_turnoversintegerTeam turnovers (turnovers credited to the team rather than a player).
team_reboundsintegerTeam rebounds (rebounds credited to the team rather than a player).
gpintegerGames played.
gsintegerGames started.
actual_minutesintegerWhole minutes of actual playing time accumulated over the aggregated games.
actual_secondsintegerLeftover seconds of actual playing time beyond the whole minutes.
fgintegerField goals made over the aggregated games.
fgaintegerField goal attempts.
fg_pctnumericField goal percentage (0-1).
fg3integerThree-point field goals made over the aggregated games.
fg3_aintegerThree-point field goal attempts.
fg3_pctnumericThree-point field goal percentage (0-1).
ftintegerFree throws made over the aggregated games.
ftaintegerFree throw attempts.
ft_pctnumericFree throw percentage (0-1).
off_rebintegerOffensive rebounds over the aggregated games.
def_rebintegerDefensive rebounds over the aggregated games.
tot_rebintegerTotal rebounds over the aggregated games.
astintegerAssists.
pfintegerPersonal fouls.
stlintegerSteals.
total_turnoversintegerTotal turnovers (player + team).
blkintegerBlocks.
ptsintegerPoints scored.
avg_rebnumericAverage rebounds per game over the aggregated games.
avg_ptsnumericAverage points per game over the aggregated games.
dqintegerDisqualifications (fouled out) over the aggregated games.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nba_stats_cumestatsteam(league_id='00', season='2024-25')

Last validated n/a.

nba_stats_cumestatsteamgames​

GET /stats/cumestatsteamgames

Endpoint URL: GET https://stats.nba.com/stats/cumestatsteamgames

Valid URL: https://stats.nba.com/stats/cumestatsteamgames?LeagueID=00&Location=&Outcome=&Season=2024-25&SeasonID=&SeasonType=Regular+Season&TeamID=1610612739&VsConference=&VsDivision=&VsTeamID=0

API ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
Locationlocation_nullableY
Outcomeoutcome_nullableY
SeasonseasonYSeason label, e.g. 2024-25. Defaults at call time by a calendar cutoff, the month after a season's first games, so it can lag the newest rows by a few weeks. An NBA season tips off in late October and becomes the default in November (2025-26 through October 2026, 2026-27 from November 2026); a G League season (regular season from late December) in January; a Summer League (played in July, which stats.nba.com labels 2026-27 in 2026) in August; a draft combine (May) in June; a draft (drafthistory, a year; late June) in July. With season type Playoffs / PlayIn (or commonplayoffseries) the NBA and the G League roll over in May, after their playoffs start; with All Star the NBA rolls over in March, after the February game (the G League has no All-Star rows and keeps its own rule). A month table cannot follow a lockout or pandemic calendar (1998-99, 2011-12, 2020-21): pass a season then. Without one stats.nba.com answers an empty HTTP 500 or every season summed.
SeasonIDseason_id_nullableY
SeasonTypeseason_type_all_starYSeason type, a label: Regular Season, Pre Season, Playoffs, PlayIn or All Star (each endpoint takes a subset). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs / PlayIn roll over in May (NBA, G League), All Star in March (NBA).
TeamIDteam_idY
VsConferencevs_conference_nullableY
VsDivisionvs_division_nullableY
VsTeamIDvs_team_id_nullableY

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
matchupcharacterMatchup.
game_idcharacterUnique game identifier.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nba_stats_cumestatsteamgames(league_id='00', season='2024-25')

Last validated n/a.