Skip to main content

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 ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY

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_nametypedescription
league_idcharacterLeague identifier ('10' = WNBA).
team_idintegerUnique team identifier.
team_citycharacterTeam city or region (e.g. 'Las Vegas').
team_namecharacterFull team display name (e.g. 'Las Vegas Aces').
start_yearcharacterFirst season (start year) of the franchise span, as a string (e.g. '1949').
end_yearcharacterLast season (start year) of the franchise span, as a string; the current season for an active franchise.
yearsintegerYears.
gamesintegerGames played.
winsintegerTotal wins.
lossesintegerTotal losses.
win_pctnumericWin percentage (0-1 decimal).
po_appearancesintegerNBA or WNBA Stats value for playoff appearances in the franchisehistory result set.
div_titlesintegerNBA or WNBA Stats value for div titles in the franchisehistory result set.
conf_titlesintegerNBA or WNBA Stats value for conf titles in the franchisehistory result set.
league_titlesintegerNBA or WNBA Stats value for league titles in the franchisehistory result set.

DefunctTeams

col_nametypedescription
league_idcharacterLeague identifier ('10' = WNBA).
team_idintegerUnique team identifier.
team_citycharacterTeam city or region (e.g. 'Las Vegas').
team_namecharacterFull team display name (e.g. 'Las Vegas Aces').
start_yearcharacterFirst season (start year) of the franchise span, as a string (e.g. '1949').
end_yearcharacterLast season (start year) of the franchise span, as a string; the current season for an active franchise.
yearsintegerYears.
gamesintegerGames played.
winsintegerTotal wins.
lossesintegerTotal losses.
win_pctnumericWin percentage (0-1 decimal).
po_appearancesintegerNBA or WNBA Stats value for playoff appearances in the franchisehistory result set.
div_titlesintegerNBA or WNBA Stats value for div titles in the franchisehistory result set.
conf_titlesintegerNBA or WNBA Stats value for conf titles in the franchisehistory result set.
league_titlesintegerNBA 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 ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
TeamIDteam_idY

Returns​

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

col_nametypedescription
team_idintegerUnique team identifier.
ptsintegerPoints scored.
pts_person_idintegerStats API identifier for points person identifier associated with this NBA or WNBA Stats row.
pts_playercharacterScoring or score-margin metric for points player in the requested NBA or WNBA Stats split.
astintegerAssists.
ast_person_idintegerStats API identifier for assists person identifier associated with this NBA or WNBA Stats row.
ast_playercharacterNBA or WNBA Stats value for assists player in the franchiseleaders result set.
rebintegerRebounds per game.
reb_person_idintegerStats API identifier for rebounds person identifier associated with this NBA or WNBA Stats row.
reb_playercharacterRebounding metric for rebounds player in the requested NBA or WNBA Stats split.
blkintegerBlocks.
blk_person_idintegerStats API identifier for blocks person identifier associated with this NBA or WNBA Stats row.
blk_playercharacterNBA or WNBA Stats value for blocks player in the franchiseleaders result set.
stlintegerSteals.
stl_person_idintegerStats API identifier for steals person identifier associated with this NBA or WNBA Stats row.
stl_playercharacterNBA 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

Valid URL: https://stats.nba.com/stats/franchiseleaderswrank?LeagueID=00&PerMode=Totals&SeasonType=Regular+Season&TeamID=1610612739

API ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
PerModeper_modeY
SeasonTypeseason_typeYSeason 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).
TeamIDteam_idY

Returns​

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

col_nametypedescription
league_idcharacterLeague identifier ('10' = WNBA).
team_idintegerUnique team identifier.
teamcharacterTeam-side label or team identifier.
person_idintegerUnique player identifier (V3 endpoints).
playercharacterPlayer name.
season_typecharacterSeason type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN; or string label for WNBA Stats).
active_with_teamintegerFlag indicating whether the franchise leader is still active with the team.
gpintegerGames played.
minutesnumericMinutes played, formatted MM:SS (V3 PT-duration parsed) or decimal minutes (V2).
fgmnumericField goals made.
fganumericField goal attempts.
fg_pctnumericField goal percentage (0-1).
fg3_mnumericThree-point field goals made.
fg3_anumericThree-point field goal attempts.
fg3_pctnumericThree-point field goal percentage (0-1).
ftmnumericFree throws made.
ftanumericFree throw attempts.
ft_pctnumericFree throw percentage (0-1).
orebnumericOffensive rebounds.
drebnumericDefensive rebounds.
rebnumericRebounds per game.
astnumericAssists.
pfnumericPersonal fouls.
stlnumericSteals.
tovnumericTurnovers.
blknumericBlocks.
ptsnumericPoints scored.
f_rank_gpintegerFranchise all-time rank of the player's career games played.
f_rank_minutesintegerFranchise all-time rank of the player's career minutes played.
f_rank_fgmintegerFranchise all-time rank of the player's career field goals made.
f_rank_fgaintegerFranchise all-time rank of the player's career field goals attempted.
f_rank_fg_pctintegerFranchise all-time rank of the player's career field goal percentage.
f_rank_fg3_mintegerFranchise all-time rank of the player's career three-point field goals made.
f_rank_fg3_aintegerFranchise all-time rank of the player's career three-point field goals attempted.
f_rank_fg3_pctintegerFranchise all-time rank of the player's career three-point field goal percentage.
f_rank_ftmintegerFranchise all-time rank of the player's career free throws made.
f_rank_ftaintegerFranchise all-time rank of the player's career free throws attempted.
f_rank_ft_pctintegerFranchise all-time rank of the player's career free throw percentage.
f_rank_orebintegerFranchise all-time rank of the player's career offensive rebounds.
f_rank_drebintegerFranchise all-time rank of the player's career defensive rebounds.
f_rank_rebintegerFranchise all-time rank of the player's career total rebounds.
f_rank_astintegerFranchise all-time rank of the player's career assists.
f_rank_pfintegerFranchise all-time rank of the player's career personal fouls committed.
f_rank_stlintegerFranchise all-time rank of the player's career steals.
f_rank_tovintegerFranchise all-time rank of the player's career turnovers.
f_rank_blkintegerFranchise all-time rank of the player's career blocked shots.
f_rank_ptsintegerFranchise 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

Valid URL: https://stats.nba.com/stats/franchiseplayers?LeagueID=00&PerMode=Totals&SeasonType=Regular+Season&TeamID=1610612739

API ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
PerModeper_mode_detailedY
SeasonTypeseason_type_all_starYSeason 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).
TeamIDteam_idY

Returns​

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

col_nametypedescription
league_idcharacterLeague identifier ('10' = WNBA).
team_idintegerUnique team identifier.
teamcharacterTeam-side label or team identifier.
person_idintegerUnique player identifier (V3 endpoints).
playercharacterPlayer name.
season_typecharacterSeason type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN; or string label for WNBA Stats).
active_with_teamintegerFlag indicating whether the player is still active with the franchise.
gpintegerGames played.
fgmnumericField goals made.
fganumericField goal attempts.
fg_pctnumericField goal percentage (0-1).
fg3_mnumericThree-point field goals made.
fg3_anumericThree-point field goal attempts.
fg3_pctnumericThree-point field goal percentage (0-1).
ftmnumericFree throws made.
ftanumericFree throw attempts.
ft_pctnumericFree throw percentage (0-1).
orebnumericOffensive rebounds.
drebnumericDefensive rebounds.
rebnumericRebounds per game.
astnumericAssists.
pfnumericPersonal fouls.
stlnumericSteals.
tovnumericTurnovers.
blknumericBlocks.
ptsnumericPoints scored.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nba_stats_franchiseplayers(league_id='00')

Last validated n/a.