Skip to contents

Get ESPN NHL Game Plays (core-v2 Play-by-Play)

Usage

espn_nhl_game_plays(event_id, cid = event_id, limit = 300, ...)

Arguments

event_id

ESPN event (game) identifier. Use espn_nhl_scoreboard()$game_id to find valid event ids.

cid

Competition identifier. Defaults to event_id (for NHL the single competition always has the same id as its parent event).

limit

Maximum number of plays to return. Defaults to 300. A typical NHL game has 200-260 plays.

...

Reserved for forward compatibility.

Value

A fastRhockey_data tibble with one row per play:

col_nametypesdescription
event_idcharacterESPN event id (echoed from arg).
cidcharacterCompetition id (echoed from arg).
idcharacterESPN play identifier.
sequence_numberintegerPlay sequence number within the game.
type_idcharacterPlay type id.
type_textcharacterPlay type label (e.g. "Goal", "Shot", "Face Off").
type_abbreviationcharacterPlay type abbreviation.
textcharacterFull play description text.
short_textcharacterShort play description text.
period_numberintegerPeriod number (1-3 regulation, 4+ OT).
period_displaycharacterPeriod display string (e.g. "1st").
clock_valuenumericClock value in seconds.
clock_displaycharacterClock display string (e.g. "19:34").
away_scoreintegerAway team score after this play.
home_scoreintegerHome team score after this play.
scoring_playlogicalWhether this play resulted in a goal.
score_valueintegerPoint value of the scoring play (1 for a goal).
prioritylogicalWhether this is a priority play for display.
shooting_playlogicalWhether this is a shot on goal.
is_penaltylogicalWhether this is a penalty play.
wallclockcharacterWall-clock UTC timestamp of the play.
coordinate_xnumericX coordinate on the ice surface.
coordinate_ynumericY coordinate on the ice surface.
strength_idcharacterStrength situation id (e.g. even strength, PP, SH).
strength_textcharacterStrength situation description.
team_refcharacter$ref URL for the team associated with the play.
play_refcharacter$ref URL for this play object.

See also

Other ESPN NHL Functions: espn_nhl_athletes_index(), espn_nhl_award(), espn_nhl_awards(), espn_nhl_calendar(), espn_nhl_calendar_offseason(), espn_nhl_calendar_ondays(), espn_nhl_calendar_postseason(), espn_nhl_calendar_regular_season(), espn_nhl_coach(), espn_nhl_coach_record(), espn_nhl_coach_season(), espn_nhl_coaches(), espn_nhl_conferences(), espn_nhl_countries(), espn_nhl_draft(), espn_nhl_franchise(), espn_nhl_franchises(), espn_nhl_game(), espn_nhl_game_all(), espn_nhl_game_broadcasts(), espn_nhl_game_competition(), espn_nhl_game_leaders(), espn_nhl_game_odds(), espn_nhl_game_official_detail(), espn_nhl_game_officials(), espn_nhl_game_play(), espn_nhl_game_play_personnel(), espn_nhl_game_powerindex(), espn_nhl_game_predictor(), espn_nhl_game_probabilities(), espn_nhl_game_propbets(), espn_nhl_game_scoringplays(), espn_nhl_game_situation(), espn_nhl_game_status(), espn_nhl_game_team(), espn_nhl_game_team_leaders(), espn_nhl_game_team_linescores(), espn_nhl_game_team_record(), espn_nhl_game_team_roster(), espn_nhl_game_team_statistics(), espn_nhl_game_teams(), espn_nhl_games(), espn_nhl_injuries(), espn_nhl_leaders(), espn_nhl_leaders_core(), espn_nhl_league_notes(), espn_nhl_league_root(), espn_nhl_news(), espn_nhl_pbp(), espn_nhl_player_awards(), espn_nhl_player_bio(), espn_nhl_player_box(), espn_nhl_player_career_stats(), espn_nhl_player_contracts(), espn_nhl_player_core(), espn_nhl_player_eventlog(), espn_nhl_player_gamelog(), espn_nhl_player_info(), espn_nhl_player_injuries(), espn_nhl_player_news(), espn_nhl_player_notes(), espn_nhl_player_overview(), espn_nhl_player_records(), espn_nhl_player_seasons(), espn_nhl_player_splits(), espn_nhl_player_statistics(), espn_nhl_player_statisticslog(), espn_nhl_player_stats_v3(), espn_nhl_player_vs_player(), espn_nhl_players_index(), espn_nhl_position(), espn_nhl_positions(), espn_nhl_providers(), espn_nhl_schedule(), espn_nhl_scoreboard(), espn_nhl_season_athletes(), espn_nhl_season_awards(), espn_nhl_season_coaches(), espn_nhl_season_draft(), espn_nhl_season_draft_round_picks(), espn_nhl_season_freeagents(), espn_nhl_season_futures(), espn_nhl_season_group(), espn_nhl_season_group_children(), espn_nhl_season_group_teams(), espn_nhl_season_groups(), espn_nhl_season_info(), espn_nhl_season_players(), espn_nhl_season_pointer(), espn_nhl_season_powerindex(), espn_nhl_season_powerindex_leaders(), espn_nhl_season_team(), espn_nhl_season_teams(), espn_nhl_season_type(), espn_nhl_season_type_corrections(), espn_nhl_season_type_leaders(), espn_nhl_season_types(), espn_nhl_season_week(), espn_nhl_season_week_games(), espn_nhl_season_weeks(), espn_nhl_seasons(), espn_nhl_standings(), espn_nhl_standings_core(), espn_nhl_statistics_league(), espn_nhl_summary(), espn_nhl_talentpicks(), espn_nhl_team(), espn_nhl_team_box(), espn_nhl_team_core(), espn_nhl_team_depthcharts(), espn_nhl_team_history(), espn_nhl_team_injuries(), espn_nhl_team_leaders(), espn_nhl_team_news(), espn_nhl_team_record(), espn_nhl_team_roster(), espn_nhl_team_schedule(), espn_nhl_team_transactions(), espn_nhl_teams_core(), espn_nhl_teams_site(), espn_nhl_tournaments(), espn_nhl_transactions(), espn_nhl_venue(), espn_nhl_venues()

Author

Saiem Gilani

Examples

# \donttest{
  try({
    sb <- espn_nhl_scoreboard(dates = "20250110")
    espn_nhl_game_plays(event_id = sb$game_id[1])
  })
#> ── NHL Game Plays data from ESPN core-v2 ────────────────── fastRhockey 1.0.0 ──
#>  Data updated: 2026-06-12 14:17:31 UTC
#> # A tibble: 244 × 27
#>    event_id  cid       id    sequence_number type_id type_text type_abbreviation
#>    <chr>     <chr>     <chr>           <int> <chr>   <chr>     <chr>            
#>  1 401688263 401688263 4016…               2 518     Period S… period-start     
#>  2 401688263 401688263 4016…               3 502     Face Off  faceoff          
#>  3 401688263 401688263 4016…               4 503     Hit       hit              
#>  4 401688263 401688263 4016…               5 506     Shot      shot-on-goal     
#>  5 401688263 401688263 4016…               6 506     Shot      shot-on-goal     
#>  6 401688263 401688263 4016…               7 1402    Giveaway  giveaway         
#>  7 401688263 401688263 4016…               8 507     Missed    shot-missed      
#>  8 401688263 401688263 4016…               9 503     Hit       hit              
#>  9 401688263 401688263 4016…              10 1402    Giveaway  giveaway         
#> 10 401688263 401688263 4016…              11 508     Blocked   shot-blocked     
#> # ℹ 234 more rows
#> # ℹ 20 more variables: text <chr>, short_text <chr>, period_number <int>,
#> #   period_display <chr>, clock_value <dbl>, clock_display <chr>,
#> #   away_score <int>, home_score <int>, scoring_play <lgl>, score_value <int>,
#> #   priority <lgl>, shooting_play <lgl>, is_penalty <lgl>, wallclock <chr>,
#> #   coordinate_x <dbl>, coordinate_y <dbl>, strength_id <chr>,
#> #   strength_text <chr>, team_ref <chr>, play_ref <chr>
# }