NBA — NBA Stats API (stats.nba.com) — League: leaguegamefinder–leagueseasonmatchups
nba_stats_leaguegamefinder
League game finder.
Endpoint URL: GET https://stats.nba.com/stats/leaguegamefinder
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
Conference | conference_nullable | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
Division | division_simple_nullable | Y | |||
DraftNumber | draft_number_nullable | Y | |||
DraftRound | draft_round_nullable | Y | |||
DraftTeamID | draft_team_id_nullable | Y | |||
DraftYear | draft_year_nullable | Y | |||
EqAST | eq_ast_nullable | Y | |||
EqBLK | eq_blk_nullable | Y | |||
EqDD | eq_dd_nullable | Y | |||
EqDREB | eq_dreb_nullable | Y | |||
EqFG3A | eq_fg3a_nullable | Y | |||
EqFG3M | eq_fg3m_nullable | Y | |||
EqFG3_PCT | eq_fg3_pct_nullable | Y | |||
EqFGA | eq_fga_nullable | Y | |||
EqFGM | eq_fgm_nullable | Y | |||
EqFG_PCT | eq_fg_pct_nullable | Y | |||
EqFTA | eq_fta_nullable | Y | |||
EqFTM | eq_ftm_nullable | Y | |||
EqFT_PCT | eq_ft_pct_nullable | Y | |||
EqMINUTES | eq_minutes_nullable | Y | |||
EqOREB | eq_oreb_nullable | Y | |||
EqPF | eq_pf_nullable | Y | |||
EqPTS | eq_pts_nullable | Y | |||
EqREB | eq_reb_nullable | Y | |||
EqSTL | eq_stl_nullable | Y | |||
EqTD | eq_td_nullable | Y | |||
EqTOV | eq_tov_nullable | Y | |||
GameID | game_id_nullable | Y | |||
GtAST | gt_ast_nullable | Y | |||
GtBLK | gt_blk_nullable | Y | |||
GtDD | gt_dd_nullable | Y | |||
GtDREB | gt_dreb_nullable | Y | |||
GtFG3A | gt_fg3a_nullable | Y | |||
GtFG3M | gt_fg3m_nullable | Y | |||
GtFG3_PCT | gt_fg3_pct_nullable | Y | |||
GtFGA | gt_fga_nullable | Y | |||
GtFGM | gt_fgm_nullable | Y | |||
GtFG_PCT | gt_fg_pct_nullable | Y | |||
GtFTA | gt_fta_nullable | Y | |||
GtFTM | gt_ftm_nullable | Y | |||
GtFT_PCT | gt_ft_pct_nullable | Y | |||
GtMINUTES | gt_minutes_nullable | Y | |||
GtOREB | gt_oreb_nullable | Y | |||
GtPF | gt_pf_nullable | Y | |||
GtPTS | gt_pts_nullable | Y | |||
GtREB | gt_reb_nullable | Y | |||
GtSTL | gt_stl_nullable | Y | |||
GtTD | gt_td_nullable | Y | |||
GtTOV | gt_tov_nullable | Y | |||
LeagueID | league_id | Y | |||
Location | location_nullable | Y | |||
LtAST | lt_ast_nullable | Y | |||
LtBLK | lt_blk_nullable | Y | |||
LtDD | lt_dd_nullable | Y | |||
LtDREB | lt_dreb_nullable | Y | |||
LtFG3A | lt_fg3a_nullable | Y | |||
LtFG3M | lt_fg3m_nullable | Y | |||
LtFG3_PCT | lt_fg3_pct_nullable | Y | |||
LtFGA | lt_fga_nullable | Y | |||
LtFGM | lt_fgm_nullable | Y | |||
LtFG_PCT | lt_fg_pct_nullable | Y | |||
LtFTA | lt_fta_nullable | Y | |||
LtFTM | lt_ftm_nullable | Y | |||
LtFT_PCT | lt_ft_pct_nullable | Y | |||
LtMINUTES | lt_minutes_nullable | Y | |||
LtOREB | lt_oreb_nullable | Y | |||
LtPF | lt_pf_nullable | Y | |||
LtPTS | lt_pts_nullable | Y | |||
LtREB | lt_reb_nullable | Y | |||
LtSTL | lt_stl_nullable | Y | |||
LtTD | lt_td_nullable | Y | |||
LtTOV | lt_tov_nullable | Y | |||
Outcome | outcome_nullable | Y | |||
PORound | po_round_nullable | Y | |||
PlayerID | player_id_nullable | Y | |||
PlayerOrTeam | player_or_team_abbreviation | Y | |||
RookieYear | rookie_year_nullable | Y | |||
Season | season_nullable | Y | Season 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. | ||
SeasonSegment | season_segment_nullable | Y | |||
SeasonType | season_type_nullable | Y | Season 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). | ||
StarterBench | starter_bench_nullable | Y | |||
TeamID | team_id_nullable | Y | |||
VsConference | vs_conference_nullable | Y | |||
VsDivision | vs_division_nullable | Y | |||
VsTeamID | vs_team_id_nullable | Y | |||
YearsExperience | years_experience_nullable | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
season_id | String | Unique season identifier. |
team_id | Int64 | Unique team identifier. |
team_abbreviation | String | Short team abbreviation (e.g. 'LAS'). |
team_name | String | Full team display name (e.g. 'Las Vegas Aces'). |
game_id | String | Unique game identifier. |
game_date | String | Game date (YYYY-MM-DD). |
matchup | String | Matchup. |
wl | String | Wl. |
min | Int64 | Minutes played. |
pts | Int64 | Points scored. |
fgm | Int64 | Field goals made. |
fga | Int64 | Field goal attempts. |
fg_pct | Float64 | Field goal percentage (0-1). |
fg3_m | Int64 | Three-point field goals made. |
fg3_a | Int64 | Three-point field goal attempts. |
fg3_pct | Float64 | Three-point field goal percentage (0-1). |
ftm | Int64 | Free throws made. |
fta | Int64 | Free throw attempts. |
ft_pct | Float64 | Free throw percentage (0-1). |
oreb | Int64 | Offensive rebounds. |
dreb | Int64 | Defensive rebounds. |
reb | Int64 | Rebounds per game. |
ast | Int64 | Assists. |
stl | Int64 | Steals. |
blk | Int64 | Blocks. |
tov | Int64 | Turnovers. |
pf | Int64 | Personal fouls. |
plus_minus | Float64 | Plus/minus point differential while on court. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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_leaguegamefinder(league_id='00', season_nullable='2024-25')
nba_stats_leaguegamelog
League game log.
Endpoint URL: GET https://stats.nba.com/stats/leaguegamelog
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
Counter | counter | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
Direction | direction | Y | |||
LeagueID | league_id | Y | |||
PlayerOrTeam | player_or_team_abbreviation | Y | |||
Season | season | Y | Season 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. | ||
SeasonType | season_type_all_star | Y | Season 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). | ||
Sorter | sorter | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
season_id | String | Unique season identifier. |
team_id | Int64 | Unique team identifier. |
team_abbreviation | String | Short team abbreviation (e.g. 'LAS'). |
team_name | String | Full team display name (e.g. 'Las Vegas Aces'). |
game_id | String | Unique game identifier. |
game_date | String | Game date (YYYY-MM-DD). |
matchup | String | Matchup. |
wl | String | Wl. |
min | Int64 | Minutes played. |
fgm | Int64 | Field goals made. |
fga | Int64 | Field goal attempts. |
fg_pct | Float64 | Field goal percentage (0-1). |
fg3_m | Int64 | Three-point field goals made. |
fg3_a | Int64 | Three-point field goal attempts. |
fg3_pct | Float64 | Three-point field goal percentage (0-1). |
ftm | Int64 | Free throws made. |
fta | Int64 | Free throw attempts. |
ft_pct | Float64 | Free throw percentage (0-1). |
oreb | Int64 | Offensive rebounds. |
dreb | Int64 | Defensive rebounds. |
reb | Int64 | Rebounds per game. |
ast | Int64 | Assists. |
stl | Int64 | Steals. |
blk | Int64 | Blocks. |
tov | Int64 | Turnovers. |
pf | Int64 | Personal fouls. |
pts | Int64 | Points scored. |
plus_minus | Int64 | Plus/minus point differential while on court. |
video_available | Int64 | Video available. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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_leaguegamelog(league_id='00', season='2024-25')
nba_stats_leaguehustlestatsplayer
League hustle stats player.
Endpoint URL: GET https://stats.nba.com/stats/leaguehustlestatsplayer
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
College | college_nullable | Y | |||
Conference | conference_nullable | Y | |||
Country | country_nullable | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
Division | division_simple_nullable | Y | |||
DraftPick | draft_pick_nullable | Y | |||
DraftYear | draft_year_nullable | Y | |||
Height | height_nullable | Y | |||
LeagueID | league_id | Y | |||
Location | location_nullable | Y | |||
Month | month_nullable | Y | |||
OpponentTeamID | opponent_team_id_nullable | Y | |||
Outcome | outcome_nullable | Y | |||
PORound | po_round_nullable | Y | |||
PerMode | per_mode_time | Y | |||
PlayerExperience | player_experience_nullable | Y | |||
PlayerPosition | player_position_nullable | Y | |||
Season | season | Y | Season 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. | ||
SeasonSegment | season_segment_nullable | Y | |||
SeasonType | season_type_all_star | Y | Season 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). | ||
TeamID | team_id_nullable | Y | |||
VsConference | vs_conference_nullable | Y | |||
VsDivision | vs_division_nullable | Y | |||
Weight | weight_nullable | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
player_id | Int64 | Unique player identifier. |
player_name | String | Player name. |
team_id | Int64 | Unique team identifier. |
team_abbreviation | String | Short team abbreviation (e.g. 'LAS'). |
age | Float64 | Player age (in years). |
g | Int64 | Games played. |
min | Float64 | Minutes played. |
contested_shots | Float64 | Defensively contested shots. |
contested_shots_2_pt | Float64 | Opponent two-point attempts contested. |
contested_shots_3_pt | Float64 | Opponent three-point attempts contested. |
deflections | Float64 | Defensive deflections. |
charges_drawn | Float64 | Charges drawn. |
screen_assists | Float64 | Screen assists (resulting in a basket). |
screen_ast_pts | Float64 | Points teammates scored directly off the row's screen assists. |
off_loose_balls_recovered | Float64 | Loose balls recovered while on offense. |
def_loose_balls_recovered | Float64 | Loose balls recovered while on defense. |
loose_balls_recovered | Float64 | Total loose balls recovered. |
pct_loose_balls_recovered_off | Float64 | Share of recovered loose balls that came on offense, as a decimal. |
pct_loose_balls_recovered_def | Float64 | Share of recovered loose balls that came on defense, as a decimal. |
off_boxouts | Float64 | Box-outs recorded on the offensive glass. |
def_boxouts | Float64 | Box-outs recorded on the defensive glass. |
box_outs | Float64 | Box-outs executed. |
box_out_player_team_rebs | Float64 | Team rebounds secured following the row's box-outs. |
box_out_player_rebs | Float64 | Rebounds the player secured directly off their own box-outs. |
pct_box_outs_off | Float64 | Share of box-outs recorded on the offensive glass, as a decimal. |
pct_box_outs_def | Float64 | Share of box-outs recorded on the defensive glass, as a decimal. |
pct_box_outs_team_reb | Float64 | Share of box-outs after which the team secured the rebound, as a decimal. |
pct_box_outs_reb | Float64 | Share of box-outs after which the player secured the rebound, as a decimal. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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_leaguehustlestatsplayer(league_id='00', season='2024-25')
nba_stats_leaguehustlestatsteam
League hustle stats team.
Endpoint URL: GET https://stats.nba.com/stats/leaguehustlestatsteam
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
College | college_nullable | Y | |||
Conference | conference_nullable | Y | |||
Country | country_nullable | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
Division | division_simple_nullable | Y | |||
DraftPick | draft_pick_nullable | Y | |||
DraftYear | draft_year_nullable | Y | |||
Height | height_nullable | Y | |||
LeagueID | league_id | Y | |||
Location | location_nullable | Y | |||
Month | month_nullable | Y | |||
OpponentTeamID | opponent_team_id_nullable | Y | |||
Outcome | outcome_nullable | Y | |||
PORound | po_round_nullable | Y | |||
PerMode | per_mode_time | Y | |||
PlayerExperience | player_experience_nullable | Y | |||
PlayerPosition | player_position_nullable | Y | |||
Season | season | Y | Season 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. | ||
SeasonSegment | season_segment_nullable | Y | |||
SeasonType | season_type_all_star | Y | Season 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). | ||
TeamID | team_id_nullable | Y | |||
VsConference | vs_conference_nullable | Y | |||
VsDivision | vs_division_nullable | Y | |||
Weight | weight_nullable | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
team_id | Int64 | Unique team identifier. |
team_name | String | Full team display name (e.g. 'Las Vegas Aces'). |
min | Float64 | Minutes played. |
contested_shots | Float64 | Defensively contested shots. |
contested_shots_2_pt | Float64 | Opponent two-point attempts contested. |
contested_shots_3_pt | Float64 | Opponent three-point attempts contested. |
deflections | Float64 | Defensive deflections. |
charges_drawn | Float64 | Charges drawn. |
screen_assists | Float64 | Screen assists (resulting in a basket). |
screen_ast_pts | Float64 | Points teammates scored directly off the row's screen assists. |
off_loose_balls_recovered | Float64 | Loose balls recovered while on offense. |
def_loose_balls_recovered | Float64 | Loose balls recovered while on defense. |
loose_balls_recovered | Float64 | Total loose balls recovered. |
pct_loose_balls_recovered_off | Float64 | Share of recovered loose balls that came on offense, as a decimal. |
pct_loose_balls_recovered_def | Float64 | Share of recovered loose balls that came on defense, as a decimal. |
off_boxouts | Float64 | Box-outs recorded on the offensive glass. |
def_boxouts | Float64 | Box-outs recorded on the defensive glass. |
box_outs | Float64 | Box-outs executed. |
pct_box_outs_off | Float64 | Share of box-outs recorded on the offensive glass, as a decimal. |
pct_box_outs_def | Float64 | Share of box-outs recorded on the defensive glass, as a decimal. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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_leaguehustlestatsteam(league_id='00', season='2024-25')
nba_stats_leagueleaders
League leaders.
Endpoint URL: GET https://stats.nba.com/stats/leagueleaders
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
ActiveFlag | active_flag_nullable | Y | |||
LeagueID | league_id | Y | |||
PerMode | per_mode48 | Y | |||
Scope | scope | Y | |||
Season | season | Y | Season 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. | ||
SeasonType | season_type_all_star | Y | Season 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). | ||
StatCategory | stat_category_abbreviation | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
player_id | Int64 | Unique player identifier. |
rank | Int64 | Rank of the row within the returned leaderboard (1 = best) for the stat the endpoint sorts by. |
player | String | Player name. |
team_id | Int64 | Unique team identifier. |
team | String | Team-side label or team identifier. |
gp | Int64 | Games played. |
min | Float64 | Minutes played. |
fgm | Float64 | Field goals made. |
fga | Float64 | Field goal attempts. |
fg_pct | Float64 | Field goal percentage (0-1). |
fg3_m | Float64 | Three-point field goals made. |
fg3_a | Float64 | Three-point field goal attempts. |
fg3_pct | Float64 | Three-point field goal percentage (0-1). |
ftm | Float64 | Free throws made. |
fta | Float64 | Free throw attempts. |
ft_pct | Float64 | Free throw percentage (0-1). |
oreb | Float64 | Offensive rebounds. |
dreb | Float64 | Defensive rebounds. |
reb | Float64 | Rebounds per game. |
ast | Float64 | Assists. |
stl | Float64 | Steals. |
blk | Float64 | Blocks. |
tov | Float64 | Turnovers. |
pts | Float64 | Points scored. |
eff | Float64 | Eff. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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_leagueleaders(league_id='00', season='2024-25')
nba_stats_leaguelineupviz
League lineup viz.
Endpoint URL: GET https://stats.nba.com/stats/leaguelineupviz
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
Conference | conference_nullable | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
Division | division_simple_nullable | Y | |||
GameSegment | game_segment_nullable | Y | |||
GroupQuantity | group_quantity | Y | |||
LastNGames | last_n_games | Y | |||
LeagueID | league_id | Y | |||
Location | location_nullable | Y | |||
MeasureType | measure_type_detailed_defense | Y | |||
MinutesMin | minutes_min | Y | |||
Month | month | Y | |||
OpponentTeamID | opponent_team_id | Y | |||
Outcome | outcome_nullable | Y | |||
PORound | po_round_nullable | Y | |||
PaceAdjust | pace_adjust | Y | |||
PerMode | per_mode_detailed | Y | |||
Period | period | Y | |||
PlusMinus | plus_minus | Y | |||
Rank | rank | Y | |||
Season | season | Y | Season 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. | ||
SeasonSegment | season_segment_nullable | Y | |||
SeasonType | season_type_all_star | Y | Season 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). | ||
ShotClockRange | shot_clock_range_nullable | Y | |||
TeamID | team_id_nullable | Y | |||
VsConference | vs_conference_nullable | Y | |||
VsDivision | vs_division_nullable | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
group_id | String | ESPN group id. |
group_name | String | The lineup's five players as a ' - ' separated string of abbreviated names. |
team_id | Int64 | Unique team identifier. |
team_abbreviation | String | Short team abbreviation (e.g. 'LAS'). |
min | Float64 | Minutes played. |
off_rating | Float64 | Points scored per 100 possessions with the lineup on the floor (offensive rating). |
def_rating | Float64 | Points allowed per 100 possessions with the lineup on the floor (defensive rating). |
net_rating | Float64 | Net rating (off rating - def rating). |
pace | Float64 | Possessions per 48 minutes. |
ts_pct | Float64 | True shooting percentage (0-1). |
fta_rate | Float64 | Free throw attempts per field goal attempt for the lineup. |
tm_ast_pct | Float64 | Percentage of the lineup's made field goals that were assisted, as a decimal. |
pct_fga_2_pt | Float64 | Share of field goal attempts taken as two-pointers, as a decimal. |
pct_fga_3_pt | Float64 | Share of field goal attempts taken as three-pointers, as a decimal. |
pct_pts_2_pt_mr | Float64 | Share of points scored on mid-range two-pointers, as a decimal. |
pct_pts_fb | Float64 | Share of points scored on fast breaks, as a decimal. |
pct_pts_ft | Float64 | Share of points scored at the free throw line, as a decimal. |
pct_pts_paint | Float64 | Share of points scored in the paint, as a decimal. |
pct_ast_fgm | Float64 | Percentage of made field goals that were assisted, as a decimal. |
pct_uast_fgm | Float64 | Percentage of made field goals that were unassisted, as a decimal. |
opp_fg3_pct | Float64 | Opponent three-point percentage against the lineup, as a decimal. |
opp_efg_pct | Float64 | Opponent effective field goal percentage against the lineup, as a decimal. |
opp_fta_rate | Float64 | Opponent free throw attempt rate against the lineup. |
opp_tov_pct | Float64 | Opponent turnover percentage forced by the lineup. |
sum_tm_min | Float64 | Total team minutes summed across the lineup's stints on the floor. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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_leaguelineupviz(league_id='00', season='2024-25')
nba_stats_leagueplayerondetails
League player on details.
Endpoint URL: GET https://stats.nba.com/stats/leagueplayerondetails
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
GameSegment | game_segment_nullable | Y | |||
LastNGames | last_n_games | Y | |||
LeagueID | league_id | Y | |||
Location | location_nullable | Y | |||
MeasureType | measure_type_detailed_defense | Y | |||
Month | month | Y | |||
OpponentTeamID | opponent_team_id | Y | |||
Outcome | outcome_nullable | Y | |||
PaceAdjust | pace_adjust | Y | |||
PerMode | per_mode_detailed | Y | |||
Period | period | Y | |||
PlusMinus | plus_minus | Y | |||
Rank | rank | Y | |||
Season | season | Y | Season 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. | ||
SeasonSegment | season_segment_nullable | Y | |||
SeasonType | season_type_all_star | Y | Season 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). | ||
TeamID | team_id | Y | |||
VsConference | vs_conference_nullable | Y | |||
VsDivision | vs_division_nullable | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
group_set | String | Name of the grouping family used for this dashboard or split row. |
team_id | Int64 | Unique team identifier. |
team_abbreviation | String | Short team abbreviation (e.g. 'LAS'). |
team_name | String | Full team display name (e.g. 'Las Vegas Aces'). |
vs_player_id | Int64 | Stats API identifier for vs player identifier associated with this NBA or WNBA Stats row. |
vs_player_name | String | Display name for vs player name associated with this NBA or WNBA Stats row. |
court_status | String | Indicates whether the compared player was on court or off court for the split row. |
gp | Int64 | Games played. |
w | Int64 | Wins. |
l | Int64 | Losses. |
w_pct | Float64 | Wins percentage (0-1 decimal). |
min | Float64 | Minutes played. |
fgm | Float64 | Field goals made. |
fga | Float64 | Field goal attempts. |
fg_pct | Float64 | Field goal percentage (0-1). |
fg3_m | Float64 | Three-point field goals made. |
fg3_a | Float64 | Three-point field goal attempts. |
fg3_pct | Float64 | Three-point field goal percentage (0-1). |
ftm | Float64 | Free throws made. |
fta | Float64 | Free throw attempts. |
ft_pct | Float64 | Free throw percentage (0-1). |
oreb | Float64 | Offensive rebounds. |
dreb | Float64 | Defensive rebounds. |
reb | Float64 | Rebounds per game. |
ast | Float64 | Assists. |
tov | Float64 | Turnovers. |
stl | Float64 | Steals. |
blk | Float64 | Blocks. |
blka | Float64 | Blocked field-goal attempts against for the requested NBA or WNBA Stats split. |
pf | Float64 | Personal fouls. |
pfd | Float64 | Personal fouls drawn for the requested NBA or WNBA Stats split. |
pts | Float64 | Points scored. |
plus_minus | Float64 | Plus/minus point differential while on court. |
gp_rank | Int64 | Rank for games played within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
w_rank | Int64 | Rank for wins within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
l_rank | Int64 | Rank for losses within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
w_pct_rank | Int64 | Rank for winning percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
min_rank | Int64 | Rank for minutes played within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
fgm_rank | Int64 | Rank for field goals made within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
fga_rank | Int64 | Rank for field goals attempted within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
fg_pct_rank | Int64 | Rank for field-goal percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
fg3_m_rank | Int64 | Rank for three-point field goals made within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
fg3_a_rank | Int64 | Rank for three-point field goals attempted within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
fg3_pct_rank | Int64 | Rank for three-point field-goal percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
ftm_rank | Int64 | Rank for free throws made within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
fta_rank | Int64 | Rank for free throws attempted within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
ft_pct_rank | Int64 | Rank for free-throw percentage within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
oreb_rank | Int64 | Rank for offensive rebounds within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
dreb_rank | Int64 | Rank for defensive rebounds within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
reb_rank | Int64 | Rank for total rebounds within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
ast_rank | Int64 | Rank for assists within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
tov_rank | Int64 | Rank for turnovers within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
stl_rank | Int64 | Rank for steals within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
blk_rank | Int64 | Rank for blocks within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
blka_rank | Int64 | Rank for blocked field-goal attempts against within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
pf_rank | Int64 | Rank for personal fouls within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
pfd_rank | Int64 | Rank for personal fouls drawn within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
pts_rank | Int64 | Rank for points within the requested NBA or WNBA Stats leaderboard or split, where 1 is the leader. |
plus_minus_rank | Int64 | Rank for plus-minus 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
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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_leagueplayerondetails(league_id='00', season='2024-25')
nba_stats_leagueseasonmatchups
League season matchups.
Endpoint URL: GET https://stats.nba.com/stats/leagueseasonmatchups
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
DefPlayerID | def_player_id_nullable | Y | |||
DefTeamID | def_team_id_nullable | Y | |||
LeagueID | league_id | Y | |||
OffPlayerID | off_player_id_nullable | Y | |||
OffTeamID | off_team_id_nullable | Y | |||
PerMode | per_mode_simple | Y | |||
Season | season | Y | Season 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. | ||
SeasonType | season_type_playoffs | Y | Season 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 tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
season_id | String | Unique season identifier. |
off_player_id | Int64 | Stats API identifier for offensive player identifier associated with this NBA or WNBA Stats row. |
off_player_name | String | Display name for offensive player name associated with this NBA or WNBA Stats row. |
def_player_id | Int64 | Stats API identifier for defensive player identifier associated with this NBA or WNBA Stats row. |
def_player_name | String | Display name for defensive player name associated with this NBA or WNBA Stats row. |
gp | Int64 | Games played. |
matchup_min | Float64 | NBA or WNBA Stats value for matchup minutes in the leagueseasonmatchups result set. |
partial_poss | Float64 | Estimated partial possessions credited to the stint or rotation interval. |
player_pts | Float64 | Scoring or score-margin metric for player points in the requested NBA or WNBA Stats split. |
team_pts | Float64 | Scoring or score-margin metric for team points in the requested NBA or WNBA Stats split. |
matchup_ast | Float64 | NBA or WNBA Stats value for matchup assists in the leagueseasonmatchups result set. |
matchup_tov | Float64 | Turnover or loose-ball metric for matchup turnovers in the requested NBA or WNBA Stats split. |
matchup_blk | Float64 | NBA or WNBA Stats value for matchup blocks in the leagueseasonmatchups result set. |
matchup_fgm | Float64 | Shooting metric for matchup fgm in the requested NBA or WNBA Stats split. |
matchup_fga | Float64 | Shooting metric for matchup fga in the requested NBA or WNBA Stats split. |
matchup_fg_pct | Float64 | Percentage or rate for matchup field goals percentage in the requested NBA or WNBA Stats split. |
matchup_fg3_m | Float64 | Shooting metric for matchup fg3m in the requested NBA or WNBA Stats split. |
matchup_fg3_a | Float64 | Shooting metric for matchup fg3a in the requested NBA or WNBA Stats split. |
matchup_fg3_pct | Float64 | Percentage or rate for matchup three-point field goals percentage in the requested NBA or WNBA Stats split. |
help_blk | Int64 | NBA or WNBA Stats value for help blocks in the leagueseasonmatchups result set. |
help_fgm | Int64 | Shooting metric for help fgm in the requested NBA or WNBA Stats split. |
help_fga | Int64 | Shooting metric for help fga in the requested NBA or WNBA Stats split. |
help_fg_perc | Int64 | Shooting metric for help field goals perc in the requested NBA or WNBA Stats split. |
matchup_ftm | Float64 | NBA or WNBA Stats value for matchup ftm in the leagueseasonmatchups result set. |
matchup_fta | Float64 | NBA or WNBA Stats value for matchup fta in the leagueseasonmatchups result set. |
sfl | Float64 | NBA or WNBA Stats value for sfl in the leagueseasonmatchups result set. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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_leagueseasonmatchups(league_id='00', season='2024-25')