Skip to main content
Version: 0.1.5

NHL — additional Python functions — NHL Web API

nhl_scoreboard​

nhl_scoreboard(date: 'Optional[str]' = None, team: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Dict'

In-game scoreboard payload (renamed from nhl_web_scoreboard).

Picks among three mutually-exclusive NHL api-web forms (kept hand-written because the URL-builder codegen can't represent the 3-way branch):

  • GET /v1/scoreboard/{team}/now -- team-scoped now (when team set),
  • GET /v1/scoreboard/{date} -- league-wide on a date,
  • GET /v1/scoreboard/now -- league-wide now (both args None).

Parameters

ParameterTypeDefaultDescription
dateOptional[str]NoneYYYY-MM-DD; None -> /now. Mutually exclusive with team.
teamOptional[str]None3-letter abbreviation; takes precedence over date.
return_parsedboolTruedispatch the raw payload through parse_nhl_web_scoreboard.
return_as_pandasboolFalsewith return_parsed, return pandas instead of polars.

Returns

A polars/pandas DataFrame by default; the raw JSON Dict when return_parsed=False.

col_nametypedescription
scoreboard_datecharacterCalendar date (YYYY-MM-DD) for which this scoreboard snapshot was retrieved from the NHL api-web feed.
idintegerUnique player identifier.
seasonintegerSeason year (echoed from arg).
game_typeintegerGame type the row belongs to.
game_datecharacterGame date.
game_center_linkcharacterLink to the NHL game center page.
start_time_utccharacterScheduled start time in UTC.
eastern_utc_offsetcharacterEastern time UTC offset.
venue_utc_offsetcharacterVenue UTC offset.
tv_broadcastscharacterNested list of TV broadcast details.
game_statecharacterGame state (e.g., FINAL, LIVE).
game_schedule_statecharacterSchedule state of the game.
tickets_linkcharacterURL to the English-language ticket purchase page for the game, as provided by the NHL api-web scoreboard.
tickets_link_frcharacterURL to the French-language ticket purchase page for the game, as provided by the NHL api-web scoreboard.
perioddoublePeriod number.
three_min_recapcharacterLink to the three-minute recap.
three_min_recap_frcharacterLink to the French three-minute recap.
venue_defaultcharacterVenue name (default language).
away_team_idintegerAway team identifier.
away_team_name_defaultcharacterFull English-language team name for the away team, as returned by the NHL api-web scoreboard feed.
away_team_name_frcharacterFull French-language team name for the away team, as returned by the NHL api-web scoreboard feed.
away_team_common_name_defaultcharacterAway team common name (default language).
away_team_place_name_with_preposition_defaultcharacterAway team place name with preposition (default).
away_team_place_name_with_preposition_frcharacterAway team place name with preposition (French).
away_team_abbrevcharacterAway team abbreviation.
away_team_scoredoubleAway team final score.
away_team_logocharacterURL to the away team logo.
home_team_idintegerHome team identifier.
home_team_name_defaultcharacterFull English-language team name for the home team, as returned by the NHL api-web scoreboard feed.
home_team_name_frcharacterFull French-language team name for the home team, as returned by the NHL api-web scoreboard feed.
home_team_common_name_defaultcharacterHome team common name (default language).
home_team_place_name_with_preposition_defaultcharacterHome team place name with preposition (default).
home_team_place_name_with_preposition_frcharacterHome team place name with preposition (French).
home_team_abbrevcharacterHome team abbreviation.
home_team_scoredoubleHome team final score.
home_team_logocharacterURL to the home team logo.
period_descriptor_numberdoublePeriod number.
period_descriptor_period_typecharacterPeriod type (e.g., REG, OT).
period_descriptor_max_regulation_periodsdoubleMaximum number of regulation periods.
series_status_roundintegerPlayoff round number for this game's series (1 = first round, 2 = second round, etc.).
series_status_series_abbrevcharacterShort abbreviation string identifying the specific playoff series matchup (e.g., 'A1' for a particular bracket slot).
series_status_gameintegerGame number within the current playoff series (e.g., 1 through 7) for the game represented in this scoreboard row.
series_status_top_seed_team_abbrevcharacterThree-letter abbreviation for the higher-seeded team in the playoff series context embedded in the scoreboard game entry.
series_status_top_seed_winsintegerNumber of wins accumulated by the higher-seeded team in the current playoff series as of this scoreboard snapshot.
series_status_bottom_seed_team_abbrevcharacterThree-letter abbreviation for the lower-seeded team in the playoff series context embedded in the scoreboard game entry.
series_status_bottom_seed_winsintegerNumber of wins accumulated by the lower-seeded team in the current playoff series as of this scoreboard snapshot.
period_descriptor_ot_periodsdoubleNumber of overtime periods played when the game extended beyond regulation, as reported in the scoreboard period descriptor.
away_team_recordcharacter
home_team_recordcharacter
away_team_common_name_frcharacterAway team common name (French).
home_team_common_name_frcharacterHome team common name (French).
away_team_sogdoubleAway team shots on goal.
home_team_sogdoubleHome team shots on goal.
clock_time_remainingcharacter
clock_seconds_remainingdouble
clock_runninglogical
clock_in_intermissionlogical

Example

nhl_scoreboard(date="2024-03-01")