Skip to main content

NBA G League — G League Stats API (stats.nba.com, LeagueID=20) — Box scores: boxscoretraditionalv2–boxscoreusagev3

nbagl_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=2022500137&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_idString
team_idInt64
team_abbreviationString
team_cityString
player_idInt64
player_nameString
nicknameString
start_positionStringPosition the player started the game at (F, C, or G); empty for reserves.
commentString
minString
fgmInt64
fgaInt64
fg_pctFloat64
fg3_mInt64Three-point field goals made.
fg3_aInt64Three-point field goal attempts.
fg3_pctFloat64
ftmInt64
ftaInt64
ft_pctFloat64
orebInt64
drebInt64
rebInt64
astInt64
stlInt64
blkInt64
toInt64
pfInt64
ptsInt64
plus_minusInt64

TeamStats

col_nametypedescription
game_idString
team_idInt64
team_nameString
team_abbreviationString
team_cityString
minString
fgmInt64
fgaInt64
fg_pctFloat64
fg3_mInt64Three-point field goals made.
fg3_aInt64Three-point field goal attempts.
fg3_pctFloat64
ftmInt64
ftaInt64
ft_pctFloat64
orebInt64
drebInt64
rebInt64
astInt64
stlInt64
blkInt64
toInt64
pfInt64
ptsInt64
plus_minusInt64

TeamStarterBenchStats

col_nametypedescription
game_idString
team_idInt64
team_nameString
team_abbreviationString
team_cityString
starters_benchString
minString
fgmInt64
fgaInt64
fg_pctFloat64
fg3_mInt64Three-point field goals made.
fg3_aInt64Three-point field goal attempts.
fg3_pctFloat64
ftmInt64
ftaInt64
ft_pctFloat64
orebInt64
drebInt64
rebInt64
astInt64
stlInt64
blkInt64
toInt64
pfInt64
ptsInt64

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​

nbagl_stats_boxscoretraditionalv2()

nbagl_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=2022500137&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_idInt64
home_team_idInt64
team_idInt64
team_cityString
team_nameString
team_tricodeStringThree-letter team abbreviation.
team_slugStringURL-friendly slug for the team name.
person_idInt64Player identifier from the league's stats API.
first_nameString
family_nameStringPlayer's family (last) name.
name_iStringAbbreviated player name (first initial and last name).
player_slugStringURL-friendly slug for the player's name.
positionString
commentString
jersey_numStringPlayer's jersey number.
minutesString
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.
assistsInt64
stealsInt64
blocksInt64
turnoversInt64
fouls_personalInt64Personal fouls recorded in the game.
pointsInt64
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_idInt64
home_team_idInt64
team_idInt64
team_cityString
team_nameString
team_tricodeStringThree-letter team abbreviation.
team_slugStringURL-friendly slug for the team name.
minutesString
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.
assistsInt64
stealsInt64
blocksInt64
turnoversInt64
fouls_personalInt64Personal fouls recorded in the game.
pointsInt64
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​

nbagl_stats_boxscoretraditionalv3()

nbagl_stats_boxscoreusagev2​

Box score usage v2.

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

Valid URL: https://stats.nba.com/stats/boxscoreusagev2?EndPeriod=14&EndRange=0&GameID=2022500137&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 (sqlPlayersUsage, sqlTeamsUsage) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

sqlPlayersUsage

col_nametypedescription
game_idString
team_idInt64
team_abbreviationString
team_cityString
player_idInt64
player_nameString
nicknameString
start_positionStringPosition the player started the game at ('F', 'C', or 'G'); empty for bench players.
commentString
minString
usg_pctFloat64Percentage of team plays used while on the floor.
pct_fgmFloat64Share of the team's field goals made accounted for while on the floor.
pct_fgaFloat64Share of the team's field goal attempts accounted for while on the floor.
pct_fg3_mFloat64Share of the team's made three-pointers accounted for while on the floor.
pct_fg3_aFloat64Share of the team's three-point attempts accounted for while on the floor.
pct_ftmFloat64Share of the team's made free throws accounted for while on the floor.
pct_ftaFloat64Share of the team's free throw attempts accounted for while on the floor.
pct_orebFloat64Share of the team's offensive rebounds accounted for while on the floor.
pct_drebFloat64Share of the team's defensive rebounds accounted for while on the floor.
pct_rebFloat64Share of the team's total rebounds accounted for while on the floor.
pct_astFloat64Share of the team's assists accounted for while on the floor.
pct_tovFloat64Share of the team's turnovers accounted for while on the floor.
pct_stlFloat64Share of the team's steals accounted for while on the floor.
pct_blkFloat64Share of the team's blocks accounted for while on the floor.
pct_blkaFloat64Share of the team's blocked own attempts accounted for while on the floor.
pct_pfFloat64Share of the team's personal fouls accounted for while on the floor.
pct_pfdFloat64Share of the team's personal fouls drawn accounted for while on the floor.
pct_ptsFloat64Share of the team's points accounted for while on the floor.

sqlTeamsUsage

col_nametypedescription
game_idString
team_idInt64
team_nameString
team_abbreviationString
team_cityString
minString
usg_pctFloat64Percentage of team plays used while on the floor.
pct_fgmFloat64Share of the team's field goals made accounted for while on the floor.
pct_fgaFloat64Share of the team's field goal attempts accounted for while on the floor.
pct_fg3_mFloat64Share of the team's made three-pointers accounted for while on the floor.
pct_fg3_aFloat64Share of the team's three-point attempts accounted for while on the floor.
pct_ftmFloat64Share of the team's made free throws accounted for while on the floor.
pct_ftaFloat64Share of the team's free throw attempts accounted for while on the floor.
pct_orebFloat64Share of the team's offensive rebounds accounted for while on the floor.
pct_drebFloat64Share of the team's defensive rebounds accounted for while on the floor.
pct_rebFloat64Share of the team's total rebounds accounted for while on the floor.
pct_astFloat64Share of the team's assists accounted for while on the floor.
pct_tovFloat64Share of the team's turnovers accounted for while on the floor.
pct_stlFloat64Share of the team's steals accounted for while on the floor.
pct_blkFloat64Share of the team's blocks accounted for while on the floor.
pct_blkaFloat64Share of the team's blocked own attempts accounted for while on the floor.
pct_pfFloat64Share of the team's personal fouls accounted for while on the floor.
pct_pfdFloat64Share of the team's personal fouls drawn accounted for while on the floor.
pct_ptsFloat64Share of the team's points accounted for while on the floor.

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​

nbagl_stats_boxscoreusagev2()

nbagl_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=2022500137&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_idInt64
home_team_idInt64
team_idInt64
team_cityString
team_nameString
team_tricodeStringThree-letter team abbreviation.
team_slugStringURL-friendly slug for the team name.
person_idInt64Player identifier from the league's stats API.
first_nameString
family_nameStringPlayer's family (last) name.
name_iStringAbbreviated player name (first initial and last name).
player_slugStringURL-friendly slug for the player's name.
positionString
commentString
jersey_numStringPlayer's jersey number.
minutesString
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_idInt64
home_team_idInt64
team_idInt64
team_cityString
team_nameString
team_tricodeStringThree-letter team abbreviation.
team_slugStringURL-friendly slug for the team name.
minutesString
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​

nbagl_stats_boxscoreusagev3()