Skip to main content

NHL — NHL Web API — Ppt

nhl_ppt_replay​

Pull the replay metadata (game header plus goal, video clip and sprite links) for one game event.

Endpoint URL: GET https://api-web.nhle.com/v1/ppt-replay/{game_id}/{event_number}

Valid URL: https://api-web.nhle.com/v1/ppt-replay/2025020500/261

API ParameterPythonPatternRequiredNullableDescription
game_idgame_idYgame_id path parameter.
event_numberevent_numberYEvent id of the play within the game (the play-by-play event_id).

Returns​

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

col_nametypedescription
game_idInt64Unique game identifier.
game_dateStringGame date.
game_stateStringGame state (e.g., FINAL, LIVE).
game_typeInt64Game type the row belongs to.
away_team_abbrevStringAway team abbreviation.
away_team_dark_logoStringURL to the away team dark logo.
away_team_idInt64Away team identifier.
away_team_logoStringURL to the away team logo.
away_team_name_defaultStringAway team common name (default locale, e.g., 'Canadiens').
away_team_place_name_defaultStringAway team place name (default language).
away_team_place_name_with_preposition_defaultStringAway team place name with preposition (default).
away_team_place_name_with_preposition_frStringAway team place name with preposition (French).
goal_assistsStringGoal events only (a non-goal event's frame has no goal_* columns). JSON-encoded list of the goal's assists (player id, names, assists to date, sweater number).
goal_away_scoreInt64Goal events only (a non-goal event's frame has no goal_* columns). Away team's score after the goal.
goal_event_idInt64Goal events only (a non-goal event's frame has no goal_* columns). Play-by-play event id of the goal.
goal_first_name_defaultStringGoal events only (a non-goal event's frame has no goal_* columns). Goal scorer's first name (default locale).
goal_goal_modifierStringGoal events only (a non-goal event's frame has no goal_* columns). Modifier the feed attaches to the goal (e.g., 'none').
goal_goals_to_dateInt64Goal events only (a non-goal event's frame has no goal_* columns). Goal scorer's season goal total, counting this goal.
goal_headshotStringGoal events only (a non-goal event's frame has no goal_* columns). URL of the goal scorer's headshot image.
goal_highlight_clipInt64Goal events only (a non-goal event's frame has no goal_* columns). Video id of the goal's English highlight clip.
goal_highlight_clip_frInt64Goal events only (a non-goal event's frame has no goal_* columns). Video id of the goal's French highlight clip.
goal_highlight_clip_sharing_urlStringGoal events only (a non-goal event's frame has no goal_* columns). NHL.com sharing URL of the goal's English highlight clip.
goal_highlight_clip_sharing_url_frStringGoal events only (a non-goal event's frame has no goal_* columns). NHL.com sharing URL of the goal's French highlight clip.
goal_home_scoreInt64Goal events only (a non-goal event's frame has no goal_* columns). Home team's score after the goal.
goal_home_team_defending_sideStringGoal events only (a non-goal event's frame has no goal_* columns). Side of the rink ('left' or 'right') the home team defends in the goal's period.
goal_is_homeBooleanGoal events only (a non-goal event's frame has no goal_* columns). True when the scoring team is the home team.
goal_last_name_defaultStringGoal events only (a non-goal event's frame has no goal_* columns). Goal scorer's last name (default locale).
goal_leading_team_abbrev_defaultStringGoal events only (a non-goal event's frame has no goal_* columns). Abbreviation of the team leading after the goal.
goal_logo_urlStringGoal events only (a non-goal event's frame has no goal_* columns). URL of the scoring team's logo.
goal_name_defaultStringGoal events only (a non-goal event's frame has no goal_* columns). Goal scorer's display name (default locale, e.g., 'Z. Bolduc').
goal_period_descriptor_max_regulation_periodsInt64Goal events only (a non-goal event's frame has no goal_* columns). Number of regulation periods in the game (3).
goal_period_descriptor_numberInt64Goal events only (a non-goal event's frame has no goal_* columns). Period the goal was scored in.
goal_period_descriptor_period_typeStringGoal events only (a non-goal event's frame has no goal_* columns). Type of the period the goal was scored in ('REG', 'OT' or 'SO').
goal_player_idInt64Goal events only (a non-goal event's frame has no goal_* columns). NHL player id of the goal scorer.
goal_ppt_replay_urlStringGoal events only (a non-goal event's frame has no goal_* columns). URL of the goal's puck-and-player tracking replay sprite file.
goal_shot_typeStringGoal events only (a non-goal event's frame has no goal_* columns). Shot type of the goal (e.g., 'wrist', 'snap', 'slap').
goal_situation_codeStringGoal events only (a non-goal event's frame has no goal_* columns). Four-digit on-ice situation code at the goal: away goalie, away skaters, home skaters, home goalie (e.g., '1551').
goal_strengthStringGoal events only (a non-goal event's frame has no goal_* columns). Strength the goal was scored at ('ev', 'pp' or 'sh').
goal_sweater_numberInt64Goal events only (a non-goal event's frame has no goal_* columns). Goal scorer's sweater number.
goal_team_abbrev_defaultStringGoal events only (a non-goal event's frame has no goal_* columns). Abbreviation of the scoring team.
goal_time_in_periodStringGoal events only (a non-goal event's frame has no goal_* columns). Elapsed time in the period at the goal (MM:SS).
home_team_abbrevStringHome team abbreviation.
home_team_dark_logoStringURL to the home team dark logo.
home_team_idInt64Home team identifier.
home_team_logoStringURL to the home team logo.
home_team_name_defaultStringHome team common name (default locale, e.g., 'Rangers').
home_team_place_name_defaultStringHome team place name (default language).
home_team_place_name_with_preposition_defaultStringHome team place name with preposition (default).
home_team_place_name_with_preposition_frStringHome team place name with preposition (French).

return_parsed=False — the raw JSON payload: a dict, or a list for the endpoints that answer an array (nhl_postal_lookup, nhl_smartlinks).

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_ppt_replay(game_id=2025020500, event_number=261)

nhl_ppt_replay_goal​

Pull the replay metadata for one goal event (the host redirects to the event replay).

Endpoint URL: GET https://api-web.nhle.com/v1/ppt-replay/goal/{game_id}/{event_number}

Valid URL: https://api-web.nhle.com/v1/ppt-replay/goal/2025020500/261

API ParameterPythonPatternRequiredNullableDescription
game_idgame_idYgame_id path parameter.
event_numberevent_numberYEvent id of the goal within the game (the play-by-play event_id).

Returns​

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

col_nametypedescription
game_idInt64Unique game identifier.
game_dateStringGame date.
game_stateStringGame state (e.g., FINAL, LIVE).
game_typeInt64Game type the row belongs to.
away_team_abbrevStringAway team abbreviation.
away_team_dark_logoStringURL to the away team dark logo.
away_team_idInt64Away team identifier.
away_team_logoStringURL to the away team logo.
away_team_name_defaultStringAway team common name (default locale, e.g., 'Canadiens').
away_team_place_name_defaultStringAway team place name (default language).
away_team_place_name_with_preposition_defaultStringAway team place name with preposition (default).
away_team_place_name_with_preposition_frStringAway team place name with preposition (French).
goal_assistsStringJSON-encoded list of the goal's assists (player id, names, assists to date, sweater number).
goal_away_scoreInt64Away team's score after the goal.
goal_event_idInt64Play-by-play event id of the goal.
goal_first_name_defaultStringGoal scorer's first name (default locale).
goal_goal_modifierStringModifier the feed attaches to the goal (e.g., 'none').
goal_goals_to_dateInt64Goal scorer's season goal total, counting this goal.
goal_headshotStringURL of the goal scorer's headshot image.
goal_highlight_clipInt64Video id of the goal's English highlight clip.
goal_highlight_clip_frInt64Video id of the goal's French highlight clip.
goal_highlight_clip_sharing_urlStringNHL.com sharing URL of the goal's English highlight clip.
goal_highlight_clip_sharing_url_frStringNHL.com sharing URL of the goal's French highlight clip.
goal_home_scoreInt64Home team's score after the goal.
goal_home_team_defending_sideStringSide of the rink ('left' or 'right') the home team defends in the goal's period.
goal_is_homeBooleanTrue when the scoring team is the home team.
goal_last_name_defaultStringGoal scorer's last name (default locale).
goal_leading_team_abbrev_defaultStringAbbreviation of the team leading after the goal.
goal_logo_urlStringURL of the scoring team's logo.
goal_name_defaultStringGoal scorer's display name (default locale, e.g., 'Z. Bolduc').
goal_period_descriptor_max_regulation_periodsInt64Number of regulation periods in the game (3).
goal_period_descriptor_numberInt64Period the goal was scored in.
goal_period_descriptor_period_typeStringType of the period the goal was scored in ('REG', 'OT' or 'SO').
goal_player_idInt64NHL player id of the goal scorer.
goal_ppt_replay_urlStringURL of the goal's puck-and-player tracking replay sprite file.
goal_shot_typeStringShot type of the goal (e.g., 'wrist', 'snap', 'slap').
goal_situation_codeStringFour-digit on-ice situation code at the goal: away goalie, away skaters, home skaters, home goalie (e.g., '1551').
goal_strengthStringStrength the goal was scored at ('ev', 'pp' or 'sh').
goal_sweater_numberInt64Goal scorer's sweater number.
goal_team_abbrev_defaultStringAbbreviation of the scoring team.
goal_time_in_periodStringElapsed time in the period at the goal (MM:SS).
home_team_abbrevStringHome team abbreviation.
home_team_dark_logoStringURL to the home team dark logo.
home_team_idInt64Home team identifier.
home_team_logoStringURL to the home team logo.
home_team_name_defaultStringHome team common name (default locale, e.g., 'Rangers').
home_team_place_name_defaultStringHome team place name (default language).
home_team_place_name_with_preposition_defaultStringHome team place name with preposition (default).
home_team_place_name_with_preposition_frStringHome team place name with preposition (French).

return_parsed=False — the raw JSON payload: a dict, or a list for the endpoints that answer an array (nhl_postal_lookup, nhl_smartlinks).

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_ppt_replay_goal(game_id=2025020500, event_number=261)