Skip to main content

NBA G League — G League Stats API (stats.nba.com, LeagueID=20) — Player: playercareerstats–playerindex

nbagl_stats_playercareerstats​

Player career stats.

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

Valid URL: https://stats.nba.com/stats/playercareerstats?LeagueID=20&PerMode=Totals&PlayerID=1642443

API ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
PerModeper_mode36Y
PlayerIDplayer_idY

Returns​

return_parsed=True (default) — A dict of DataFrames keyed by result-set name (SeasonTotalsRegularSeason, CareerTotalsRegularSeason, SeasonTotalsPostSeason, CareerTotalsPostSeason, SeasonTotalsAllStarSeason, CareerTotalsAllStarSeason, SeasonTotalsCollegeSeason, CareerTotalsCollegeSeason, SeasonTotalsShowcaseSeason, CareerTotalsShowcaseSeason, SeasonRankingsRegularSeason, SeasonRankingsPostSeason, SeasonHighs, CareerHighs) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

SeasonTotalsRegularSeason

col_nametypedescription
player_idInt64
season_idString
league_idString
team_idInt64
team_abbreviationString
player_ageFloat64NBA or WNBA Stats value for player age in the playercareerstats result set.
gpInt64
gsInt64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
stlFloat64
blkFloat64
tovFloat64
pfFloat64
ptsFloat64

CareerTotalsRegularSeason

col_nametypedescription
player_idInt64
league_idString
team_idInt64
gpInt64
gsInt64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
stlFloat64
blkFloat64
tovFloat64
pfFloat64
ptsFloat64

SeasonTotalsPostSeason

col_nametypedescription
player_idInt64
season_idString
league_idString
team_idInt64
team_abbreviationString
player_ageFloat64NBA or WNBA Stats value for player age in the playercareerstats result set.
gpInt64
gsInt64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
stlFloat64
blkFloat64
tovFloat64
pfFloat64
ptsFloat64

CareerTotalsPostSeason

col_nametypedescription
player_idInt64
league_idString
team_idInt64
gpInt64
gsInt64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
stlFloat64
blkFloat64
tovFloat64
pfFloat64
ptsFloat64

SeasonTotalsAllStarSeason

col_nametypedescription
player_idInt64
season_idString
league_idString
team_idInt64
team_abbreviationString
player_ageFloat64NBA or WNBA Stats value for player age in the playercareerstats result set.
gpInt64
gsInt64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
stlFloat64
blkFloat64
tovFloat64
pfFloat64
ptsFloat64

CareerTotalsAllStarSeason

col_nametypedescription
player_idInt64
league_idString
team_idInt64
gpInt64
gsInt64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
stlFloat64
blkFloat64
tovFloat64
pfFloat64
ptsFloat64

SeasonTotalsCollegeSeason

col_nametypedescription
player_idString
season_idString
league_idString
organization_idString
school_nameStringCollege or school of the season row (SeasonTotalsCollegeSeason set).
player_ageStringNBA or WNBA Stats value for player age in the playercareerstats result set.
gpString
gsString
minString
fgmString
fgaString
fg_pctString
fg3_mStringThree-point field goals made.
fg3_aStringThree-point field goal attempts.
fg3_pctString
ftmString
ftaString
ft_pctString
orebString
drebString
rebString
astString
stlString
blkString
tovString
pfString
ptsString

CareerTotalsCollegeSeason

col_nametypedescription
player_idString
league_idString
organization_idString
gpString
gsString
minString
fgmString
fgaString
fg_pctString
fg3_mStringThree-point field goals made.
fg3_aStringThree-point field goal attempts.
fg3_pctString
ftmString
ftaString
ft_pctString
orebString
drebString
rebString
astString
stlString
blkString
tovString
pfString
ptsString

SeasonTotalsShowcaseSeason

col_nametypedescription
player_idInt64
season_idString
league_idString
team_idInt64
team_abbreviationString
player_ageFloat64NBA or WNBA Stats value for player age in the playercareerstats result set.
gpInt64
gsInt64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
stlFloat64
blkFloat64
tovFloat64
pfFloat64
ptsFloat64

CareerTotalsShowcaseSeason

col_nametypedescription
player_idInt64
league_idString
team_idInt64
gpInt64
gsInt64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
stlFloat64
blkFloat64
tovFloat64
pfFloat64
ptsFloat64

SeasonRankingsRegularSeason

col_nametypedescription
player_idInt64
season_idString
league_idString
team_idInt64
team_abbreviationString
player_ageStringNBA or WNBA Stats value for player age in the playercareerstats result set.
gpString
gsString
rank_pg_minInt64
rank_pg_fgmInt64
rank_pg_fgaInt64
rank_fg_pctInt64
rank_pg_fg3_mInt64
rank_pg_fg3_aInt64
rank_fg3_pctInt64
rank_pg_ftmInt64
rank_pg_ftaInt64
rank_ft_pctInt64
rank_pg_orebInt64
rank_pg_drebInt64
rank_pg_rebInt64
rank_pg_astInt64
rank_pg_stlInt64
rank_pg_blkInt64
rank_pg_tovInt64
rank_pg_ptsInt64
rank_pg_effInt64

SeasonRankingsPostSeason

col_nametypedescription
player_idInt64
season_idString
league_idString
team_idInt64
team_abbreviationString
player_ageStringNBA or WNBA Stats value for player age in the playercareerstats result set.
gpString
gsString
rank_pg_minInt64
rank_pg_fgmInt64
rank_pg_fgaInt64
rank_fg_pctInt64
rank_pg_fg3_mInt64
rank_pg_fg3_aInt64
rank_fg3_pctString
rank_pg_ftmInt64
rank_pg_ftaInt64
rank_ft_pctInt64
rank_pg_orebInt64
rank_pg_drebInt64
rank_pg_rebInt64
rank_pg_astInt64
rank_pg_stlInt64
rank_pg_blkInt64
rank_pg_tovInt64
rank_pg_ptsInt64
rank_pg_effInt64

SeasonHighs

col_nametypedescription
player_idInt64
game_dateString
vs_team_idInt64
vs_team_cityString
vs_team_nameString
vs_team_abbreviationString
statString
stats_valueInt64
stat_orderInt64
date_estString

CareerHighs

col_nametypedescription
player_idInt64
game_dateString
vs_team_idInt64
vs_team_cityString
vs_team_nameString
vs_team_abbreviationString
statString
stats_valueInt64
stat_orderInt64
date_estString

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_playercareerstats(league_id='20')

nbagl_stats_playerestimatedmetrics​

Player estimated metrics.

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

Valid URL: https://stats.nba.com/stats/playerestimatedmetrics?LeagueID=20&Season=2024-25&SeasonType=Regular+Season

API ParameterPythonPatternRequiredNullableDescription
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. A G League regular season starts in late December and becomes the default in January (2025-26 from January 2026); a draft combine (May) in June. With season type Playoffs (or commonplayoffseries) it rolls over in May, after the late-March playoffs start; the G League has no All-Star rows. A month table cannot follow a lockout or pandemic calendar: pass a season then. Without one stats.nba.com answers an empty HTTP 500 or every season summed.
SeasonTypeseason_typeYSeason type, a label: Regular Season, Pre Season or Playoffs (each endpoint takes a subset; the G League has no All Star rows). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs rolls over in May.

Returns​

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

col_nametypedescription
player_idInt64
player_nameString
gpInt64
wInt64
lInt64
w_pctFloat64
minFloat64
e_off_ratingFloat64Estimated offensive rating for the requested NBA or WNBA Stats split.
e_def_ratingFloat64Estimated defensive rating for the requested NBA or WNBA Stats split.
e_net_ratingFloat64Estimated net rating for the requested NBA or WNBA Stats split.
e_ast_ratioFloat64Estimated assist ratio for the requested NBA or WNBA Stats split.
e_oreb_pctFloat64Estimated offensive rebound percentage for the requested NBA or WNBA Stats split.
e_dreb_pctFloat64Estimated defensive rebound percentage for the requested NBA or WNBA Stats split.
e_reb_pctFloat64Estimated rebound percentage for the requested NBA or WNBA Stats split.
e_tov_pctFloat64Estimated turnovers percentage for the requested NBA or WNBA Stats split.
e_usg_pctFloat64Estimated usage percentage for the requested NBA or WNBA Stats split.
e_paceFloat64Estimated pace for the requested NBA or WNBA Stats split.
gp_rankInt64Rank for games played within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
w_rankInt64Rank for wins within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
l_rankInt64Rank for losses within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
w_pct_rankInt64Rank for winning percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
min_rankInt64Rank for minutes played within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_off_rating_rankInt64Rank for e offensive rating within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_def_rating_rankInt64Rank for e defensive rating within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_net_rating_rankInt64Rank for e net rating within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_ast_ratio_rankInt64Rank for e assists ratio within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_oreb_pct_rankInt64Rank for e offensive rebounds percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_dreb_pct_rankInt64Rank for e defensive rebounds percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_reb_pct_rankInt64Rank for e rebounds percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_tov_pct_rankInt64Rank for e turnovers percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_usg_pct_rankInt64Rank for e usage percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
e_pace_rankInt64Rank for e pace within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.

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_playerestimatedmetrics(league_id='20', season='2024-25')

nbagl_stats_playerfantasyprofile​

Player fantasy profile.

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

Valid URL: https://stats.nba.com/stats/playerfantasyprofile?LeagueID=20&MeasureType=Base&PaceAdjust=N&PerMode=Totals&PlayerID=1642443&PlusMinus=N&Rank=N&Season=2024-25&SeasonType=Regular+Season

API ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
MeasureTypemeasure_typeY
PaceAdjustpace_adjustY
PerModeper_modeY
PlayerIDplayer_idY
PlusMinusplus_minusY
RankrankY
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. A G League regular season starts in late December and becomes the default in January (2025-26 from January 2026); a draft combine (May) in June. With season type Playoffs (or commonplayoffseries) it rolls over in May, after the late-March playoffs start; the G League has no All-Star rows. A month table cannot follow a lockout or pandemic calendar: pass a season then. Without one stats.nba.com answers an empty HTTP 500 or every season summed.
SeasonTypeseason_typeYSeason type, a label: Regular Season, Pre Season or Playoffs (each endpoint takes a subset; the G League has no All Star rows). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs rolls over in May.

Returns​

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

Overall

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
group_valueStringValue of the split within the group (e.g. a specific opponent, month, or result).
gpInt64
wInt64
lInt64
w_pctFloat64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
tovFloat64
stlFloat64
blkFloat64
blkaFloat64Shot attempts blocked by opponents (blocks against).
pfFloat64
pfdFloat64Personal fouls drawn.
ptsFloat64
plus_minusFloat64
dd2Int64Double-doubles recorded over the split.
td3Int64Triple-doubles recorded over the split.
fan_duel_ptsFloat64Fantasy points under FanDuel's scoring formula.
nba_fantasy_ptsFloat64Fantasy points under the NBA's fantasy scoring formula.

Location

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
group_valueStringValue of the split within the group (e.g. a specific opponent, month, or result).
gpInt64
wInt64
lInt64
w_pctFloat64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
tovFloat64
stlFloat64
blkFloat64
blkaFloat64Shot attempts blocked by opponents (blocks against).
pfFloat64
pfdFloat64Personal fouls drawn.
ptsFloat64
plus_minusFloat64
dd2Int64Double-doubles recorded over the split.
td3Int64Triple-doubles recorded over the split.
fan_duel_ptsFloat64Fantasy points under FanDuel's scoring formula.
nba_fantasy_ptsFloat64Fantasy points under the NBA's fantasy scoring formula.

LastNGames

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
group_valueStringValue of the split within the group (e.g. a specific opponent, month, or result).
gpInt64
wInt64
lInt64
w_pctFloat64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
tovFloat64
stlFloat64
blkFloat64
blkaFloat64Shot attempts blocked by opponents (blocks against).
pfFloat64
pfdFloat64Personal fouls drawn.
ptsFloat64
plus_minusFloat64
dd2Int64Double-doubles recorded over the split.
td3Int64Triple-doubles recorded over the split.
fan_duel_ptsFloat64Fantasy points under FanDuel's scoring formula.
nba_fantasy_ptsFloat64Fantasy points under the NBA's fantasy scoring formula.

DaysRestModified

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
group_valueStringValue of the split within the group (e.g. a specific opponent, month, or result).
season_yearString
gpInt64
wInt64
lInt64
w_pctFloat64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
tovFloat64
stlFloat64
blkFloat64
blkaFloat64Shot attempts blocked by opponents (blocks against).
pfFloat64
pfdFloat64Personal fouls drawn.
ptsFloat64
plus_minusFloat64
dd2Int64Double-doubles recorded over the split.
td3Int64Triple-doubles recorded over the split.
fan_duel_ptsFloat64Fantasy points under FanDuel's scoring formula.
nba_fantasy_ptsFloat64Fantasy points under the NBA's fantasy scoring formula.

Opponent

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
group_valueStringValue of the split within the group (e.g. a specific opponent, month, or result).
gpInt64
wInt64
lInt64
w_pctFloat64
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
tovFloat64
stlFloat64
blkFloat64
blkaFloat64Shot attempts blocked by opponents (blocks against).
pfFloat64
pfdFloat64Personal fouls drawn.
ptsFloat64
plus_minusFloat64
dd2Int64Double-doubles recorded over the split.
td3Int64Triple-doubles recorded over the split.
fan_duel_ptsFloat64Fantasy points under FanDuel's scoring formula.
nba_fantasy_ptsFloat64Fantasy points under the NBA's fantasy scoring formula.

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_playerfantasyprofile(league_id='20', season='2024-25')

nbagl_stats_playerfantasyprofilebargraph​

Player fantasy profile bar graph.

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

Valid URL: https://stats.nba.com/stats/playerfantasyprofilebargraph?LeagueID=20&PlayerID=1642443&Season=2024-25&SeasonType=Regular+Season

API ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
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. A G League regular season starts in late December and becomes the default in January (2025-26 from January 2026); a draft combine (May) in June. With season type Playoffs (or commonplayoffseries) it rolls over in May, after the late-March playoffs start; the G League has no All-Star rows. A month table cannot follow a lockout or pandemic calendar: pass a season then. Without one stats.nba.com answers an empty HTTP 500 or every season summed.
SeasonTypeseason_type_all_star_nullableYSeason type, a label: Regular Season, Pre Season or Playoffs (each endpoint takes a subset; the G League has no All Star rows). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs rolls over in May.

Returns​

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

SeasonAvg

col_nametypedescription
player_idInt64
player_nameString
team_idInt64
team_abbreviationString
fan_duel_ptsFloat64Scoring or score-margin metric for fan duel points in the requested NBA or WNBA Stats split.
nba_fantasy_ptsFloat64Nba fantasy points for the requested NBA or WNBA Stats split.
ptsFloat64
rebFloat64
astFloat64
fg3_mFloat64Three-point field goals made.
ft_pctFloat64
stlFloat64
blkFloat64
tovFloat64
fg_pctFloat64

LastFiveGamesAvg

col_nametypedescription
player_idInt64
player_nameString
team_idInt64
team_abbreviationString
fan_duel_ptsFloat64Scoring or score-margin metric for fan duel points in the requested NBA or WNBA Stats split.
nba_fantasy_ptsFloat64Nba fantasy points for the requested NBA or WNBA Stats split.
ptsFloat64
rebFloat64
astFloat64
fg3_mFloat64Three-point field goals made.
ft_pctFloat64
stlFloat64
blkFloat64
tovFloat64
fg_pctFloat64

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_playerfantasyprofilebargraph(league_id='20', season='2024-25')

nbagl_stats_playergamelog​

Player game log.

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

Valid URL: https://stats.nba.com/stats/playergamelog?DateFrom=&DateTo=&LeagueID=20&PlayerID=1642443&Season=2024-25&SeasonType=Regular+Season

API ParameterPythonPatternRequiredNullableDescription
DateFromdate_from_nullableY
DateTodate_to_nullableY
LeagueIDleague_idY
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. A G League regular season starts in late December and becomes the default in January (2025-26 from January 2026); a draft combine (May) in June. With season type Playoffs (or commonplayoffseries) it rolls over in May, after the late-March playoffs start; the G League has no All-Star rows. A month table cannot follow a lockout or pandemic calendar: 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 or Playoffs (each endpoint takes a subset; the G League has no All Star rows). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs rolls over in May.

Returns​

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

col_nametypedescription
season_idString
player_idInt64
game_idString
game_dateString
matchupString
wlString
minInt64
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
tovInt64
pfInt64
ptsInt64
plus_minusInt64
video_availableInt64

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_playergamelog(league_id='20', season='2024-25')

nbagl_stats_playergamelogs​

Player game logs.

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

Valid URL: https://stats.nba.com/stats/playergamelogs?DateFrom=&DateTo=&GameSegment=&LastNGames=0&LeagueID=20&Location=&MeasureType=Base&Month=0&Outcome=&PORound=&PerMode=Totals&Period=0&PlayerID=&Season=2024-25&SeasonSegment=&SeasonType=Regular+Season&TeamID=0&VsConference=&VsDivision=

API ParameterPythonPatternRequiredNullableDescription
DateFromdate_from_nullableY
DateTodate_to_nullableY
GameSegmentgame_segment_nullableY
LastNGameslast_n_games_nullableY
LeagueIDleague_idY
Locationlocation_nullableY
MeasureTypemeasure_type_player_game_logs_nullableY
Monthmonth_nullableY
OppTeamIDoppteamidY
Outcomeoutcome_nullableY
PORoundpo_round_nullableY
PerModeper_mode_simple_nullableY
Periodperiod_nullableY
PlayerIDplayer_id_nullableY
Seasonseason_nullableYSeason 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. A G League regular season starts in late December and becomes the default in January (2025-26 from January 2026); a draft combine (May) in June. With season type Playoffs (or commonplayoffseries) it rolls over in May, after the late-March playoffs start; the G League has no All-Star rows. A month table cannot follow a lockout or pandemic calendar: pass a season then. Without one stats.nba.com answers an empty HTTP 500 or every season summed.
SeasonSegmentseason_segment_nullableY
SeasonTypeseason_type_nullableYSeason type, a label: Regular Season, Pre Season or Playoffs (each endpoint takes a subset; the G League has no All Star rows). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs rolls over in May.
ShotClockRangeshot_clock_range_nullableY
TeamIDteam_id_nullableY
VsConferencevs_conference_nullableY
VsDivisionvs_division_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
season_yearString
player_idInt64
player_nameString
nicknameString
team_idInt64
team_abbreviationString
team_nameString
game_idString
game_dateString
matchupString
wlString
minFloat64
fgmFloat64
fgaFloat64
fg_pctFloat64
fg3_mFloat64Three-point field goals made.
fg3_aFloat64Three-point field goal attempts.
fg3_pctFloat64
ftmFloat64
ftaFloat64
ft_pctFloat64
orebFloat64
drebFloat64
rebFloat64
astFloat64
tovFloat64
stlFloat64
blkFloat64
blkaFloat64Blocked field-goal attempts against for the requested NBA or WNBA Stats split.
pfFloat64
pfdFloat64Personal fouls drawn for the requested NBA or WNBA Stats split.
ptsFloat64
plus_minusFloat64
nba_fantasy_ptsFloat64Nba fantasy points for the requested NBA or WNBA Stats split.
dd2Int64Double-doubles for the requested NBA or WNBA Stats split.
td3Int64Triple-doubles for the requested NBA or WNBA Stats split.
wnba_fantasy_ptsFloat64Wnba fantasy points for the requested NBA or WNBA Stats split.
gp_rankInt64Rank for games played within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
w_rankInt64Rank for wins within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
l_rankInt64Rank for losses within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
w_pct_rankInt64Rank for winning percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
min_rankInt64Rank for minutes played within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
fgm_rankInt64Rank for field goals made within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
fga_rankInt64Rank for field goals attempted within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
fg_pct_rankInt64Rank for field-goal percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
fg3_m_rankInt64Rank for three-point field goals made within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
fg3_a_rankInt64Rank for three-point field goals attempted within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
fg3_pct_rankInt64Rank for three-point field-goal percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
ftm_rankInt64Rank for free throws made within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
fta_rankInt64Rank for free throws attempted within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
ft_pct_rankInt64Rank for free-throw percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
oreb_rankInt64Rank for offensive rebounds within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
dreb_rankInt64Rank for defensive rebounds within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
reb_rankInt64Rank for total rebounds within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
ast_rankInt64Rank for assists within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
tov_rankInt64Rank for turnovers within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
stl_rankInt64Rank for steals within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
blk_rankInt64Rank for blocks within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
blka_rankInt64Rank for blocked field-goal attempts against within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
pf_rankInt64Rank for personal fouls within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
pfd_rankInt64Rank for personal fouls drawn within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
pts_rankInt64Rank for points within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
plus_minus_rankInt64Rank for plus-minus within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
nba_fantasy_pts_rankInt64Rank for NBA fantasy points within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
dd2_rankInt64Rank for double-doubles within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
td3_rankInt64Rank for triple-doubles within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
wnba_fantasy_pts_rankInt64Rank for WNBA fantasy points within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader.
available_flagInt64Flag indicating whether the requested NBA or WNBA Stats video or data asset is available.
min_secStringMinutes and seconds played, formatted as a game-clock duration string.
team_countInt64NBA or WNBA Stats value for team count in the playergamelogs result set.

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_playergamelogs(league_id='20', season_nullable='2024-25')

nbagl_stats_playerindex​

Player index.

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

Valid URL: https://stats.nba.com/stats/playerindex?College=&Country=&DraftPick=&DraftRound=&DraftYear=&Height=&Historical=1&LeagueID=20&Season=2024-25&TeamID=0&Weight=

API ParameterPythonPatternRequiredNullableDescription
Activeactive_nullableY
AllStarallstar_nullableY
Collegecollege_nullableY
Countrycountry_nullableY
DraftPickdraft_pick_nullableY
DraftRounddraft_round_nullableY
DraftYeardraft_year_nullableY
Heightheight_nullableY
Historicalhistorical_nullableY
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. A G League regular season starts in late December and becomes the default in January (2025-26 from January 2026); a draft combine (May) in June. With season type Playoffs (or commonplayoffseries) it rolls over in May, after the late-March playoffs start; the G League has no All-Star rows. A month table cannot follow a lockout or pandemic calendar: pass a season then. Without one stats.nba.com answers an empty HTTP 500 or every season summed.
TeamIDteam_id_nullableY
Weightweight_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
person_idInt64
player_last_nameStringPlayer's last name.
player_first_nameStringPlayer's first name.
player_slugString
team_idInt64
team_slugString
team_cityString
team_nameString
team_abbreviationString
jersey_numberString
positionString
heightString
weightString
collegeString
countryString
draft_yearInt64
draft_roundInt64
draft_numberInt64Overall pick the player was selected with, as a string; 'Undrafted' when never drafted.
roster_statusFloat64Roster status flag: 1 when the player is on a current roster, 0 otherwise.
from_yearString
to_yearString
ptsFloat64
rebFloat64
astFloat64
stats_timeframeStringTime value for stats timeframe in the NBA or WNBA Stats result set.

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_playerindex(league_id='20', season='2024-25')