Skip to main content

NBA — NBA Stats API (stats.nba.com) — Box scores: boxscoretraditionalv2–boxscoreusagev3

nba_stats_boxscoretraditionalv2​

Box score traditional v2.

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

Valid URL: https://stats.nba.com/stats/boxscoretraditionalv2?EndPeriod=14&EndRange=0&GameID=0022200021&RangeType=0&StartPeriod=0&StartRange=0

API ParameterPythonPatternRequiredNullableDescription
EndPeriodend_periodY
EndRangeend_rangeY
GameIDgame_idY
RangeTyperange_typeY
StartPeriodstart_periodY
StartRangestart_rangeY

Returns​

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

PlayerStats

col_nametypedescription
game_idStringUnique game identifier.
team_idInt64Unique team identifier.
team_abbreviationStringShort team abbreviation (e.g. 'LAS').
team_cityStringTeam city or region (e.g. 'Las Vegas').
player_idInt64Unique player identifier.
player_nameStringPlayer name.
nicknameStringTeam or athlete nickname.
start_positionStringPosition the player started the game at (F, C, or G); empty for reserves.
commentStringPlayer status / inactive reason (e.g. 'DNP - Coach's Decision', 'Inactive').
minStringMinutes played.
fgmInt64Field goals made.
fgaInt64Field goal attempts.
fg_pctFloat64Field goal percentage (0-1).
fg3_mInt64Three-point field goals made.
fg3_aInt64Three-point field goal attempts.
fg3_pctFloat64Three-point field goal percentage (0-1).
ftmInt64Free throws made.
ftaInt64Free throw attempts.
ft_pctFloat64Free throw percentage (0-1).
orebInt64Offensive rebounds.
drebInt64Defensive rebounds.
rebInt64Rebounds per game.
astInt64Assists.
stlInt64Steals.
blkInt64Blocks.
toInt64To.
pfInt64Personal fouls.
ptsInt64Points scored.
plus_minusInt64Plus/minus point differential while on court.

TeamStats

col_nametypedescription
game_idStringUnique game identifier.
team_idInt64Unique team identifier.
team_nameStringFull team display name (e.g. 'Las Vegas Aces').
team_abbreviationStringShort team abbreviation (e.g. 'LAS').
team_cityStringTeam city or region (e.g. 'Las Vegas').
minStringMinutes played.
fgmInt64Field goals made.
fgaInt64Field goal attempts.
fg_pctFloat64Field goal percentage (0-1).
fg3_mInt64Three-point field goals made.
fg3_aInt64Three-point field goal attempts.
fg3_pctFloat64Three-point field goal percentage (0-1).
ftmInt64Free throws made.
ftaInt64Free throw attempts.
ft_pctFloat64Free throw percentage (0-1).
orebInt64Offensive rebounds.
drebInt64Defensive rebounds.
rebInt64Rebounds per game.
astInt64Assists.
stlInt64Steals.
blkInt64Blocks.
toInt64To.
pfInt64Personal fouls.
ptsInt64Points scored.
plus_minusInt64Plus/minus point differential while on court.

TeamStarterBenchStats

col_nametypedescription
game_idStringUnique game identifier.
team_idInt64Unique team identifier.
team_nameStringFull team display name (e.g. 'Las Vegas Aces').
team_abbreviationStringShort team abbreviation (e.g. 'LAS').
team_cityStringTeam city or region (e.g. 'Las Vegas').
starters_benchString
minStringMinutes played.
fgmInt64Field goals made.
fgaInt64Field goal attempts.
fg_pctFloat64Field goal percentage (0-1).
fg3_mInt64Three-point field goals made.
fg3_aInt64Three-point field goal attempts.
fg3_pctFloat64Three-point field goal percentage (0-1).
ftmInt64Free throws made.
ftaInt64Free throw attempts.
ft_pctFloat64Free throw percentage (0-1).
orebInt64Offensive rebounds.
drebInt64Defensive rebounds.
rebInt64Rebounds per game.
astInt64Assists.
stlInt64Steals.
blkInt64Blocks.
toInt64To.
pfInt64Personal fouls.
ptsInt64Points scored.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.
ImportErrorcurl_cffi is not installed -- stats.nba.com / stats.wnba.com block plain requests, so the transport needs it (pip install curl_cffi or sportsdataverse[all]).

Example​

nba_stats_boxscoretraditionalv2()

nba_stats_boxscoretraditionalv3​

Box score traditional v3.

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

Valid URL: https://stats.nba.com/stats/boxscoretraditionalv3?EndPeriod=14&EndRange=0&GameID=0022200021&RangeType=0&StartPeriod=0&StartRange=0

API ParameterPythonPatternRequiredNullableDescription
EndPeriodend_periodY
EndRangeend_rangeY
GameIDgame_idY
RangeTyperange_typeY
StartPeriodstart_periodY
StartRangestart_rangeY

Returns​

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

PlayerStats

col_nametypedescription
game_idStringUnique 10-character game identifier from the league's stats API.
away_team_idInt64Unique identifier for the away team.
home_team_idInt64Unique identifier for the home team.
team_idInt64Unique team identifier.
team_cityStringTeam city or region (e.g. 'Las Vegas').
team_nameStringFull team display name (e.g. 'Las Vegas Aces').
team_tricodeStringThree-letter team abbreviation.
team_slugStringURL-friendly slug for the team name.
person_idInt64Player identifier from the league's stats API.
first_nameStringPlayer's first name.
family_nameStringPlayer's family (last) name.
name_iStringAbbreviated player name (first initial and last name).
player_slugStringURL-friendly slug for the player's name.
positionStringListed roster position (G, F, C, etc.).
commentStringPlayer status / inactive reason (e.g. 'DNP - Coach's Decision', 'Inactive').
jersey_numStringPlayer's jersey number.
minutesStringMinutes played, formatted MM:SS (V3 PT-duration parsed) or decimal minutes (V2).
field_goals_madeInt64Field goals made recorded in the game.
field_goals_attemptedInt64Field goal attempts recorded in the game.
field_goals_percentageFloat64Field goal percentage for the game, as a decimal.
three_pointers_madeInt64Three-pointers made recorded in the game.
three_pointers_attemptedInt64Three-point attempts recorded in the game.
three_pointers_percentageFloat64Three-point percentage for the game, as a decimal.
free_throws_madeInt64Free throws made recorded in the game.
free_throws_attemptedInt64Free throw attempts recorded in the game.
free_throws_percentageFloat64Free throw percentage for the game, as a decimal.
rebounds_offensiveInt64Offensive rebounds recorded in the game.
rebounds_defensiveInt64Defensive rebounds recorded in the game.
rebounds_totalInt64Total rebounds recorded in the game.
assistsInt64Total assists.
stealsInt64Total steals.
blocksInt64Total blocks.
turnoversInt64Total turnovers.
fouls_personalInt64Personal fouls recorded in the game.
pointsInt64Points scored.
plus_minus_pointsFloat64Team point differential while the player was on the floor (plus-minus).

TeamStats

col_nametypedescription
game_idStringUnique 10-character game identifier from the league's stats API.
away_team_idInt64Unique identifier for the away team.
home_team_idInt64Unique identifier for the home team.
team_idInt64Unique team identifier.
team_cityStringTeam city or region (e.g. 'Las Vegas').
team_nameStringFull team display name (e.g. 'Las Vegas Aces').
team_tricodeStringThree-letter team abbreviation.
team_slugStringURL-friendly slug for the team name.
minutesStringMinutes played, formatted MM:SS (V3 PT-duration parsed) or decimal minutes (V2).
field_goals_madeInt64Field goals made recorded in the game.
field_goals_attemptedInt64Field goal attempts recorded in the game.
field_goals_percentageFloat64Field goal percentage for the game, as a decimal.
three_pointers_madeInt64Three-pointers made recorded in the game.
three_pointers_attemptedInt64Three-point attempts recorded in the game.
three_pointers_percentageFloat64Three-point percentage for the game, as a decimal.
free_throws_madeInt64Free throws made recorded in the game.
free_throws_attemptedInt64Free throw attempts recorded in the game.
free_throws_percentageFloat64Free throw percentage for the game, as a decimal.
rebounds_offensiveInt64Offensive rebounds recorded in the game.
rebounds_defensiveInt64Defensive rebounds recorded in the game.
rebounds_totalInt64Total rebounds recorded in the game.
assistsInt64Total assists.
stealsInt64Total steals.
blocksInt64Total blocks.
turnoversInt64Total turnovers.
fouls_personalInt64Personal fouls recorded in the game.
pointsInt64Points scored.
plus_minus_pointsFloat64Team point differential while the player was on the floor (plus-minus).

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.
ImportErrorcurl_cffi is not installed -- stats.nba.com / stats.wnba.com block plain requests, so the transport needs it (pip install curl_cffi or sportsdataverse[all]).

Example​

nba_stats_boxscoretraditionalv3()

nba_stats_boxscoreusagev3​

Box score usage v3.

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

Valid URL: https://stats.nba.com/stats/boxscoreusagev3?EndPeriod=14&EndRange=0&GameID=0022200021&RangeType=0&StartPeriod=0&StartRange=0

API ParameterPythonPatternRequiredNullableDescription
EndPeriodend_periodY
EndRangeend_rangeY
GameIDgame_idY
RangeTyperange_typeY
StartPeriodstart_periodY
StartRangestart_rangeY

Returns​

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

PlayerStats

col_nametypedescription
game_idStringUnique 10-character game identifier from the league's stats API.
away_team_idInt64Unique identifier for the away team.
home_team_idInt64Unique identifier for the home team.
team_idInt64Unique team identifier.
team_cityStringTeam city or region (e.g. 'Las Vegas').
team_nameStringFull team display name (e.g. 'Las Vegas Aces').
team_tricodeStringThree-letter team abbreviation.
team_slugStringURL-friendly slug for the team name.
person_idInt64Player identifier from the league's stats API.
first_nameStringPlayer's first name.
family_nameStringPlayer's family (last) name.
name_iStringAbbreviated player name (first initial and last name).
player_slugStringURL-friendly slug for the player's name.
positionStringListed roster position (G, F, C, etc.).
commentStringPlayer status / inactive reason (e.g. 'DNP - Coach's Decision', 'Inactive').
jersey_numStringPlayer's jersey number.
minutesStringMinutes played, formatted MM:SS (V3 PT-duration parsed) or decimal minutes (V2).
usage_percentageFloat64Percentage of team plays used by the player while on the floor, as a decimal.
percentage_field_goals_madeFloat64Share of the team's field goals made accounted for by the player while on the floor, as a decimal.
percentage_field_goals_attemptedFloat64Share of the team's field goal attempts accounted for by the player while on the floor, as a decimal.
percentage_three_pointers_madeFloat64Share of the team's three-pointers made accounted for by the player while on the floor, as a decimal.
percentage_three_pointers_attemptedFloat64Share of the team's three-point attempts accounted for by the player while on the floor, as a decimal.
percentage_free_throws_madeFloat64Share of the team's free throws made accounted for by the player while on the floor, as a decimal.
percentage_free_throws_attemptedFloat64Share of the team's free throw attempts accounted for by the player while on the floor, as a decimal.
percentage_rebounds_offensiveFloat64Share of the team's offensive rebounds accounted for by the player while on the floor, as a decimal.
percentage_rebounds_defensiveFloat64Share of the team's defensive rebounds accounted for by the player while on the floor, as a decimal.
percentage_rebounds_totalFloat64Share of the team's total rebounds accounted for by the player while on the floor, as a decimal.
percentage_assistsFloat64Share of the team's assists accounted for by the player while on the floor, as a decimal.
percentage_turnoversFloat64Share of the team's turnovers accounted for by the player while on the floor, as a decimal.
percentage_stealsFloat64Share of the team's steals accounted for by the player while on the floor, as a decimal.
percentage_blocksFloat64Share of the team's blocked shots accounted for by the player while on the floor, as a decimal.
percentage_blocks_allowedFloat64Share of the team's shot attempts blocked by opponents accounted for by the player while on the floor, as a decimal.
percentage_personal_foulsFloat64Share of the team's personal fouls accounted for by the player while on the floor, as a decimal.
percentage_personal_fouls_drawnFloat64Share of the team's personal fouls drawn accounted for by the player while on the floor, as a decimal.
percentage_pointsFloat64Share of the team's points accounted for by the player while on the floor, as a decimal.

TeamStats

col_nametypedescription
game_idStringUnique 10-character game identifier from the league's stats API.
away_team_idInt64Unique identifier for the away team.
home_team_idInt64Unique identifier for the home team.
team_idInt64Unique team identifier.
team_cityStringTeam city or region (e.g. 'Las Vegas').
team_nameStringFull team display name (e.g. 'Las Vegas Aces').
team_tricodeStringThree-letter team abbreviation.
team_slugStringURL-friendly slug for the team name.
minutesStringMinutes played, formatted MM:SS (V3 PT-duration parsed) or decimal minutes (V2).
usage_percentageFloat64Percentage of team plays used by the player while on the floor, as a decimal.
percentage_field_goals_madeFloat64Share of the team's field goals made accounted for by the player while on the floor, as a decimal.
percentage_field_goals_attemptedFloat64Share of the team's field goal attempts accounted for by the player while on the floor, as a decimal.
percentage_three_pointers_madeFloat64Share of the team's three-pointers made accounted for by the player while on the floor, as a decimal.
percentage_three_pointers_attemptedFloat64Share of the team's three-point attempts accounted for by the player while on the floor, as a decimal.
percentage_free_throws_madeFloat64Share of the team's free throws made accounted for by the player while on the floor, as a decimal.
percentage_free_throws_attemptedFloat64Share of the team's free throw attempts accounted for by the player while on the floor, as a decimal.
percentage_rebounds_offensiveFloat64Share of the team's offensive rebounds accounted for by the player while on the floor, as a decimal.
percentage_rebounds_defensiveFloat64Share of the team's defensive rebounds accounted for by the player while on the floor, as a decimal.
percentage_rebounds_totalFloat64Share of the team's total rebounds accounted for by the player while on the floor, as a decimal.
percentage_assistsFloat64Share of the team's assists accounted for by the player while on the floor, as a decimal.
percentage_turnoversFloat64Share of the team's turnovers accounted for by the player while on the floor, as a decimal.
percentage_stealsFloat64Share of the team's steals accounted for by the player while on the floor, as a decimal.
percentage_blocksFloat64Share of the team's blocked shots accounted for by the player while on the floor, as a decimal.
percentage_blocks_allowedFloat64Share of the team's shot attempts blocked by opponents accounted for by the player while on the floor, as a decimal.
percentage_personal_foulsFloat64Share of the team's personal fouls accounted for by the player while on the floor, as a decimal.
percentage_personal_fouls_drawnFloat64Share of the team's personal fouls drawn accounted for by the player while on the floor, as a decimal.
percentage_pointsFloat64Share of the team's points accounted for by the player while on the floor, as a decimal.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.
ImportErrorcurl_cffi is not installed -- stats.nba.com / stats.wnba.com block plain requests, so the transport needs it (pip install curl_cffi or sportsdataverse[all]).

Example​

nba_stats_boxscoreusagev3()