Skip to main content

NHL — NHL Records API — Franchise

nhl_records_franchises​

List all NHL franchises (historical and active).

Endpoint URL: GET https://records.nhl.com/site/api/franchise

Valid URL: https://records.nhl.com/site/api/franchise

API ParameterPythonPatternRequiredNullableDescription

Returns​

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

col_nametypedescription
idInt64Unique player identifier.
first_season_idInt64Season identifier of the first season.
full_nameStringPlayer full name.
last_season_idInt64Season ID of the franchise's last season.
most_recent_team_idInt64Most recent team identifier.
team_abbrevStringTeam abbreviation.
team_common_nameStringTeam common (nickname) name.
team_place_nameStringTeam place (city/location) name.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

nhl_records_franchises()

nhl_records_franchise_detail​

Franchise detail records (extended metadata per franchise).

Endpoint URL: GET https://records.nhl.com/site/api/franchise-detail

Valid URL: https://records.nhl.com/site/api/franchise-detail

API ParameterPythonPatternRequiredNullableDescription

Returns​

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

col_nametypedescription
idInt64Unique player identifier.
activeBooleanWhether athlete is currently active.
captain_historyStringFranchise captain history text.
coaching_historyStringFranchise coaching history text.
date_awardedStringDate the franchise was awarded.
directory_urlStringFranchise directory URL.
first_season_idInt64Season identifier of the first season.
general_manager_historyStringFranchise general manager history text.
hero_image_urlStringFranchise hero image URL.
most_recent_team_idInt64Most recent team identifier.
retired_numbers_summaryStringSummary of retired jersey numbers.
team_abbrevStringTeam abbreviation.
team_full_nameStringFull team name.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

nhl_records_franchise_detail()

nhl_records_franchise_team_totals​

All-time team totals per franchise (regular season).

Endpoint URL: GET https://records.nhl.com/site/api/franchise-team-totals

Valid URL: https://records.nhl.com/site/api/franchise-team-totals

API ParameterPythonPatternRequiredNullableDescription

Returns​

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

col_nametypedescription
idInt64Unique player identifier.
active_franchiseInt64Indicator of whether the franchise is active.
active_teamBooleanIndicator of whether the team is active.
cupsInt64Number of Stanley Cup championships.
first_season_idInt64Season identifier of the first season.
franchise_idInt64Unique franchise identifier.
game_type_idInt64Game type identifier (regular/playoffs).
game_win_pctgFloat64Game-winning percentage.
games_playedFloat64Games played.
goals_againstFloat64Goals against.
goals_forFloat64Goals for.
home_lossesFloat64Losses at home.
home_overtime_lossesFloat64Overtime losses at home.
home_tiesFloat64Ties at home.
home_winsFloat64Wins at home.
last_season_idInt64Season ID of the franchise's last season.
lossesFloat64Losses.
overtime_lossesFloat64Total overtime losses.
penalty_minutesFloat64Penalty minutes.
playoff_seasonsFloat64Number of playoff seasons.
point_pctgFloat64Points percentage.
pointsFloat64Total points (goals + assists).
road_lossesFloat64Losses on the road.
road_overtime_lossesFloat64Overtime losses on the road.
road_tiesFloat64Ties on the road.
road_winsFloat64Wins on the road.
series_lossesInt64Playoff series losses.
series_playedFloat64Playoff series played.
series_win_pctgFloat64Playoff series win percentage.
series_winsInt64Playoff series wins.
shootout_lossesFloat64Shootout losses.
shootout_winsFloat64Shootout wins.
shutoutsFloat64Shutouts recorded.
team_idInt64Unique team identifier.
team_nameStringTeam name.
tiesFloat64Total ties.
tri_codeStringTeam three-letter code.
winsFloat64Wins.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

nhl_records_franchise_team_totals()

nhl_records_franchise_season_results​

Season-by-season results for each franchise.

Endpoint URL: GET https://records.nhl.com/site/api/franchise-season-results

Valid URL: https://records.nhl.com/site/api/franchise-season-results

API ParameterPythonPatternRequiredNullableDescription

Returns​

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

col_nametypedescription
idInt64Unique player identifier.
conference_abbrevStringConference abbreviation.
conference_nameStringConference name.
conference_sequenceInt64Team's seeding position within the conference.
decisionStringGoalie decision (W/L/O).
division_abbrevStringDivision abbreviation.
division_nameStringDivision name.
division_sequenceInt64Team's seeding position within the division.
final_playoff_roundInt64Final playoff round reached.
franchise_idInt64Unique franchise identifier.
game_type_idInt64Game type identifier (regular/playoffs).
games_playedInt64Games played.
goalsInt64Goals scored.
goals_againstInt64Goals against.
home_lossesInt64Losses at home.
home_overtime_lossesStringOvertime losses at home.
home_tiesInt64Ties at home.
home_winsInt64Wins at home.
in_playoffsBooleanWhether the season reached the playoffs.
league_sequenceInt64Team's seeding position within the league.
lossesInt64Losses.
overtime_lossesStringTotal overtime losses.
penalty_minutesInt64Penalty minutes.
playoff_roundFloat64Playoff round identifier.
pointsInt64Total points (goals + assists).
road_lossesInt64Losses on the road.
road_overtime_lossesStringOvertime losses on the road.
road_tiesInt64Ties on the road.
road_winsInt64Wins on the road.
season_idInt64Season identifier.
series_abbrevStringPlayoff series abbreviation.
series_titleStringPlayoff series title.
shutoutsInt64Shutouts recorded.
team_idInt64Unique team identifier.
team_nameStringTeam name.
tiesInt64Total ties.
tri_codeStringTeam three-letter code.
winsInt64Wins.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

nhl_records_franchise_season_results()

nhl_records_franchise_playoff_appearances​

Franchise playoff appearance counts and streak information.

Endpoint URL: GET https://records.nhl.com/site/api/franchise-playoff-appearances

Valid URL: https://records.nhl.com/site/api/franchise-playoff-appearances

API ParameterPythonPatternRequiredNullableDescription

Returns​

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

col_nametypedescription
idInt64Unique player identifier.
first_season_idInt64Season identifier of the first season.
franchise_idInt64Unique franchise identifier.
franchise_nameStringFranchise name.
playoff_seasonsInt64Number of playoff seasons.
stanley_cup_appearancesInt64Number of Stanley Cup Final appearances.
stanley_cup_winsInt64Number of Stanley Cup championships.
yearsInt64Number of years the franchise existed.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

nhl_records_franchise_playoff_appearances()

nhl_records_franchise_totals​

League-wide franchise totals (all-time aggregate per franchise).

Endpoint URL: GET https://records.nhl.com/site/api/franchise-totals

Valid URL: https://records.nhl.com/site/api/franchise-totals

API ParameterPythonPatternRequiredNullableDescription

Returns​

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

col_nametypedescription
idInt64Unique player identifier.
active_franchiseInt64Indicator of whether the franchise is active.
cupsInt64Number of Stanley Cup championships.
first_season_idInt64Season identifier of the first season.
franchise_idInt64Unique franchise identifier.
game_type_idInt64Game type identifier (regular/playoffs).
game_win_pctgFloat64Game-winning percentage.
games_playedInt64Games played.
goals_againstInt64Goals against.
goals_forInt64Goals for.
home_lossesInt64Losses at home.
home_overtime_lossesFloat64Overtime losses at home.
home_tiesFloat64Ties at home.
home_winsInt64Wins at home.
last_season_idInt64Season ID of the franchise's last season.
lossesInt64Losses.
overtime_lossesFloat64Total overtime losses.
penalty_minutesInt64Penalty minutes.
playoff_seasonsFloat64Number of playoff seasons.
point_pctgFloat64Points percentage.
pointsInt64Total points (goals + assists).
road_lossesInt64Losses on the road.
road_overtime_lossesFloat64Overtime losses on the road.
road_tiesFloat64Ties on the road.
road_winsInt64Wins on the road.
series_lossesFloat64Playoff series losses.
series_playedFloat64Playoff series played.
series_win_pctgFloat64Playoff series win percentage.
series_winsFloat64Playoff series wins.
shootout_lossesInt64Shootout losses.
shootout_winsInt64Shootout wins.
shutoutsInt64Shutouts recorded.
team_abbrevStringTeam abbreviation.
team_idInt64Unique team identifier.
team_nameStringTeam name.
tiesFloat64Total ties.
winsInt64Wins.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

nhl_records_franchise_totals()