Skip to main content

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

nbagl_stats_playerprofilev2​

Player profile v2.

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

Valid URL: https://stats.nba.com/stats/playerprofilev2?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, SeasonTotalsPreseason, CareerTotalsPreseason, SeasonRankingsRegularSeason, SeasonRankingsPostSeason, SeasonHighs, CareerHighs, NextGame) (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 playerprofilev2 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 playerprofilev2 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 playerprofilev2 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 playerprofilev2 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

SeasonTotalsPreseason

col_nametypedescription
player_idInt64
season_idString
league_idString
team_idInt64
team_abbreviationString
player_ageFloat64NBA or WNBA Stats value for player age in the playerprofilev2 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

CareerTotalsPreseason

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 playerprofilev2 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 playerprofilev2 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

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

NextGame

col_nametypedescription
game_idString
game_dateString
game_timeString
locationString
player_team_idInt64Team id of the player's current team in the NextGame set.
player_team_cityString
player_team_nicknameString
player_team_abbreviationString
vs_team_idInt64
vs_team_cityString
vs_team_nicknameString
vs_team_abbreviationString

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

nbagl_stats_playervsplayer​

Player vs player.

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

Valid URL: https://stats.nba.com/stats/playervsplayer?DateFrom=&DateTo=&GameSegment=&LastNGames=0&LeagueID=20&Location=&MeasureType=Base&Month=0&OpponentTeamID=0&Outcome=&PaceAdjust=N&PerMode=Totals&Period=0&PlayerID=1642443&PlusMinus=N&Rank=N&Season=2024-25&SeasonSegment=&SeasonType=Regular+Season&VsConference=&VsDivision=&VsPlayerID=1631457

API ParameterPythonPatternRequiredNullableDescription
DateFromdate_from_nullableY
DateTodate_to_nullableY
GameSegmentgame_segment_nullableY
LastNGameslast_n_gamesY
LeagueIDleague_idY
Locationlocation_nullableY
MeasureTypemeasure_type_detailed_defenseY
MonthmonthY
OpponentTeamIDopponent_team_idY
Outcomeoutcome_nullableY
PaceAdjustpace_adjustY
PerModeper_mode_detailedY
PeriodperiodY
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.
SeasonSegmentseason_segment_nullableY
SeasonTypeseason_type_playoffsYSeason 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.
VsConferencevs_conference_nullableY
VsDivisionvs_division_nullableY
VsPlayerIDvs_player_idY

Returns​

return_parsed=True (default) — A dict of DataFrames keyed by result-set name (Overall, OnOffCourt, ShotDistanceOverall, ShotDistanceOnCourt, ShotDistanceOffCourt, ShotAreaOverall, ShotAreaOnCourt, ShotAreaOffCourt, PlayerInfo, VsPlayerInfo) (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_valueString
player_idInt64
player_nameString
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
nba_fantasy_ptsFloat64Fantasy points under the NBA's fantasy scoring formula.

OnOffCourt

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
player_idInt64
player_nameString
vs_player_idInt64Stats API player id of the comparison (vs.) player.
vs_player_nameStringName of the comparison (vs.) player.
court_statusStringWhether the split covers minutes with the vs. player on or off the court.
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
nba_fantasy_ptsFloat64Fantasy points under the NBA's fantasy scoring formula.

ShotDistanceOverall

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
group_valueString
player_idInt64
player_nameString
fgmFloat64
fgaFloat64
fg_pctFloat64

ShotDistanceOnCourt

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
player_idInt64
player_nameString
vs_player_idInt64Stats API player id of the comparison (vs.) player.
vs_player_nameStringName of the comparison (vs.) player.
court_statusStringWhether the split covers minutes with the vs. player on or off the court.
group_valueString
fgmFloat64
fgaFloat64
fg_pctFloat64

ShotDistanceOffCourt

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
player_idInt64
player_nameString
vs_player_idInt64Stats API player id of the comparison (vs.) player.
vs_player_nameStringName of the comparison (vs.) player.
court_statusStringWhether the split covers minutes with the vs. player on or off the court.
group_valueString
fgmFloat64
fgaFloat64
fg_pctFloat64

ShotAreaOverall

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
group_valueString
player_idInt64
player_nameString
fgmFloat64
fgaFloat64
fg_pctFloat64

ShotAreaOnCourt

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
player_idInt64
player_nameString
vs_player_idInt64Stats API player id of the comparison (vs.) player.
vs_player_nameStringName of the comparison (vs.) player.
court_statusStringWhether the split covers minutes with the vs. player on or off the court.
group_valueString
fgmFloat64
fgaFloat64
fg_pctFloat64

ShotAreaOffCourt

col_nametypedescription
group_setStringName of the split group the row belongs to (e.g. Overall, By Opponent, By Month).
player_idInt64
player_nameString
vs_player_idInt64Stats API player id of the comparison (vs.) player.
vs_player_nameStringName of the comparison (vs.) player.
court_statusStringWhether the split covers minutes with the vs. player on or off the court.
group_valueString
fgmFloat64
fgaFloat64
fg_pctFloat64

PlayerInfo

col_nametypedescription
person_idInt64
first_nameString
last_nameString
display_first_lastString
display_last_comma_firstString
display_fi_lastString
birthdateStringDate of birth as an ISO timestamp string (e.g. '1984-12-30T00:00:00').
schoolString
countryString
last_affiliationString

VsPlayerInfo

col_nametypedescription
person_idInt64
first_nameString
last_nameString
display_first_lastString
display_last_comma_firstString
display_fi_lastString
birthdateStringDate of birth as an ISO timestamp string (e.g. '1984-12-30T00:00:00').
schoolString
countryString
last_affiliationString

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