NBA — NBA Stats API (stats.nba.com) — Franchise
nba_stats_franchisehistory
GET /stats/franchisehistory
Endpoint URL: GET https://stats.nba.com/stats/franchisehistory
Valid URL: https://stats.nba.com/stats/franchisehistory?LeagueID=00
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
LeagueID | league_id | Y |
Returns
return_parsed=True (default) — A dict of DataFrames keyed by result-set name (FranchiseHistory, DefunctTeams) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).
FranchiseHistory
| col_name | type | description |
|---|---|---|
league_id | character | League identifier ('10' = WNBA). |
team_id | integer | Unique team identifier. |
team_city | character | Team city or region (e.g. 'Las Vegas'). |
team_name | character | Full team display name (e.g. 'Las Vegas Aces'). |
start_year | character | First season (start year) of the franchise span, as a string (e.g. '1949'). |
end_year | character | Last season (start year) of the franchise span, as a string; the current season for an active franchise. |
years | integer | Years. |
games | integer | Games played. |
wins | integer | Total wins. |
losses | integer | Total losses. |
win_pct | numeric | Win percentage (0-1 decimal). |
po_appearances | integer | NBA or WNBA Stats value for playoff appearances in the franchisehistory result set. |
div_titles | integer | NBA or WNBA Stats value for div titles in the franchisehistory result set. |
conf_titles | integer | NBA or WNBA Stats value for conf titles in the franchisehistory result set. |
league_titles | integer | NBA or WNBA Stats value for league titles in the franchisehistory result set. |
DefunctTeams
| col_name | type | description |
|---|---|---|
league_id | character | League identifier ('10' = WNBA). |
team_id | integer | Unique team identifier. |
team_city | character | Team city or region (e.g. 'Las Vegas'). |
team_name | character | Full team display name (e.g. 'Las Vegas Aces'). |
start_year | character | First season (start year) of the franchise span, as a string (e.g. '1949'). |
end_year | character | Last season (start year) of the franchise span, as a string; the current season for an active franchise. |
years | integer | Years. |
games | integer | Games played. |
wins | integer | Total wins. |
losses | integer | Total losses. |
win_pct | numeric | Win percentage (0-1 decimal). |
po_appearances | integer | NBA or WNBA Stats value for playoff appearances in the franchisehistory result set. |
div_titles | integer | NBA or WNBA Stats value for div titles in the franchisehistory result set. |
conf_titles | integer | NBA or WNBA Stats value for conf titles in the franchisehistory result set. |
league_titles | integer | NBA or WNBA Stats value for league titles in the franchisehistory result set. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Example
nba_stats_franchisehistory(league_id='00')
Last validated n/a.
nba_stats_franchiseleaders
GET /stats/franchiseleaders
Endpoint URL: GET https://stats.nba.com/stats/franchiseleaders
Valid URL: https://stats.nba.com/stats/franchiseleaders?LeagueID=00&TeamID=1610612739
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
LeagueID | league_id | Y | |||
TeamID | team_id | 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 | integer | Unique team identifier. |
pts | integer | Points scored. |
pts_person_id | integer | Stats API identifier for points person identifier associated with this NBA or WNBA Stats row. |
pts_player | character | Scoring or score-margin metric for points player in the requested NBA or WNBA Stats split. |
ast | integer | Assists. |
ast_person_id | integer | Stats API identifier for assists person identifier associated with this NBA or WNBA Stats row. |
ast_player | character | NBA or WNBA Stats value for assists player in the franchiseleaders result set. |
reb | integer | Rebounds per game. |
reb_person_id | integer | Stats API identifier for rebounds person identifier associated with this NBA or WNBA Stats row. |
reb_player | character | Rebounding metric for rebounds player in the requested NBA or WNBA Stats split. |
blk | integer | Blocks. |
blk_person_id | integer | Stats API identifier for blocks person identifier associated with this NBA or WNBA Stats row. |
blk_player | character | NBA or WNBA Stats value for blocks player in the franchiseleaders result set. |
stl | integer | Steals. |
stl_person_id | integer | Stats API identifier for steals person identifier associated with this NBA or WNBA Stats row. |
stl_player | character | NBA or WNBA Stats value for steals player in the franchiseleaders result set. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Example
nba_stats_franchiseleaders(league_id='00')
Last validated n/a.
nba_stats_franchiseleaderswrank
GET /stats/franchiseleaderswrank
Endpoint URL: GET https://stats.nba.com/stats/franchiseleaderswrank
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
LeagueID | league_id | Y | |||
PerMode | per_mode | Y | |||
SeasonType | season_type | 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 |
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 |
|---|---|---|
league_id | character | League identifier ('10' = WNBA). |
team_id | integer | Unique team identifier. |
team | character | Team-side label or team identifier. |
person_id | integer | Unique player identifier (V3 endpoints). |
player | character | Player name. |
season_type | character | Season type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN; or string label for WNBA Stats). |
active_with_team | integer | Flag indicating whether the franchise leader is still active with the team. |
gp | integer | Games played. |
minutes | numeric | Minutes played, formatted MM:SS (V3 PT-duration parsed) or decimal minutes (V2). |
fgm | numeric | Field goals made. |
fga | numeric | Field goal attempts. |
fg_pct | numeric | Field goal percentage (0-1). |
fg3_m | numeric | Three-point field goals made. |
fg3_a | numeric | Three-point field goal attempts. |
fg3_pct | numeric | Three-point field goal percentage (0-1). |
ftm | numeric | Free throws made. |
fta | numeric | Free throw attempts. |
ft_pct | numeric | Free throw percentage (0-1). |
oreb | numeric | Offensive rebounds. |
dreb | numeric | Defensive rebounds. |
reb | numeric | Rebounds per game. |
ast | numeric | Assists. |
pf | numeric | Personal fouls. |
stl | numeric | Steals. |
tov | numeric | Turnovers. |
blk | numeric | Blocks. |
pts | numeric | Points scored. |
f_rank_gp | integer | Franchise all-time rank of the player's career games played. |
f_rank_minutes | integer | Franchise all-time rank of the player's career minutes played. |
f_rank_fgm | integer | Franchise all-time rank of the player's career field goals made. |
f_rank_fga | integer | Franchise all-time rank of the player's career field goals attempted. |
f_rank_fg_pct | integer | Franchise all-time rank of the player's career field goal percentage. |
f_rank_fg3_m | integer | Franchise all-time rank of the player's career three-point field goals made. |
f_rank_fg3_a | integer | Franchise all-time rank of the player's career three-point field goals attempted. |
f_rank_fg3_pct | integer | Franchise all-time rank of the player's career three-point field goal percentage. |
f_rank_ftm | integer | Franchise all-time rank of the player's career free throws made. |
f_rank_fta | integer | Franchise all-time rank of the player's career free throws attempted. |
f_rank_ft_pct | integer | Franchise all-time rank of the player's career free throw percentage. |
f_rank_oreb | integer | Franchise all-time rank of the player's career offensive rebounds. |
f_rank_dreb | integer | Franchise all-time rank of the player's career defensive rebounds. |
f_rank_reb | integer | Franchise all-time rank of the player's career total rebounds. |
f_rank_ast | integer | Franchise all-time rank of the player's career assists. |
f_rank_pf | integer | Franchise all-time rank of the player's career personal fouls committed. |
f_rank_stl | integer | Franchise all-time rank of the player's career steals. |
f_rank_tov | integer | Franchise all-time rank of the player's career turnovers. |
f_rank_blk | integer | Franchise all-time rank of the player's career blocked shots. |
f_rank_pts | integer | Franchise all-time rank of the player's career points scored. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Example
nba_stats_franchiseleaderswrank(league_id='00')
Last validated n/a.
nba_stats_franchiseplayers
GET /stats/franchiseplayers
Endpoint URL: GET https://stats.nba.com/stats/franchiseplayers
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
LeagueID | league_id | Y | |||
PerMode | per_mode_detailed | 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 |
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 |
|---|---|---|
league_id | character | League identifier ('10' = WNBA). |
team_id | integer | Unique team identifier. |
team | character | Team-side label or team identifier. |
person_id | integer | Unique player identifier (V3 endpoints). |
player | character | Player name. |
season_type | character | Season type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN; or string label for WNBA Stats). |
active_with_team | integer | Flag indicating whether the player is still active with the franchise. |
gp | integer | Games played. |
fgm | numeric | Field goals made. |
fga | numeric | Field goal attempts. |
fg_pct | numeric | Field goal percentage (0-1). |
fg3_m | numeric | Three-point field goals made. |
fg3_a | numeric | Three-point field goal attempts. |
fg3_pct | numeric | Three-point field goal percentage (0-1). |
ftm | numeric | Free throws made. |
fta | numeric | Free throw attempts. |
ft_pct | numeric | Free throw percentage (0-1). |
oreb | numeric | Offensive rebounds. |
dreb | numeric | Defensive rebounds. |
reb | numeric | Rebounds per game. |
ast | numeric | Assists. |
pf | numeric | Personal fouls. |
stl | numeric | Steals. |
tov | numeric | Turnovers. |
blk | numeric | Blocks. |
pts | numeric | Points scored. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Example
nba_stats_franchiseplayers(league_id='00')
Last validated n/a.