NBA — NBA Stats API (stats.nba.com) — League dashboards: leaguedashptstats–leaguedashteamstats
nba_stats_leaguedashptstats
League dash PT stats.
Endpoint URL: GET https://stats.nba.com/stats/leaguedashptstats
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
College | college_nullable | Y | College query parameter. | ||
Conference | conference_nullable | Y | Conference query parameter. | ||
Country | country_nullable | Y | Country query parameter. | ||
DateFrom | date_from_nullable | Y | DateFrom query parameter. | ||
DateTo | date_to_nullable | Y | DateTo query parameter. | ||
Division | division_simple_nullable | Y | Division query parameter. | ||
DraftPick | draft_pick_nullable | Y | DraftPick query parameter. | ||
DraftYear | draft_year_nullable | Y | DraftYear query parameter. | ||
GameScope | game_scope_simple_nullable | Y | GameScope query parameter. | ||
Height | height_nullable | Y | Height query parameter. | ||
LastNGames | last_n_games | Y | LastNGames query parameter. | ||
LeagueID | league_id | Y | LeagueID query parameter. | ||
Location | location_nullable | Y | Location query parameter. | ||
Month | month | Y | Month query parameter. | ||
OpponentTeamID | opponent_team_id | Y | OpponentTeamID query parameter. | ||
Outcome | outcome_nullable | Y | Outcome query parameter. | ||
PORound | po_round_nullable | Y | PORound query parameter. | ||
PerMode | per_mode_simple | Y | PerMode query parameter. | ||
PlayerExperience | player_experience_nullable | Y | PlayerExperience query parameter. | ||
PlayerOrTeam | player_or_team | Y | PlayerOrTeam query parameter. | ||
PlayerPosition | player_position_abbreviation_nullable | Y | PlayerPosition query parameter. | ||
PtMeasureType | pt_measure_type | Y | PtMeasureType query parameter. | ||
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 | SeasonSegment query parameter. | ||
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). | ||
StarterBench | starter_bench_nullable | Y | StarterBench query parameter. | ||
TeamID | team_id_nullable | Y | TeamID query parameter. | ||
VsConference | vs_conference_nullable | Y | VsConference query parameter. | ||
VsDivision | vs_division_nullable | Y | VsDivision query parameter. | ||
Weight | weight_nullable | Y | Weight query parameter. |
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'). |
gp | Int64 | Games played. |
w | Int64 | Wins. |
l | Int64 | Losses. |
min | Float64 | Minutes played. |
dist_feet | Float64 | NBA or WNBA Stats value for dist feet in the leaguedashptstats result set. |
dist_miles | Float64 | NBA or WNBA Stats value for dist miles in the leaguedashptstats result set. |
dist_miles_off | Float64 | NBA or WNBA Stats value for dist miles offensive in the leaguedashptstats result set. |
dist_miles_def | Float64 | NBA or WNBA Stats value for dist miles defensive in the leaguedashptstats result set. |
avg_speed | Float64 | NBA or WNBA Stats value for average speed in the leaguedashptstats result set. |
avg_speed_off | Float64 | NBA or WNBA Stats value for average speed offensive in the leaguedashptstats result set. |
avg_speed_def | Float64 | NBA or WNBA Stats value for average speed defensive in the leaguedashptstats 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_leaguedashptstats(league_id='00', season='2024-25')
nba_stats_leaguedashptteamdefend
League dash PT team defend.
Endpoint URL: GET https://stats.nba.com/stats/leaguedashptteamdefend
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
Conference | conference_nullable | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
DefenseCategory | defense_category | Y | |||
Division | division_nullable | Y | |||
GameSegment | game_segment_nullable | Y | |||
LastNGames | last_n_games_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_simple | Y | |||
Period | period_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 |
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'). |
team_abbreviation | String | Short team abbreviation (e.g. 'LAS'). |
gp | Int64 | Games played. |
g | Int64 | Games played. |
freq | Float64 | NBA or WNBA Stats value for freq in the leaguedashptteamdefend result set. |
d_fgm | Float64 | Shooting metric for d fgm in the requested NBA or WNBA Stats split. |
d_fga | Float64 | Shooting metric for d fga in the requested NBA or WNBA Stats split. |
d_fg_pct | Float64 | Percentage or rate for d field goals percentage in the requested NBA or WNBA Stats split. |
normal_fg_pct | Float64 | Percentage or rate for normal field goals percentage in the requested NBA or WNBA Stats split. |
pct_plusminus | Float64 | Percentage share of plusminus for the requested NBA or WNBA Stats split. |
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_leaguedashptteamdefend(league_id='00', season='2024-25')
nba_stats_leaguedashteamclutch
League dash team clutch.
Endpoint URL: GET https://stats.nba.com/stats/leaguedashteamclutch
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
AheadBehind | ahead_behind | Y | |||
ClutchTime | clutch_time | Y | |||
Conference | conference_nullable | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
Division | division_simple_nullable | Y | |||
GameScope | game_scope_simple_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 | |||
PORound | po_round_nullable | Y | |||
PaceAdjust | pace_adjust | Y | |||
PerMode | per_mode_detailed | Y | |||
Period | period | Y | |||
PlayerExperience | player_experience_nullable | Y | |||
PlayerPosition | player_position_abbreviation_nullable | Y | |||
PlusMinus | plus_minus | Y | |||
PointDiff | point_diff | 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 | |||
StarterBench | starter_bench_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 |
|---|---|---|
team_id | Int64 | Unique team identifier. |
team_name | String | Full team display name (e.g. 'Las Vegas Aces'). |
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 | Shot attempts blocked by opponents (blocks against). |
pf | Float64 | Personal fouls. |
pfd | Float64 | Personal fouls drawn. |
pts | Float64 | Points scored. |
plus_minus | Float64 | Plus/minus point differential while on court. |
gp_rank | Int64 | League rank of the row's games played for the season and split. |
w_rank | Int64 | League rank of the row's wins for the season and split. |
l_rank | Int64 | League rank of the row's losses for the season and split. |
w_pct_rank | Int64 | League rank of the row's win percentage for the season and split. |
min_rank | Int64 | League rank of the row's minutes played for the season and split. |
fgm_rank | Int64 | League rank of the row's field goals made for the season and split. |
fga_rank | Int64 | League rank of the row's field goals attempted for the season and split. |
fg_pct_rank | Int64 | League rank of the row's field goal percentage for the season and split. |
fg3_m_rank | Int64 | League rank of the row's three-point field goals made for the season and split. |
fg3_a_rank | Int64 | League rank of the row's three-point field goals attempted for the season and split. |
fg3_pct_rank | Int64 | League rank of the row's three-point field goal percentage for the season and split. |
ftm_rank | Int64 | League rank of the row's free throws made for the season and split. |
fta_rank | Int64 | League rank of the row's free throws attempted for the season and split. |
ft_pct_rank | Int64 | League rank of the row's free throw percentage for the season and split. |
oreb_rank | Int64 | League rank of the row's offensive rebounds for the season and split. |
dreb_rank | Int64 | League rank of the row's defensive rebounds for the season and split. |
reb_rank | Int64 | League rank of the row's total rebounds for the season and split. |
ast_rank | Int64 | League rank of the row's assists for the season and split. |
tov_rank | Int64 | League rank of the row's turnovers for the season and split. |
stl_rank | Int64 | League rank of the row's steals for the season and split. |
blk_rank | Int64 | League rank of the row's blocked shots for the season and split. |
blka_rank | Int64 | League rank of the row's shot attempts blocked by opponents (blocks against) for the season and split. |
pf_rank | Int64 | League rank of the row's personal fouls committed for the season and split. |
pfd_rank | Int64 | League rank of the row's personal fouls drawn for the season and split. |
pts_rank | Int64 | League rank of the row's points scored for the season and split. |
plus_minus_rank | Int64 | League rank of the row's plus-minus point differential while on the floor for the season and split. |
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_leaguedashteamclutch(league_id='00', season='2024-25')
nba_stats_leaguedashteamptshot
League dash team PT shot.
Endpoint URL: GET https://stats.nba.com/stats/leaguedashteamptshot
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
CloseDefDistRange | close_def_dist_range_nullable | Y | |||
Conference | conference_nullable | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
Division | division_nullable | Y | |||
DribbleRange | dribble_range_nullable | Y | |||
GameSegment | game_segment_nullable | Y | |||
GeneralRange | general_range_nullable | Y | |||
LastNGames | last_n_games_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_simple | Y | |||
Period | period_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). | ||
ShotClockRange | shot_clock_range_nullable | Y | |||
ShotDistRange | shot_dist_range_nullable | Y | |||
TeamID | team_id_nullable | Y | |||
TouchTimeRange | touch_time_range_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 |
|---|---|---|
team_id | Int64 | Unique team identifier. |
team_name | String | Full team display name (e.g. 'Las Vegas Aces'). |
team_abbreviation | String | Short team abbreviation (e.g. 'LAS'). |
gp | Int64 | Games played. |
g | Int64 | Games played. |
fga_frequency | Float64 | Shooting metric for fga frequency in the requested NBA or WNBA Stats split. |
fgm | Float64 | Field goals made. |
fga | Float64 | Field goal attempts. |
fg_pct | Float64 | Field goal percentage (0-1). |
efg_pct | Float64 | Percentage or rate for efg percentage in the requested NBA or WNBA Stats split. |
fg2_a_frequency | Float64 | Shooting metric for fg2a frequency in the requested NBA or WNBA Stats split. |
fg2_m | Float64 | Shooting metric for fg2m in the requested NBA or WNBA Stats split. |
fg2_a | Float64 | Shooting metric for fg2a in the requested NBA or WNBA Stats split. |
fg2_pct | Float64 | Percentage or rate for two-point field goals percentage in the requested NBA or WNBA Stats split. |
fg3_a_frequency | Float64 | Shooting metric for fg3a frequency in the requested NBA or WNBA Stats split. |
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). |
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_leaguedashteamptshot(league_id='00', season='2024-25')
nba_stats_leaguedashteamshotlocations
League dash team shot locations.
Endpoint URL: GET https://stats.nba.com/stats/leaguedashteamshotlocations
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
Conference | conference_nullable | Y | |||
DateFrom | date_from_nullable | Y | |||
DateTo | date_to_nullable | Y | |||
DistanceRange | distance_range | Y | |||
Division | division_simple_nullable | Y | |||
GameScope | game_scope_simple_nullable | Y | |||
GameSegment | game_segment_nullable | Y | |||
LastNGames | last_n_games | Y | |||
LeagueID | league_id | Y | |||
Location | location_nullable | Y | |||
MeasureType | measure_type_simple | 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 | |||
PlayerExperience | player_experience_nullable | Y | |||
PlayerPosition | player_position_abbreviation_nullable | 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 | |||
StarterBench | starter_bench_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 |
|---|---|---|
team_id | Int64 | Unique team identifier. |
team_name | String | Full team display name (e.g. 'Las Vegas Aces'). |
less_than_5_ft_fgm | Float64 | Field goals made from less than 5 feet. |
less_than_5_ft_fga | Float64 | Field goals attempted from less than 5 feet. |
less_than_5_ft_fg_pct | Float64 | Field goal percentage on shots from less than 5 feet, as a decimal. |
5_9_ft_fgm | Float64 | Field goals made from 5-9 feet. |
5_9_ft_fga | Float64 | Field goals attempted from 5-9 feet. |
5_9_ft_fg_pct | Float64 | Field goal percentage on shots from 5-9-f feet, as a decimal. |
10_14_ft_fgm | Float64 | Field goals made from 10-14 feet. |
10_14_ft_fga | Float64 | Field goals attempted from 10-14 feet. |
10_14_ft_fg_pct | Float64 | Field goal percentage on shots from 10-14-f feet, as a decimal. |
15_19_ft_fgm | Float64 | Field goals made from 15-19 feet. |
15_19_ft_fga | Float64 | Field goals attempted from 15-19 feet. |
15_19_ft_fg_pct | Float64 | Field goal percentage on shots from 15-19-f feet, as a decimal. |
20_24_ft_fgm | Float64 | Field goals made from 20-24 feet. |
20_24_ft_fga | Float64 | Field goals attempted from 20-24 feet. |
20_24_ft_fg_pct | Float64 | Field goal percentage on shots from 20-24-f feet, as a decimal. |
25_29_ft_fgm | Float64 | Field goals made from 25-29 feet. |
25_29_ft_fga | Float64 | Field goals attempted from 25-29 feet. |
25_29_ft_fg_pct | Float64 | Field goal percentage on shots from 25-29-f feet, as a decimal. |
30_34_ft_fgm | Float64 | Field goals made from 30-34 feet. |
30_34_ft_fga | Float64 | Field goals attempted from 30-34 feet. |
30_34_ft_fg_pct | Float64 | Field goal percentage on shots from 30-34-f feet, as a decimal. |
35_39_ft_fgm | Float64 | Field goals made from 35-39 feet. |
35_39_ft_fga | Float64 | Field goals attempted from 35-39 feet. |
35_39_ft_fg_pct | Float64 | Field goal percentage on shots from 35-39-f feet, as a decimal. |
40+_ft_fgm | Float64 | Team field goals made from 40 feet and beyond, per the stats API's shot-location distance bands. |
40+_ft_fga | Float64 | Team field goals attempted from 40 feet and beyond, per the stats API's shot-location distance bands. |
40+_ft_fg_pct | Float64 | Team field-goal percentage on attempts from 40 feet and beyond, 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_leaguedashteamshotlocations(league_id='00', season='2024-25')
nba_stats_leaguedashteamstats
League dash team stats.
Endpoint URL: GET https://stats.nba.com/stats/leaguedashteamstats
| 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 | |||
GameScope | game_scope_simple_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 | |||
PORound | po_round_nullable | Y | |||
PaceAdjust | pace_adjust | Y | |||
PerMode | per_mode_detailed | Y | |||
Period | period | Y | |||
PlayerExperience | player_experience_nullable | Y | |||
PlayerPosition | player_position_abbreviation_nullable | 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 | |||
StarterBench | starter_bench_nullable | Y | |||
TeamID | team_id_nullable | Y | |||
TwoWay | two_way_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 |
|---|---|---|
team_id | Int64 | Unique team identifier. |
team_name | String | Full team display name (e.g. 'Las Vegas Aces'). |
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_leaguedashteamstats(league_id='00', season='2024-25')