| Title: | Scraper for National Hockey League Data |
|---|---|
| Description: | Scrapes and cleans data from the 'NHL' and 'ESPN' APIs into data.frames and lists. Wraps 125+ endpoints documented in <https://github.com/RentoSaijo/nhlscraper/wiki> from high-level multi-season summaries and award winners to low-level decisecond replays and bookmakers' odds, making them more accessible. Features cleaning and analysis tools, primarily for play-by-plays. |
| Authors: | Rento Saijo [aut, cre, cph] (ORCID: <https://orcid.org/0009-0008-4919-7349>), Lars Skytte [aut], Jack Pallotta [aut] (ORCID: <https://orcid.org/0009-0004-0744-6977>) |
| Maintainer: | Rento Saijo <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.7.0.9000 |
| Built: | 2026-10-22 08:45:28 UTC |
| Source: | https://github.com/rentosaijo/nhlscraper |
add_deltas() adds event-to-event deltas in raw and normalized x/y,
distance, and angle for a play-by-play. Sequences are bounded by faceoffs:
each sequence begins at a faceoff, faceoff rows do not look backward across
the boundary, and subsequent events are compared to the most recent prior
valid-spatial event in the same faceoff-bounded sequence. Shootout and
penalty-shot rows (0101/1010) are left as NA and do not serve as
anchors for later rows. When multiple events in a sequence share the same
recorded second, zero-time denominators used internally are replaced by
1 / n, where n is the number of events in that same second within the
sequence.
add_deltas(play_by_play)add_deltas(play_by_play)
play_by_play |
data.frame of play-by-play(s) using the current public schema returned by |
data.frame with one row per event (play) and added columns: eventIdPrev, secondsElapsedInSequence, dSecondsElapsedInSequence, dXCoord, dYCoord, dXCoordNorm, dYCoordNorm, dDistance, dAngle, dXCoordPerSecond, dYCoordPerSecond, dXCoordNormPerSecond, dYCoordNormPerSecond, dDistancePerSecond, dAnglePerSecond
add_goalie_biometrics() adds goalie biometrics (height, weight, hand, and age at game date) to (a) play-by-play(s) for shot attempts. Goalie identity is resolved from goalieInNetId first and goaliePlayerIdAgainst second. If neither is available on a row, the added goalie biometrics are left as NA.
add_goalie_biometrics(play_by_play)add_goalie_biometrics(play_by_play)
play_by_play |
data.frame of play-by-play(s) using the current public schema returned by |
data.frame with one row per event (play) and added columns: goalieHeight, goalieWeight, goalieHandCode, and goalieAge
add_shift_times() adds SecondsRemainingInShift,
SecondsElapsedInShift, and SecondsElapsedInPeriodSinceLastShift columns
for the on-ice goalies and skaters already present in a public play-by-play.
It accepts either a single game play-by-play plus shift_chart() data or a
season aggregate plus shift_charts() data.
add_shift_times(play_by_play, shift_chart)add_shift_times(play_by_play, shift_chart)
play_by_play |
data.frame of play-by-play(s) using the current public schema returned by |
shift_chart |
data.frame returned by |
data.frame with one row per event (play) and added or updated scalar on-ice shift timing columns
pbp <- gc_play_by_play(game = 2023030417) sc <- shift_chart(game = 2023030417) pbp <- add_shift_times(pbp, sc)pbp <- gc_play_by_play(game = 2023030417) sc <- shift_chart(game = 2023030417) pbp <- add_shift_times(pbp, sc)
add_shooter_biometrics() adds shooter biometrics (height, weight, hand, age at game date, and position) to (a) play-by-play(s) for shot attempts.
add_shooter_biometrics(play_by_play)add_shooter_biometrics(play_by_play)
play_by_play |
data.frame of play-by-play(s) using the current public schema returned by |
data.frame with one row per event (play) and added columns: shooterHeight, shooterWeight, shooterHandCode, shooterAge, and shooterPositionCode
attendance() returns records-site attendance totals by season and game type.
attendance()attendance()
data.frame with one row per season
all_attendance <- attendance()all_attendance <- attendance()
award_winners() returns historical trophy winners and finalists with one
row per player/season/status entry.
award_winners()award_winners()
data.frame with one row per winner/finalist
all_award_winners <- award_winners()all_award_winners <- award_winners()
awards() returns the records-site trophy catalog with one row per award
and normalized trophy IDs, names, and short names.
awards()awards()
data.frame with one row per award
all_awards <- awards()all_awards <- awards()
boxscore() returns one side of the GameCenter boxscore for one position
group. Each row is a player with normalized name/position fields and the
game-stat columns exposed for that group.
boxscore(game = 2023030417, team = "home", position = "forwards")boxscore(game = 2023030417, team = "home", position = "forwards")
game |
integer ID (e.g., 2025020275); see |
team |
character of 'h'/'home' or 'a'/'away' |
position |
character of 'f'/'forwards', 'd'/'defensemen', or 'g'/'goalies' |
data.frame with one row per player
boxscore_COL_forwards_Martin_Necas_legacy_game <- boxscore( game = 2025020275, team = 'H', position = 'F' )boxscore_COL_forwards_Martin_Necas_legacy_game <- boxscore( game = 2025020275, team = 'H', position = 'F' )
bracket() returns the public playoff bracket for one season, with one row
per series and normalized team, seed, score, and series-status fields.
bracket(season = season_now())bracket(season = season_now())
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per series
bracket_20242025 <- bracket(season = 20242025)bracket_20242025 <- bracket(season = 20242025)
calculate_expected_goals() scores shot events with nhlscraper's rolling
XGBoost expected-goals models. The package ships the small preprocessing
bundle and downloads needed boosters from the companion NHLxG model store
into a local user cache on first use. Each shot is routed to the matching
season vintage and one of six game-state partitions: sd (5v5), ev (other
even strength), pp (power play), sh (short-handed), en (empty net
against), and ps (penalty shot; trained on penalty-shot and shootout-style
rows). The legacy model argument is accepted for backward compatibility but
ignored.
calculate_expected_goals(play_by_play, model = NULL) calculate_xG(play_by_play, model = NULL)calculate_expected_goals(play_by_play, model = NULL) calculate_xG(play_by_play, model = NULL)
play_by_play |
data.frame of play-by-play(s) using the current public
schema returned by |
model |
deprecated legacy model selector; ignored |
data.frame with one row per event (play) and added xG column
# May take >5s, so skip. pbp <- gc_play_by_play() pbp_with_xg <- calculate_expected_goals(play_by_play = pbp)# May take >5s, so skip. pbp <- gc_play_by_play() pbp_with_xg <- calculate_expected_goals(play_by_play = pbp)
calculate_shift_times_by_situation() returns one row per player per period
and splits time on ice by the exact play-by-play situationCode in effect
during that player's shifts. This differs from shift_chart_summary(),
which reads the NHL HTML report's broad EV/PP/SH totals. Here, shift seconds
come from shift_chart() and strength state comes from gc_play_by_play().
When season is supplied, it overrides game and the function uses
gc_play_by_plays() with shift_charts() for the full season.
calculate_shift_times_by_situation(game = 2023030417, season = NULL)calculate_shift_times_by_situation(game = 2023030417, season = NULL)
game |
integer ID (e.g., 2023030417); ignored when |
season |
optional integer season ID (e.g., 20232024) |
In the play-by-play, the four situationCode digits mean away goalie count,
away skater count, home skater count, and home goalie count. In this output,
the four digits in each situation-specific column mean player-team goalie
count, player-team skater count, opponent skater count, and opponent goalie
count. For example, raw 1451 means home skaters are on a 5-on-4 power play;
those seconds are written to 1541TimeOnIce for home players and
1451TimeOnIce for away players.
data.frame with one row per player per period and
situation-specific TimeOnIce columns
shift_situations_2023030417 <- calculate_shift_times_by_situation( game = 2023030417 )shift_situations_2023030417 <- calculate_shift_times_by_situation( game = 2023030417 )
coach_career_statistics() returns regular-season plus playoff career
coaching records with one row per coach.
coach_career_statistics() coach_career_stats()coach_career_statistics() coach_career_stats()
data.frame with one row per coach
coach_career_stats <- coach_career_statistics()coach_career_stats <- coach_career_statistics()
coach_franchise_statistics() returns coach records by franchise and game
type, with one row per coach/franchise/game-type stint.
coach_franchise_statistics() coach_franchise_stats()coach_franchise_statistics() coach_franchise_stats()
data.frame with one row per franchise per coach per game type
coach_franchise_stats <- coach_franchise_statistics()coach_franchise_stats <- coach_franchise_statistics()
coaches() returns the records-site coach registry with one row per coach
and normalized coach IDs, names, and birth fields.
coaches()coaches()
data.frame with one row per coach
all_coaches <- coaches()all_coaches <- coaches()
combine_reports() returns draft-combine measurements and test results with
one row per player/event result.
combine_reports()combine_reports()
data.frame with one row per player
combine_reports <- combine_reports()combine_reports <- combine_reports()
contracts() loads preprocessed contract records bundled with the package,
resolves each row to an NHL player ID when the player registry has a clear
match, drops unresolved/ambiguous matches, and returns normalized contract
seasons and money fields.
contracts()contracts()
data.frame with one row per contract
all_contracts <- contracts()all_contracts <- contracts()
countries() returns the stats API country catalog with one row per country
and normalized two-/three-letter country fields.
countries()countries()
data.frame with one row per country
all_countries <- countries()all_countries <- countries()
draft_picks() returns the historical draft-pick table with one row per
pick, including draft year/round/overall slot, team, player, position, and
biographical fields.
draft_picks()draft_picks()
data.frame with one row per pick
# May take >5s, so skip. all_draft_picks <- draft_picks()# May take >5s, so skip. all_draft_picks <- draft_picks()
draft_prospects() returns the records-site prospect registry with one row
per prospect and normalized prospect/player IDs, names, birth data, and
profile fields.
draft_prospects()draft_prospects()
data.frame with one row per player
# May take >5s, so skip. all_prospects <- draft_prospects()# May take >5s, so skip. all_prospects <- draft_prospects()
draft_rankings() returns NHL Central Scouting rankings for one draft class
and skater/goalie region group, with one row per ranked prospect.
draft_rankings(class = season_now()%%10000, category = 1)draft_rankings(class = season_now()%%10000, category = 1)
class |
integer in YYYY (e.g., 2017); see |
category |
integer in 1:4 (where 1 = North American Skaters, 2 = International Skaters, 3 = North American Goalies, and 4 = International Goalies) OR character of 'NAS'/'NA Skaters'/'North American Skaters', 'INTLS'/'INTL Skaters'/'International Skaters', 'NAG'/'NA Goalies'/'North American Goalies', 'INTLG'/'INTL Goalies'/'International Goalies' |
data.frame with one row per player
draft_rankings_INTL_Skaters_2017 <- draft_rankings( class = 2017, category = 2 )draft_rankings_INTL_Skaters_2017 <- draft_rankings( class = 2017, category = 2 )
draft_tracker() returns the live NHL draft tracker picks for the current
draft, with normalized player, team, round, and pick fields.
draft_tracker()draft_tracker()
data.frame with one row per player
draft_tracker <- draft_tracker()draft_tracker <- draft_tracker()
drafts() merges the records draft master and stats draft-round endpoints,
returning one row per draft year with IDs, dates, location, and round
metadata.
drafts()drafts()
data.frame with one row per draft
all_drafts <- drafts()all_drafts <- drafts()
draw_NHL_rink() draws a full NHL rink such that the x and y coordinates
span -100 to 100 and -43 to +43, respectively. Use graphics::points()
to create custom graphs; check out an example on the online documentation!
draw_NHL_rink()draw_NHL_rink()
NULL
draw_NHL_rink()draw_NHL_rink()
espn_futures() returns ESPN futures markets for one season with one row per
future type and nested book/odds detail retained in ESPN's payload columns.
espn_futures(season = season_now())espn_futures(season = season_now())
season |
integer in YYYYYYYY (e.g., 20242025); see |
nested data.frame with one row per type (outer) and book (inner)
ESPN_futures_20252026 <- espn_futures(20252026)ESPN_futures_20252026 <- espn_futures(20252026)
espn_game_odds() returns ESPN's odds items for one game with one row per
provider/market entry and camelCase names for nested price, spread, and total
fields.
espn_game_odds(game = 401777460)espn_game_odds(game = 401777460)
game |
integer ID (e.g., 401777460); see |
data.frame with one row per provider
ESPN_odds_SCF_20242025 <- espn_game_odds(game = 401777460)ESPN_odds_SCF_20242025 <- espn_game_odds(game = 401777460)
espn_game_summary() returns ESPN's competition summary for one game after
dropping large availability/link/detail blocks, leaving the compact game,
competitor, venue, date, format, and series fields exposed by the core API.
espn_game_summary(game = 401777460)espn_game_summary(game = 401777460)
game |
integer ID (e.g., 401777460); see |
list with various items
ESPN_summary_SCF_20242025 <- espn_game_summary(game = 401777460)ESPN_summary_SCF_20242025 <- espn_game_summary(game = 401777460)
espn_games() pages ESPN's NHL event index for a season and returns one row
per event containing the ESPN game ID used by the other ESPN wrappers.
espn_games(season = season_now())espn_games(season = season_now())
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per ESPN game
ESPN_games_20242025 <- espn_games(season = 20242025)ESPN_games_20242025 <- espn_games(season = 20242025)
espn_injuries() returns ESPN's current injury report with one outer row per
team and nested player injury details where ESPN includes them.
espn_injuries()espn_injuries()
nested data.frame with one row per team (outer) and player (inner)
ESPN_injuries_now <- espn_injuries()ESPN_injuries_now <- espn_injuries()
espn_play_by_play() returns ESPN's play rows for one game with one row per
event, normalized event IDs, period labels, clock/text fields, team refs, and
coordinate fields when ESPN supplies them.
espn_play_by_play(game = 401777460) espn_pbp(game = 401777460)espn_play_by_play(game = 401777460) espn_pbp(game = 401777460)
game |
integer ID (e.g., 401777460); see |
data.frame with one row per event (play)
ESPN_pbp_SCF_20242025 <- espn_play_by_play(game = 401777460)ESPN_pbp_SCF_20242025 <- espn_play_by_play(game = 401777460)
espn_player_summary() returns a compact one-row ESPN athlete profile with
name, birth, size, handedness, draft, debut, position, experience, and active
status fields.
espn_player_summary(player = 3988803)espn_player_summary(player = 3988803)
player |
integer ID (e.g., 3988803); see |
data.frame with one row
ESPN_summary_Charlie_McAvoy <- espn_player_summary(player = 3988803)ESPN_summary_Charlie_McAvoy <- espn_player_summary(player = 3988803)
espn_players() pages ESPN's athlete index and returns one row per athlete
containing the ESPN player ID used by espn_player_summary().
espn_players()espn_players()
data.frame with one row per ESPN player
all_ESPN_players <- espn_players()all_ESPN_players <- espn_players()
espn_team_summary() returns a compact one-row ESPN team profile with
location, display names, abbreviation, and active status.
espn_team_summary(team = 1)espn_team_summary(team = 1)
team |
integer ID (e.g., 1); see |
data.frame with one row
ESPN_summary_Boston_Bruins <- espn_team_summary(team = 1)ESPN_summary_Boston_Bruins <- espn_team_summary(team = 1)
espn_teams() pages ESPN's team index and returns one row per team
containing the ESPN team ID used by espn_team_summary().
espn_teams()espn_teams()
data.frame with one row per ESPN team
all_ESPN_teams <- espn_teams()all_ESPN_teams <- espn_teams()
espn_transactions() pages ESPN's transaction feed across a season window
and returns one row per transaction with normalized team fields.
espn_transactions(season = season_now())espn_transactions(season = season_now())
season |
integer in YYYYYYYY (e.g., 20242025); the summer of the latter year is included |
data.frame with one row per transaction
ESPN_transactions_20242025 <- espn_transactions(season = 20242025)ESPN_transactions_20242025 <- espn_transactions(season = 20242025)
expansion_draft_picks() returns historical expansion-draft picks with one
row per selected player/team/season combination.
expansion_draft_picks()expansion_draft_picks()
data.frame with one row per pick
all_expansion_draft_picks <- expansion_draft_picks()all_expansion_draft_picks <- expansion_draft_picks()
expansion_drafts() returns expansion-draft rule records by season, including
the rule text and season identifiers exposed by the records endpoint.
expansion_drafts()expansion_drafts()
data.frame with one row per expansion draft
all_expansion_drafts <- expansion_drafts()all_expansion_drafts <- expansion_drafts()
franchise_playoff_situational_results() returns playoff series records by
franchise and series situation, such as leading or trailing a series.
franchise_playoff_situational_results()franchise_playoff_situational_results()
data.frame with one row per franchise per situation
franchise_playoff_situational_results <- franchise_playoff_situational_results()franchise_playoff_situational_results <- franchise_playoff_situational_results()
franchise_season_statistics() returns records-site franchise results by
season and game type, including team, standing, record, goals, and points
fields.
franchise_season_statistics() franchise_season_stats()franchise_season_statistics() franchise_season_stats()
data.frame with one row per franchise per season per game type
# May take >5s, so skip. franchise_season_stats <- franchise_season_statistics()# May take >5s, so skip. franchise_season_stats <- franchise_season_statistics()
franchise_statistics() returns all-time franchise totals by game type,
including games, wins/losses, goals, points, and related aggregate fields.
franchise_statistics() franchise_stats()franchise_statistics() franchise_stats()
data.frame with one row per franchise per game type
franchise_stats <- franchise_statistics()franchise_stats <- franchise_statistics()
franchise_team_statistics() returns all-time totals by franchise-era team
and game type, preserving separate rows for teams that share a franchise.
franchise_team_statistics() franchise_team_stats()franchise_team_statistics() franchise_team_stats()
data.frame with one row per team per franchise per game type
franchise_team_stats <- franchise_team_statistics()franchise_team_stats <- franchise_team_statistics()
franchise_versus_franchise() returns all-time head-to-head records by
franchise, opponent franchise, and game type.
franchise_versus_franchise() franchise_vs_franchise()franchise_versus_franchise() franchise_vs_franchise()
data.frame with one row per franchise per franchise per game type
# May take >5s, so skip. franchise_vs_franchise <- franchise_versus_franchise()# May take >5s, so skip. franchise_vs_franchise <- franchise_versus_franchise()
franchises() merges records-site franchise and franchise-detail metadata,
returning one row per franchise with normalized franchise/team identifiers
and names.
franchises()franchises()
data.frame with one row per franchise
all_franchises <- franchises()all_franchises <- franchises()
game_odds() returns the public partner-game feed for one country, with one
row per current game and normalized team, game type, bookmaker, and odds
fields when NHL exposes them.
game_odds(country = "US")game_odds(country = "US")
country |
two-letter code (e.g., 'CA'); see |
data.frame with one row per game
game_odds_CA <- game_odds(country = 'CA')game_odds_CA <- game_odds(country = 'CA')
game_roster() returns the roster spots from a GameCenter play-by-play
payload with one row per dressed player. The result includes game, team, and
player IDs alongside sweater number, position, headshot, and normalized
player name fields.
game_roster(game = 2023030417)game_roster(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per player
roster_Martin_Necas_legacy_game <- game_roster(game = 2025020275)roster_Martin_Necas_legacy_game <- game_roster(game = 2025020275)
game_rosters() downloads the stored season-level GameCenter roster parquet
snapshot with one row per dressed player per game.
game_rosters(season = 20242025)game_rosters(season = 20242025)
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per player per game
# May take >5s, so skip. game_rosters_20212022 <- game_rosters(season = 20212022)# May take >5s, so skip. game_rosters_20212022 <- game_rosters(season = 20212022)
game_type_now() retrieves the game type as of now and returns a scalar integer used as the current-context default in season/game-type dependent wrappers.
game_type_now()game_type_now()
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3 = playoff/post-season)
game_type_now <- game_type_now()game_type_now <- game_type_now()
games() returns the stats API game catalog with one row per NHL game,
ordered by gameId and normalized to gameId, seasonId, and
gameTypeId.
games()games()
data.frame with one row per game
# May take >5s, so skip. all_games <- games()# May take >5s, so skip. all_games <- games()
gc_play_by_play() retrieves the GameCenter (GC) play-by-play for a game as
a data.frame where each row represents an event. The returned schema is the
cleaned, public-facing play-by-play schema, including canonical names such as
periodNumber, eventTypeCode, eventTypeDescKey, homeShots,
shotsFor, penaltyTypeDescKey, penaltyDuration, servedByPlayerId,
goalieInNetId, and HTML-report-derived on-ice player ID columns such as
homeGoaliePlayerId, awayGoaliePlayerId, homeSkater1PlayerId, and any
additional overflow skater slots required by the game. HTML report skater and
goalie IDs are returned whenever they can be matched back to a supported row,
even when the raw situationCode is stale. For blocked-shot rows, xCoord,
yCoord, xCoordNorm, yCoordNorm, distance, and angle describe the
recorded block location, not the original shot-release location. Use
add_shift_times() with shift_chart() (or shift_charts()) to add on-ice
shift timing columns.
gc_play_by_play(game = 2023030417) gc_pbp(game = 2023030417)gc_play_by_play(game = 2023030417) gc_pbp(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per event (play)
# May take >5s, so skip. gc_pbp_Martin_Necas_legacy_game <- gc_play_by_play(game = 2025020275)# May take >5s, so skip. gc_pbp_Martin_Necas_legacy_game <- gc_play_by_play(game = 2025020275)
gc_play_by_play_raw() returns the raw flattened GameCenter play-by-play as
served by the NHL API for one game. Use gc_play_by_play() for the cleaned
public schema that repairs common clock/order defects and appends the derived
public columns.
gc_play_by_play_raw(game = 2023030417) gc_pbp_raw(game = 2023030417)gc_play_by_play_raw(game = 2023030417) gc_pbp_raw(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per event (play)
gc_raw_Martin_Necas_legacy_game <- gc_play_by_play_raw(game = 2025020275)gc_raw_Martin_Necas_legacy_game <- gc_play_by_play_raw(game = 2025020275)
gc_play_by_plays() downloads the cleaned season-level GameCenter parquet
snapshot and pads situationCode to the four-character public format. For
blocked-shot rows, xCoord, yCoord, xCoordNorm, yCoordNorm,
distance, and angle describe the recorded block location, not the
original shot-release location.
gc_play_by_plays(season = 20242025) gc_pbps(season = 20242025)gc_play_by_plays(season = 20242025) gc_pbps(season = 20242025)
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per event (play) per game
# May take >5s, so skip. gc_pbps_20212022 <- gc_play_by_plays(season = 20212022)# May take >5s, so skip. gc_pbps_20212022 <- gc_play_by_plays(season = 20212022)
gc_play_by_plays_raw() downloads the stored season-level GameCenter
parquet snapshot and returns the raw rows without public-schema cleanup or
situation-code padding.
gc_play_by_plays_raw(season = 20242025) gc_pbps_raw(season = 20242025)gc_play_by_plays_raw(season = 20242025) gc_pbps_raw(season = 20242025)
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per raw event (play) per game
# May take >5s, so skip. gc_pbps_raw_20212022 <- gc_play_by_plays_raw(season = 20212022)# May take >5s, so skip. gc_pbps_raw_20212022 <- gc_play_by_plays_raw(season = 20212022)
gc_summary() combines the GameCenter landing and right-rail payloads for
one game. The nested list includes the scoreboard, team records, scoring
summary, three stars, game videos, officials, season/game identifiers, and
related GameCenter metadata when available.
gc_summary(game = 2023030417)gc_summary(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
list of various items
gc_summary_Martin_Necas_legacy_game <- gc_summary(game = 2025020275)gc_summary_Martin_Necas_legacy_game <- gc_summary(game = 2025020275)
general_managers() returns the records-site general-manager registry with
one row per general manager and normalized ID/name fields.
general_managers() gms()general_managers() gms()
data.frame with one row per general manager
all_GMs <- general_managers()all_GMs <- general_managers()
get_attendance() is deprecated. Use attendance() instead.
get_attendance()get_attendance()
data.frame with one row per season
get_award_winners() is deprecated. Use award_winners() instead.
get_award_winners()get_award_winners()
data.frame with one row per winner/finalist
get_awards() is deprecated. Use awards() instead.
get_awards()get_awards()
data.frame with one row per award
get_bracket() is deprecated. Use bracket() instead.
get_bracket(season = season_now())get_bracket(season = season_now())
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per series
get_configuration() is defunct. Use team_report_configurations(),
skater_report_configurations(), and/or goalie_report_configurations()
instead.
get_configuration()get_configuration()
get_countries() is deprecated. Use countries() instead.
get_countries()get_countries()
data.frame with one row per country
get_draft_picks() is deprecated. Use draft_picks() instead.
get_draft_picks()get_draft_picks()
data.frame with one row per pick
get_draft_rankings() is deprecated. Use draft_rankings() instead.
get_draft_rankings(year = season_now()%/%10000, player_type = 1)get_draft_rankings(year = season_now()%/%10000, player_type = 1)
year |
integer in YYYY (e.g., 2017); see |
player_type |
integer in 1:4 (where 1 = North American Skaters, 2 = International Skaters, 3 = North American Goalies, and 4 = International Goalies) |
data.frame with one row per player
get_draft_tracker() is deprecated. Use draft_tracker() instead.
get_draft_tracker()get_draft_tracker()
data.frame with one row per player
get_drafts() is deprecated. Use drafts() instead.
get_drafts()get_drafts()
data.frame with one row per draft
get_espn_athlete() is defunct. Use espn_player_summary() instead.
get_espn_athlete()get_espn_athlete()
get_espn_athletes() is deprecated. Use espn_players() instead.
get_espn_athletes()get_espn_athletes()
data.frame with one row per ESPN athlete (player)
get_espn_coach() is defunct. Use coach_career_statistics() instead.
get_espn_coach()get_espn_coach()
get_espn_coach_career() is defunct. Use coach_career_statistics() instead.
get_espn_coach_career()get_espn_coach_career()
get_espn_coaches() is defunct. Use coaches() instead.
get_espn_coaches()get_espn_coaches()
get_espn_event() is deprecated. Use espn_game_summary() instead.
get_espn_event(event = 401777460)get_espn_event(event = 401777460)
event |
integer ID (e.g., 401777460); see |
data.frame with one row per event (game)
get_espn_event_odds() is deprecated. Use espn_game_odds()
instead.
get_espn_event_odds(event = 401777460)get_espn_event_odds(event = 401777460)
event |
integer ID (e.g., 401777460); see |
data.frame with one row per provider
get_espn_event_officials() is defunct. Use gc_summary() and/or
wsc_summary() instead.
get_espn_event_officials()get_espn_event_officials()
get_espn_event_play_by_play() is deprecated. Use espn_play_by_play()
instead.
get_espn_event_play_by_play(event = 401777460)get_espn_event_play_by_play(event = 401777460)
event |
integer ID (e.g., 401777460); see |
data.frame with one row per play
get_espn_event_stars() is defunct. Use gc_summary() and/or
wsc_summary() instead.
get_espn_event_stars()get_espn_event_stars()
get_espn_events() is defunct. Use espn_games() instead.
get_espn_events()get_espn_events()
get_espn_futures() is defunct. Use espn_futures() instead.
get_espn_futures()get_espn_futures()
get_espn_injuries() is deprecated. Use espn_injuries() instead.
get_espn_injuries()get_espn_injuries()
nested data.frame with one row per team (outer) and player (inner)
get_espn_team() is defunct. Use espn_team_summary() instead.
get_espn_team()get_espn_team()
get_espn_teams() is defunct. Use espn_teams() instead.
get_espn_teams()get_espn_teams()
get_espn_transactions() is defunct. Use espn_transactions() instead.
get_espn_transactions()get_espn_transactions()
get_franchise_season_by_season() is deprecated. Use
franchise_season_statistics() instead.
get_franchise_season_by_season()get_franchise_season_by_season()
data.frame with one row per franchise per season per game type
get_franchise_team_totals() is deprecated. Use
franchise_team_statistics() instead.
get_franchise_team_totals()get_franchise_team_totals()
data.frame with one row per team per franchise per game type
get_franchise_vs_franchise() is deprecated. Use
franchise_versus_franchise() instead.
get_franchise_vs_franchise()get_franchise_vs_franchise()
data.frame with one row per franchise per franchise per game type
get_franchises() is deprecated. Use franchises() instead.
get_franchises()get_franchises()
data.frame with one row per franchise
get_game_boxscore() is deprecated. Use boxscore() instead.
get_game_boxscore(game = 2023030417, team = "home", player_type = "forwards")get_game_boxscore(game = 2023030417, team = "home", player_type = "forwards")
game |
integer ID (e.g., 2025020275); see |
team |
character of 'home' or 'away' |
player_type |
character of 'forwards', 'defense', or 'goalies' |
data.frame with one row per player
get_game_landing() is deprecated. Use gc_summary() instead.
get_game_landing(game = 2023030417)get_game_landing(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
list of various items
get_game_story() is deprecated. Use wsc_summary() instead.
get_game_story(game = 2023030417)get_game_story(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
list of various items
get_games() is deprecated. Use games() instead.
get_games()get_games()
data.frame with one row per game
get_gc_play_by_play() is deprecated. Use gc_play_by_play() instead.
get_gc_play_by_play(game = 2023030417)get_gc_play_by_play(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per event (play)
get_glossary() is deprecated. Use glossary() instead.
get_glossary()get_glossary()
data.frame with one row per terminology
get_goalie_leaders() is deprecated. Use goalie_leaders() instead.
get_goalie_leaders(season = "current", game_type = "", category = "wins")get_goalie_leaders(season = "current", game_type = "", category = "wins")
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character of 'wins', 'shutouts', 'savePctg', or 'goalsAgainstAverage' |
data.frame with one row per player
get_goalie_milestones() is deprecated. Use goalie_milestones()
instead.
get_goalie_milestones()get_goalie_milestones()
data.frame with one row per player
get_goalie_statistics() is defunct. Use goalie_season_report() or
goalie_game_report() instead.
get_goalie_statistics()get_goalie_statistics()
get_goalies() is defunct. Use players() instead.
get_goalies()get_goalies()
get_officials() is deprecated. Use officials() instead.
get_officials()get_officials()
data.frame with one row per official
get_partner_odds() is deprecated. Use game_odds() instead.
get_partner_odds(country = "US")get_partner_odds(country = "US")
country |
two-letter code (e.g., 'CA'); see |
data.frame with one row per game
get_player_game_log() is deprecated. Use player_game_log() instead.
get_player_game_log(player = 8478402, season = "now", game_type = "")get_player_game_log(player = 8478402, season = "now", game_type = "")
player |
integer ID (e.g., 8480039); see |
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
data.frame with one row per game
get_player_landing() is deprecated. Use player_summary() instead.
get_player_landing(player = 8478402)get_player_landing(player = 8478402)
player |
integer ID (e.g., 8480039); see |
list with various items
get_players() is deprecated. Use players() instead.
get_players()get_players()
data.frame with one row per player
get_schedule() is deprecated. Use schedule() instead.
get_schedule(date = "2025-01-01")get_schedule(date = "2025-01-01")
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per game
get_scoreboards() is deprecated. Use scores() instead.
get_scoreboards(date = "now")get_scoreboards(date = "now")
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per game
get_scores() is deprecated. Use scores() instead.
get_scores(date = "now")get_scores(date = "now")
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per game
get_season_now() is defunct. Use season_now() and/or game_type_now()
instead.
get_season_now()get_season_now()
get_seasons() is deprecated. Use seasons() instead.
get_seasons()get_seasons()
data.frame with one row per season
get_series() is defunct.
get_series()get_series()
get_series_schedule() is deprecated. Use series_schedule() instead.
get_series_schedule(season = season_now(), series = "a")get_series_schedule(season = season_now(), series = "a")
season |
integer in YYYYYYYY (e.g., 20242025); see |
series |
one-letter code (e.g., 'O'); see |
data.frame with one row per game
get_shift_charts() is deprecated. Use shift_chart() instead.
get_shift_charts(game = 2023030417)get_shift_charts(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per shift
get_skater_leaders() is deprecated. Use skater_leaders() instead.
get_skater_leaders(season = "current", game_type = "", category = "points")get_skater_leaders(season = "current", game_type = "", category = "points")
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character of 'assists', 'goals', 'goalsSh', 'goalsPp', 'points, 'penaltyMins', 'toi', 'plusMinus', or 'faceoffLeaders' |
data.frame with one row per player
get_skater_milestones() is deprecated. Use skater_milestones()
instead.
get_skater_milestones()get_skater_milestones()
data.frame with one row per player
get_skater_statistics() is defunct. Use skater_season_report() or
skater_game_report() instead.
get_skater_statistics()get_skater_statistics()
get_skaters() is defunct. Use players() instead.
get_skaters()get_skaters()
get_spotlight_players() is deprecated. Use spotlight_players()
instead.
get_spotlight_players()get_spotlight_players()
data.frame with one row per player
get_standings() is deprecated. Use standings() instead.
get_standings(date = "2025-01-01")get_standings(date = "2025-01-01")
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per team
get_standings_information() is deprecated. Use standings_rules()
instead.
get_standings_information()get_standings_information()
data.frame with one row per season
get_streams() is deprecated. Use streams() instead.
get_streams()get_streams()
data.frame with one row per stream
get_team_prospects() is deprecated. Use team_prospects() instead.
get_team_prospects(team = "NJD", player_type = "forwards")get_team_prospects(team = "NJD", player_type = "forwards")
team |
three-letter code (e.g., 'COL'); see |
player_type |
character of 'forwards', 'defensemen', or 'goalies' |
data.frame with one row per player
get_team_roster() is deprecated. Use roster() instead.
get_team_roster(team = "NJD", season = "current", player_type = "forwards")get_team_roster(team = "NJD", season = "current", player_type = "forwards")
team |
three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see |
player_type |
character of 'forwards', 'defensemen', or 'goalies' |
data.frame with one row per player
get_team_roster_statistics() is deprecated. Use roster_statistics()
instead.
get_team_roster_statistics( team = "NJD", season = "now", game_type = 2, player_type = "skaters" )get_team_roster_statistics( team = "NJD", season = "now", game_type = 2, player_type = "skaters" )
team |
three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
player_type |
character of 'skaters' or 'goalies' |
data.frame with one row per player
get_team_schedule() is deprecated. Use team_season_schedule() instead.
get_team_schedule(team = "NJD", season = "now")get_team_schedule(team = "NJD", season = "now")
team |
three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per game
get_team_scoreboard() is defunct.
get_team_scoreboard()get_team_scoreboard()
get_team_seasons() is deprecated. Use team_seasons() instead.
get_team_seasons(team = "NJD")get_team_seasons(team = "NJD")
team |
three-letter code (e.g., 'COL'); see |
data.frame with one row per season
get_team_statistics() is defunct. Use team_season_report() and/or
team_game_report() instead.
get_team_statistics()get_team_statistics()
get_teams() is deprecated. Use teams() instead.
get_teams()get_teams()
data.frame with one row per team
get_tv_schedule() is deprecated. Use tv_schedule() instead.
get_tv_schedule(date = "now")get_tv_schedule(date = "now")
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per program
get_venues() is deprecated. Use venues() instead.
get_venues()get_venues()
data.frame with one row per venue
get_wsc_play_by_play() is deprecated. Use wsc_play_by_play() instead.
get_wsc_play_by_play(game = 2023030417)get_wsc_play_by_play(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per event (play)
glossary() returns NHL glossary terms with one row per term and normalized
terminology IDs/names.
glossary()glossary()
data.frame with one row per terminology
glossary <- glossary()glossary <- glossary()
goalie_edge_five_versus_five() returns goalie EDGE 5-on-5 save-percentage
detail for one goalie/season/game type. Use category = 'details' for the
full split list or category = 'last 10' for game-level recent form.
goalie_edge_five_versus_five( player = 8476945, season = "now", game_type = "", category = "details" ) goalie_edge_5_vs_5( player = 8476945, season = "now", game_type = "", category = "details" )goalie_edge_five_versus_five( player = 8476945, season = "now", game_type = "", category = "details" ) goalie_edge_5_vs_5( player = 8476945, season = "now", game_type = "", category = "details" )
player |
integer ID (e.g., 8478406) |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 'l'/'l10'/'last 10' |
list with four items (category = 'details') or data.frame with one row per game (category = 'last 10')
Mackenzie_Blackwood_L10_5_vs_5_regular_20242025 <- goalie_edge_five_versus_five( player = 8478406, season = 20242025, game_type = 2, category = 'L' )Mackenzie_Blackwood_L10_5_vs_5_regular_20242025 <- goalie_edge_five_versus_five( player = 8478406, season = 20242025, game_type = 2, category = 'L' )
goalie_edge_leaders() returns the goalie EDGE landing-page leader groups
for one season and game type, such as save percentage, 5-on-5 save
percentage, and shot-location leader blocks.
goalie_edge_leaders(season = "now", game_type = "")goalie_edge_leaders(season = "now", game_type = "")
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
list of various items
goalie_EDGE_leaders_regular_20242025 <- goalie_edge_leaders( season = 20242025, game_type = 2 )goalie_EDGE_leaders_regular_20242025 <- goalie_edge_leaders( season = 20242025, game_type = 2 )
goalie_edge_save_percentage() returns a goalie's EDGE save-percentage
detail list, or recent game rows when category = 'last 10'.
goalie_edge_save_percentage( player = 8476945, season = "now", game_type = "", category = "details" )goalie_edge_save_percentage( player = 8476945, season = "now", game_type = "", category = "details" )
player |
integer ID (e.g., 8478406) |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 'l'/'l10'/'last 10' |
list with two items (category = 'details') or data.frame with one row per game (category = 'last 10')
Mackenzie_Blackwood_L10_sP_regular_20242025 <- goalie_edge_save_percentage( player = 8478406, season = 20242025, game_type = 2, category = 'L' )Mackenzie_Blackwood_L10_sP_regular_20242025 <- goalie_edge_save_percentage( player = 8478406, season = 20242025, game_type = 2, category = 'L' )
goalie_edge_seasons() returns the seasons and game type IDs for which the
NHL EDGE goalie endpoints expose data.
goalie_edge_seasons()goalie_edge_seasons()
data.frame with one row per season
goalie_EDGE_seasons <- goalie_edge_seasons()goalie_EDGE_seasons <- goalie_edge_seasons()
goalie_edge_shot_location() returns a goalie's EDGE save results by shot
location, either as detailed splits or shot-location totals.
goalie_edge_shot_location( player = 8476945, season = "now", game_type = "", category = "details" )goalie_edge_shot_location( player = 8476945, season = "now", game_type = "", category = "details" )
player |
integer ID (e.g., 8478406) |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/details' or 't'/'totals' |
data.frame with one row per shot location
Mackenzie_Blackwood_shot_location_totals_regular_20242025 <- goalie_edge_shot_location( player = 8478406, season = 20242025, game_type = 2, category = 'T' )Mackenzie_Blackwood_shot_location_totals_regular_20242025 <- goalie_edge_shot_location( player = 8478406, season = 20242025, game_type = 2, category = 'T' )
goalie_edge_summary() returns the full NHL EDGE detail payload for one
goalie, season, and game type, including goalie metadata and the available
save-percentage and shot-location summary blocks.
goalie_edge_summary(player = 8476945, season = "now", game_type = "")goalie_edge_summary(player = 8476945, season = "now", game_type = "")
player |
integer ID (e.g., 8478406) |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
list of various items
Mackenzie_Blackwood_EDGE_summary_regular_20242025 <- goalie_edge_summary( player = 8478406, season = 20242025, game_type = 2 )Mackenzie_Blackwood_EDGE_summary_regular_20242025 <- goalie_edge_summary( player = 8478406, season = 20242025, game_type = 2 )
goalie_game_report() returns the game-level version of a selected goalie
stats report, with one row per goalie per game and category-specific metrics.
goalie_game_report( season = season_now(), game_type = game_type_now(), category = "summary" )goalie_game_report( season = season_now(), game_type = game_type_now(), category = "summary" )
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character (e.g., 'advanced'); see
|
data.frame with one row per game per goalie
# May take >5s, so skip. advanced_goalie_game_report_playoffs_20212022 <- goalie_game_report( season = 20212022, game_type = 3, category = 'advanced' )# May take >5s, so skip. advanced_goalie_game_report_playoffs_20212022 <- goalie_game_report( season = 20212022, game_type = 3, category = 'advanced' )
goalie_game_scoring() returns records-site goalie scoring rows by player
and game.
goalie_game_scoring()goalie_game_scoring()
data.frame with one row per player per game
goalie_game_scoring <- goalie_game_scoring()goalie_game_scoring <- goalie_game_scoring()
goalie_game_statistics() returns records-site goalie stat rows by player
and game, including opponent fields and normalized team abbreviations.
goalie_game_statistics() goalie_game_stats()goalie_game_statistics() goalie_game_stats()
data.frame with one row per goalie per game
goalie_game_stats <- goalie_game_statistics()goalie_game_stats <- goalie_game_statistics()
goalie_leaders() returns the NHL.com leaders table for one goalie category,
season, and game type, with normalized player and team fields.
goalie_leaders(season = "current", game_type = "", category = "wins")goalie_leaders(season = "current", game_type = "", category = "wins")
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character of 'w'/'wins', 's'/shutouts', 's%'/'sP'/'save %'/'save percentage', or 'gaa'/'goals against average' |
data.frame with one row per player
GAA_leaders_regular_20242025 <- goalie_leaders( season = 20242025, game_type = 2, category = 'GAA' )GAA_leaders_regular_20242025 <- goalie_leaders( season = 20242025, game_type = 2, category = 'GAA' )
goalie_milestones() returns NHL.com goalie milestone-watch rows, including
goalie/team identifiers and the milestone/countdown fields exposed by the
endpoint.
goalie_milestones()goalie_milestones()
data.frame with one row per player
goalie_milestones <- goalie_milestones()goalie_milestones <- goalie_milestones()
goalie_regular_statistics() returns records-site regular-season career
goalie totals, with one row per goalie.
goalie_regular_statistics() goalie_regular_stats()goalie_regular_statistics() goalie_regular_stats()
data.frame with one row per goalie
goalie_career_regular_statistics <- goalie_regular_statistics()goalie_career_regular_statistics <- goalie_regular_statistics()
goalie_report_configurations() returns the goalie-report configuration
block from the stats API, including valid report categories, fields, filters,
and split options accepted by goalie_season_report() and
goalie_game_report().
goalie_report_configurations() goalie_report_configs()goalie_report_configurations() goalie_report_configs()
list with various items
goalie_report_configs <- goalie_report_configurations()goalie_report_configs <- goalie_report_configurations()
goalie_scoring() returns records-site career scoring totals for goalies,
with one row per goalie.
goalie_scoring()goalie_scoring()
data.frame with one row per player
goalie_scoring <- goalie_scoring()goalie_scoring <- goalie_scoring()
goalie_season_report() returns a season-level goalie report for a selected
stats category, with one row per goalie and the metric columns defined by
that category.
goalie_season_report( season = season_now(), game_type = game_type_now(), category = "summary" )goalie_season_report( season = season_now(), game_type = game_type_now(), category = "summary" )
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character (e.g., 'advanced'); see
|
data.frame with one row per player
# May take >5s, so skip. advanced_goalie_season_report_playoffs_20212022 <- goalie_season_report( season = 20212022, game_type = 3, category = 'advanced' )# May take >5s, so skip. advanced_goalie_season_report_playoffs_20212022 <- goalie_season_report( season = 20212022, game_type = 3, category = 'advanced' )
goalie_season_statistics() returns records-site goalie stat rows by player,
team, season, and game type, preserving separate rows when a goalie changed
teams.
goalie_season_statistics() goalie_season_stats()goalie_season_statistics() goalie_season_stats()
data.frame with one row per player per season per game type, separated by team if applicable
goalie_season_stats <- goalie_season_statistics()goalie_season_stats <- goalie_season_statistics()
goalie_series_statistics() returns records-site playoff goalie totals by
player and playoff series.
goalie_series_statistics() goalie_series_stats()goalie_series_statistics() goalie_series_stats()
data.frame with one row per player per series
goalie_series_stats <- goalie_series_statistics()goalie_series_stats <- goalie_series_statistics()
goalie_statistics() returns records-site regular-season plus playoff career
goalie totals, with one row per goalie.
goalie_statistics() goalie_stats()goalie_statistics() goalie_stats()
data.frame with one row per player
goalie_stats <- goalie_statistics()goalie_stats <- goalie_statistics()
ig_game_cumulative_expected_goals() fetches one GameCenter play-by-play,
scores shot attempts with calculate_expected_goals(), and renders a
home/away cumulative xG time series on a 1080-by-566-style PNG canvas.
ig_game_cumulative_expected_goals(game = 2023030417, model = NULL, save = TRUE) ig_game_cum_xG(game = 2023030417, model = NULL)ig_game_cumulative_expected_goals(game = 2023030417, model = NULL, save = TRUE) ig_game_cum_xG(game = 2023030417, model = NULL)
game |
integer ID (e.g., 2025020275); see |
model |
deprecated legacy model selector; ignored |
save |
logical; use |
NULL, invisibly
# May take >5s, so skip. ig_game_cumulative_expected_goals( game = 2023030417, save = FALSE )# May take >5s, so skip. ig_game_cumulative_expected_goals( game = 2023030417, save = FALSE )
ig_game_shot_locations() fetches one GameCenter play-by-play, scores its
shot attempts with calculate_expected_goals(), filters to the selected home
or away team, and renders a 1080-by-566-style PNG shot map. Points are
jittered for readability, shaped by event result, and colored by capped xG.
ig_game_shot_locations( game = 2023030417, team = "home", model = NULL, save = TRUE ) ig_game_shot_locs(game = 2023030417, team = "home", model = NULL)ig_game_shot_locations( game = 2023030417, team = "home", model = NULL, save = TRUE ) ig_game_shot_locs(game = 2023030417, team = "home", model = NULL)
game |
integer ID (e.g., 2025020275); see |
team |
character of 'h'/'home' or 'a'/'away' |
model |
deprecated legacy model selector; ignored |
save |
logical; use |
NULL, invisibly
# May take >5s, so skip. ig_game_shot_locations( game = 2023030417, team = 'H', save = FALSE )# May take >5s, so skip. ig_game_shot_locations( game = 2023030417, team = 'H', save = FALSE )
location() returns the NHL postal lookup result for one ZIP/postal code,
including country, region, and related local-market fields when available.
location(zip = 10001)location(zip = 10001)
zip |
integer (e.g., 48304) |
data.frame with one row per team
Cranbrook_Schools <- location(48304)Cranbrook_Schools <- location(48304)
lottery_odds() returns historical draft-lottery odds and outcomes by draft
year and lottery slot.
lottery_odds()lottery_odds()
data.frame with one row per draft lottery
lottery_odds <- lottery_odds()lottery_odds <- lottery_odds()
nhlscraper is an R package to scrape and clean NHL data via
the NHL and ESPN APIs. It primarily wraps 125+
endpoints from high-level
multi-season summaries and award winners to low-level decisecond replays and
bookmakers' odds, making them significantly more accessible. It also
features cleaning and visualization functions, primarily for play-by-plays,
to help analyze the data.
R/RStudio; you can check out my tutorial if you are not familiar.
Detailed documentation for each scraping function will be released gradually over time. Because each function can return a large amount of information, users are encouraged to explore the provided examples to discover what is available. Most, if not all, of the endpoints accessed by this package are unofficially documented (i.e., hidden), so it is important to use them responsibly and with respect for the NHL's data servers. Endpoints serving historical or otherwise mostly static data should ideally be queried once and then stored locally (for example, in a MySQL database) for further analysis, rather than being called repeatedly; the load functions attempt to mitigate this risk by providing pre-scraped data, so please make use of them. The exact rate limits for these APIs are not publicly known, so users are asked to avoid excessive or abusive querying to help ensure continued access for everyone.
Prior to the NHL API rework in 2023, Drew Hynes documented a comprehensive list of known endpoints, and several R packages, such as nhlapi and hockeyR, were built to access them. However, after the NHL completely transformed its API structure, all of these packages became mostly defunct as their authors understandably chose not to continue maintaining them. The community gathered around work by Zachary Maludzinski to discover and share new endpoints, but progress naturally slowed once most of the "main" endpoints were identified. Over the summer of 2025, I began reverse-engineering many of the remaining, undocumented endpoints while searching for additional data for future research, with a particular focus on NHL EDGE and Records data. After I shared those findings, the effort to expand and refine this map of the APIs accelerated, and with the addition of David Fleischer's effort, we ultimately identified 400+ new endpoints. In parallel, I also discovered many new endpoints for the ESPN API, extending beyond what Joseph Wilson had already compiled.
Maintainer: Rento Saijo [email protected] (ORCID) [copyright holder]
Authors:
Rento Saijo [email protected] (ORCID) [copyright holder]
Lars Skytte [email protected]
Jack Pallotta [email protected] (ORCID)
Useful links:
Report bugs at https://github.com/RentoSaijo/nhlscraper/issues
officials() returns the records-site official registry with one row per
official and normalized official ID, name, and referee-association fields.
officials()officials()
data.frame with one row per official
all_officials <- officials()all_officials <- officials()
penalty_shots() returns historical penalty-shot records with one row per
attempt, including game, season/game type, shooter/goalie, team, and outcome
fields.
penalty_shots() pss()penalty_shots() pss()
data.frame with one row per penalty shot
all_pss <- penalty_shots()all_pss <- penalty_shots()
player_game_log() returns one player's GameCenter game log for a season and
game type, with one row per game and normalized opponent, score/result, and
player stat fields.
player_game_log(player = 8478402, season = "now", game_type = "")player_game_log(player = 8478402, season = "now", game_type = "")
player |
integer ID (e.g., 8480039); see |
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
data.frame with one row per game
Martin_Necas_game_log_regular_20242025 <- player_game_log( player = 8480039, season = 20242025, game_type = 2 )Martin_Necas_game_log_regular_20242025 <- player_game_log( player = 8480039, season = 20242025, game_type = 2 )
player_seasons() returns the seasons and game type IDs available in a
player's GameCenter game-log payload.
player_seasons(player = 8478402)player_seasons(player = 8478402)
player |
integer ID (e.g., 8480039); see |
data.frame with one row per season
Martin_Necas_seasons <- player_seasons(player = 8480039)Martin_Necas_seasons <- player_seasons(player = 8480039)
player_summary() returns the public player landing payload for one player,
including bio/team fields, current season stats, career totals, season totals,
awards, and featured media when available.
player_summary(player = 8478402)player_summary(player = 8478402)
player |
integer ID (e.g., 8480039); see |
list with various items
Martin_Necas_summary <- player_summary(player = 8480039)Martin_Necas_summary <- player_summary(player = 8480039)
players() returns the records-site player registry with one row per player
and normalized IDs, names, position, handedness, and birth fields.
players()players()
data.frame with one row per player
# May take >5s, so skip. all_players <- players()# May take >5s, so skip. all_players <- players()
playoff_season_statistics() returns league-wide playoff totals by season,
including games, goals, and related year-level totals.
playoff_season_statistics() playoff_season_stats()playoff_season_statistics() playoff_season_stats()
data.frame with one row per season
playoff_season_stats <- playoff_season_statistics()playoff_season_stats <- playoff_season_statistics()
ps() is deprecated. Use penalty_shots() instead.
ps()ps()
data.frame with one row per penalty shot
replay() downloads NHL puck/player tracking sprite data for one goal event
and returns one row per decisecond with puck coordinates plus dynamic
playerN* columns for tracked skaters.
replay(game = 2023030417, event = 866)replay(game = 2023030417, event = 866)
game |
integer ID (e.g., 2025020262); see |
event |
integer ID (e.g., 751); see |
data.frame with one row per decisecond
Gabriel_Landeskog_first_regular_goal_back_replay <- replay( game = 2025020262, event = 751 )Gabriel_Landeskog_first_regular_goal_back_replay <- replay( game = 2025020262, event = 751 )
replays() downloads the stored season-level puck/player tracking parquet
snapshot and returns one row per tracked decisecond.
replays(season = 20242025)replays(season = 20242025)
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per decisecond
# May take >5s, so skip. replays_20252026 <- replays(season = 20252026)# May take >5s, so skip. replays_20252026 <- replays(season = 20252026)
roster() returns a team's roster for one season and position group, with
one row per player and normalized ID, name, sweater, position, height/weight,
birth, and handedness fields when available.
roster(team = 1, season = "current", position = "forwards")roster(team = 1, season = "current", position = "forwards")
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see |
position |
character of 'f'/'forwards', 'd'/'defensemen', or 'g'/'goalies' |
data.frame with one row per player
COL_defensemen_20242025 <- roster( team = 21, season = 20242025, position = 'D' )COL_defensemen_20242025 <- roster( team = 21, season = 20242025, position = 'D' )
roster_statistics() returns skater or goalie stat rows for one team,
season, and game type, preserving the NHL API's position-specific stat
columns with normalized player name fields.
roster_statistics( team = 1, season = "now", game_type = "", position = "skaters" ) roster_stats(team = 1, season = "now", game_type = "", position = "skaters")roster_statistics( team = 1, season = "now", game_type = "", position = "skaters" ) roster_stats(team = 1, season = "now", game_type = "", position = "skaters")
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
position |
character of 's'/'skaters' or 'g'/'goalies' |
data.frame with one row per player
COL_goalies_statistics_regular_20242025 <- roster_statistics( team = 21, season = 20242025, game_type = 2, position = 'G' )COL_goalies_statistics_regular_20242025 <- roster_statistics( team = 21, season = 20242025, game_type = 2, position = 'G' )
schedule() returns the public schedule rows for one date, including game
IDs, teams, start/status, scores, venue, broadcasts, and links.
schedule(date = Sys.Date())schedule(date = Sys.Date())
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per game
schedule_Halloween_2025 <- schedule(date = '2025-10-31')schedule_Halloween_2025 <- schedule(date = '2025-10-31')
scores() returns the public scoreboard for one date with one row per game,
including team abbreviations, start/status fields, score state, venue,
broadcasts, and game links when the API exposes them.
scores(date = "now")scores(date = "now")
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per game
scores_Halloween_2025 <- scores(date = '2025-10-31')scores_Halloween_2025 <- scores(date = '2025-10-31')
season_now() retrieves the season as of now and returns a scalar integer used as the current-context default in season/game-type dependent wrappers.
season_now()season_now()
integer in YYYYYYYY (e.g., 20242025)
season_now <- season_now()season_now <- season_now()
seasons() returns the stats API season catalog with one row per season,
including season IDs, date boundaries, and game-type metadata.
seasons()seasons()
data.frame with one row per season
all_seasons <- seasons()all_seasons <- seasons()
series() returns the records-site playoff-series game table with one row
per game/series entry, including season, series letter, round, teams, and
game ID fields.
series()series()
data.frame with one row per game per series
# May take >5s, so skip. all_series <- series()# May take >5s, so skip. all_series <- series()
series_schedule() returns the public schedule for one playoff series, with
one row per game and normalized game, team, score/status, venue, and broadcast
fields.
series_schedule(season = season_now() - 10001, series = "a")series_schedule(season = season_now() - 10001, series = "a")
season |
integer in YYYYYYYY (e.g., 20242025); see |
series |
one-letter code (e.g., 'O'); see |
data.frame with one row per game
SCF_schedule_20212022 <- series_schedule( season = 20212022, series = 'O' )SCF_schedule_20212022 <- series_schedule( season = 20212022, series = 'O' )
shift_chart() returns one row per player shift for a game with gameId,
teamId, playerId, shift number, period, start/end clocks, elapsed
period/game seconds, and duration. It uses the stats API when available and
falls back to the NHL HTML shift reports for older or missing games.
shift_chart(game = 2023030417)shift_chart(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per shift
shifts_Martin_Necas_legacy_game <- shift_chart(game = 2025020275)shifts_Martin_Necas_legacy_game <- shift_chart(game = 2025020275)
shift_chart_summaries() downloads the stored season-level shift-summary
parquet snapshot with per-player, per-period time-on-ice splits.
shift_chart_summaries(season = 20242025)shift_chart_summaries(season = 20242025)
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per player per period
# May take >5s, so skip. shift_chart_summaries_20212022 <- shift_chart_summaries(season = 20212022)# May take >5s, so skip. shift_chart_summaries_20212022 <- shift_chart_summaries(season = 20212022)
shift_chart_summary() retrieves per-player, per-period time-on-ice splits
from the HTML shift reports.
shift_chart_summary(game = 2023030417)shift_chart_summary(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per player per period
shift_summary_2023030417 <- shift_chart_summary(game = 2023030417)shift_summary_2023030417 <- shift_chart_summary(game = 2023030417)
shift_charts() downloads the stored season-level shift-chart parquet
snapshot, removes the storage-only id column, and returns one row per
parsed shift.
shift_charts(season = 20242025)shift_charts(season = 20242025)
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per event (play) per game
# May take >5s, so skip. shift_charts_20212022 <- shift_charts(season = 20212022)# May take >5s, so skip. shift_charts_20212022 <- shift_charts(season = 20212022)
shifts() is deprecated. Use shift_chart() instead.
shifts(game = 2023030417)shifts(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per shift
skater_edge_leaders() returns the skater EDGE landing-page leader groups
for one season and game type, such as speed, distance, shot speed, shot
location, and zone-time leader blocks.
skater_edge_leaders(season = "now", game_type = "")skater_edge_leaders(season = "now", game_type = "")
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
list of various items
skater_EDGE_leaders_regular_20242025 <- skater_edge_leaders( season = 20242025, game_type = 2 )skater_EDGE_leaders_regular_20242025 <- skater_edge_leaders( season = 20242025, game_type = 2 )
skater_edge_seasons() returns the seasons and game type IDs for which the
NHL EDGE skater endpoints expose data.
skater_edge_seasons()skater_edge_seasons()
data.frame with one row per season
skater_EDGE_seasons <- skater_edge_seasons()skater_EDGE_seasons <- skater_edge_seasons()
skater_edge_shot_location() returns a skater's EDGE shot-location detail
by rink region, or totals by shot-location bucket when category = 'totals'.
skater_edge_shot_location( player = 8478402, season = "now", game_type = "", category = "details" )skater_edge_shot_location( player = 8478402, season = "now", game_type = "", category = "details" )
player |
integer ID (e.g., 8480039); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/details' or 't'/'totals' |
data.frame with one row per shot location
Martin_Necas_shot_location_totals_regular_20242025 <- skater_edge_shot_location( player = 8480039, season = 20242025, game_type = 2, category = 'T' )Martin_Necas_shot_location_totals_regular_20242025 <- skater_edge_shot_location( player = 8480039, season = 20242025, game_type = 2, category = 'T' )
skater_edge_shot_speed() returns a skater's EDGE shot-speed detail list, or
hardest-shot rows when category = 'hardest'.
skater_edge_shot_speed( player = 8478402, season = "now", game_type = "", category = "details" )skater_edge_shot_speed( player = 8478402, season = "now", game_type = "", category = "details" )
player |
integer ID (e.g., 8480039); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 'h'/'hardest' |
list with six items (category = 'details') or data.frame with one row per shot (category = 'hardest')
Martin_Necas_hardest_shots_regular_20242025 <- skater_edge_shot_speed( player = 8480039, season = 20242025, game_type = 2, category = 'H' )Martin_Necas_hardest_shots_regular_20242025 <- skater_edge_shot_speed( player = 8480039, season = 20242025, game_type = 2, category = 'H' )
skater_edge_skating_distance() returns a skater's EDGE distance detail by
strength state, or recent game rows when category = 'last 10'.
skater_edge_skating_distance( player = 8478402, season = "now", game_type = "", category = "details" )skater_edge_skating_distance( player = 8478402, season = "now", game_type = "", category = "details" )
player |
integer ID (e.g., 8480039); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 'l'/'l10'/'last 10' |
data.frame with one row per strength state (category = 'details') or game (category = 'last 10')
Martin_Necas_L10_skating_distance_regular_20242025 <- skater_edge_skating_distance( player = 8480039, season = 20242025, game_type = 2, category = 'L' )Martin_Necas_L10_skating_distance_regular_20242025 <- skater_edge_skating_distance( player = 8480039, season = 20242025, game_type = 2, category = 'L' )
skater_edge_skating_speed() returns a skater's EDGE skating-speed detail
list, or top-speed burst rows when category = 'top speeds'.
skater_edge_skating_speed( player = 8478402, season = "now", game_type = "", category = "details" )skater_edge_skating_speed( player = 8478402, season = "now", game_type = "", category = "details" )
player |
integer ID (e.g., 8480039); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 't'/'top'/'top speeds' |
list with four items (category = 'details') or data.frame with one row per burst (category = 'top speeds')
Martin_Necas_top_speeds_regular_20242025 <- skater_edge_skating_speed( player = 8480039, season = 20242025, game_type = 2, category = 'T' )Martin_Necas_top_speeds_regular_20242025 <- skater_edge_skating_speed( player = 8480039, season = 20242025, game_type = 2, category = 'T' )
skater_edge_summary() returns the full NHL EDGE detail payload for one
skater, season, and game type, including player metadata and the available
skating, shot, and zone-time summary blocks.
skater_edge_summary(player = 8478402, season = "now", game_type = "")skater_edge_summary(player = 8478402, season = "now", game_type = "")
player |
integer ID (e.g., 8480039); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
list of various items
Martin_Necas_EDGE_summary_regular_20242025 <- skater_edge_summary( player = 8480039, season = 20242025, game_type = 2 )Martin_Necas_EDGE_summary_regular_20242025 <- skater_edge_summary( player = 8480039, season = 20242025, game_type = 2 )
skater_edge_zone_time() returns a skater's EDGE zone-time detail table by
strength state, or the zone-start split list when category = 'starts'.
skater_edge_zone_time( player = 8478402, season = "now", game_type = "", category = "details" )skater_edge_zone_time( player = 8478402, season = "now", game_type = "", category = "details" )
player |
integer ID (e.g., 8480039); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 's'/'starts' |
data.frame with one row per strength state (category = 'details') or list with six items (category = 'starts')
Martin_Necas_starts_regular_20242025 <- skater_edge_zone_time( player = 8480039, season = 20242025, game_type = 2, category = 'S' )Martin_Necas_starts_regular_20242025 <- skater_edge_zone_time( player = 8480039, season = 20242025, game_type = 2, category = 'S' )
skater_game_report() returns the game-level version of a selected skater
stats report, with one row per player per game and category-specific metrics.
Regular-season calls are paged by month to avoid oversized API requests.
skater_game_report( season = season_now(), game_type = game_type_now(), category = "summary" )skater_game_report( season = season_now(), game_type = game_type_now(), category = "summary" )
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character (e.g., 'puckPossessions'); see
|
data.frame with one row per game per player
# May take >5s, so skip. possession_skater_game_report_playoff_20212022 <- skater_game_report( season = 20212022, game_type = 3, category = 'puckPossessions' )# May take >5s, so skip. possession_skater_game_report_playoff_20212022 <- skater_game_report( season = 20212022, game_type = 3, category = 'puckPossessions' )
skater_leaders() returns the NHL.com leaders table for one skater category,
season, and game type, with normalized player and team fields.
skater_leaders(season = "current", game_type = "", category = "points")skater_leaders(season = "current", game_type = "", category = "points")
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
string of 'a'/'assists', 'g'/goals', 'shg'/'shorthanded goals', 'ppg'/'powerplay goals', 'p'/'points', 'pim'/penalty minutes'/'penalty infraction minutes', 'toi'/'time on ice', 'pm'/'plus minus', or 'f'/'faceoffs' |
data.frame with one row per player
TOI_leaders_regular_20242025 <- skater_leaders( season = 20242025, game_type = 2, category = 'TOI' )TOI_leaders_regular_20242025 <- skater_leaders( season = 20242025, game_type = 2, category = 'TOI' )
skater_milestones() returns NHL.com skater milestone-watch rows, including
player/team identifiers and the milestone/countdown fields exposed by the
endpoint.
skater_milestones()skater_milestones()
data.frame with one row per player
skater_milestones <- skater_milestones()skater_milestones <- skater_milestones()
skater_playoff_statistics() returns records-site playoff career scoring
totals for skaters, with one row per player.
skater_playoff_statistics() skater_playoff_stats()skater_playoff_statistics() skater_playoff_stats()
data.frame with one row per player
skater_playoff_stats <- skater_playoff_statistics()skater_playoff_stats <- skater_playoff_statistics()
skater_regular_statistics() returns records-site regular-season career
scoring totals for skaters, with one row per player.
skater_regular_statistics() skater_regular_stats()skater_regular_statistics() skater_regular_stats()
data.frame with one row per player
skater_regular_stats <- skater_regular_statistics()skater_regular_stats <- skater_regular_statistics()
skater_report_configurations() returns the skater-report configuration
block from the stats API, including valid report categories, fields, filters,
and split options accepted by skater_season_report() and
skater_game_report().
skater_report_configurations() skater_report_configs()skater_report_configurations() skater_report_configs()
list with various items
skater_report_configs <- skater_report_configurations()skater_report_configs <- skater_report_configurations()
skater_season_report() returns a season-level skater report for a selected
stats category, with one row per player and the metric columns defined by
that category.
skater_season_report( season = season_now(), game_type = game_type_now(), category = "summary" )skater_season_report( season = season_now(), game_type = game_type_now(), category = "summary" )
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character (e.g., 'puckPossessions'); see
|
data.frame with one row per player
# May take >5s, so skip. possession_skater_season_report_playoff_20212022 <- skater_season_report( season = 20212022, game_type = 3, category = 'puckPossessions' )# May take >5s, so skip. possession_skater_season_report_playoff_20212022 <- skater_season_report( season = 20212022, game_type = 3, category = 'puckPossessions' )
skater_season_statistics() returns records-site player stat rows by
player, team, season, and game type, preserving separate rows when a player
changed teams.
skater_season_statistics() skater_season_stats()skater_season_statistics() skater_season_stats()
data.frame with one row per player per season per game type, separated by team if applicable
# May take >5s, so skip. skater_season_stats <- skater_season_statistics()# May take >5s, so skip. skater_season_stats <- skater_season_statistics()
skater_series_statistics() returns records-site playoff skater totals by
player and playoff series.
skater_series_statistics() skater_series_stats()skater_series_statistics() skater_series_stats()
data.frame with one row per player per series
# May take >5s, so skip. skater_series_stats <- skater_series_statistics()# May take >5s, so skip. skater_series_stats <- skater_series_statistics()
skater_statistics() returns records-site regular-season plus playoff career
scoring totals for skaters, with one row per player.
skater_statistics() skater_stats()skater_statistics() skater_stats()
data.frame with one row per player
skater_stats <- skater_statistics()skater_stats <- skater_statistics()
spotlight_players() returns NHL.com player-spotlight entries with normalized
player, position, and team fields.
spotlight_players()spotlight_players()
data.frame with one row per player
spotlight_players <- spotlight_players()spotlight_players <- spotlight_players()
standings() returns public standings for one date with one row per team,
including rank, record, points, streak, division/conference, and normalized
team fields.
standings(date = "now")standings(date = "now")
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per team
standings_Halloween_2025 <- standings(date = '2025-10-31')standings_Halloween_2025 <- standings(date = '2025-10-31')
standings_rules() returns the public standings-season catalog with one row
per season and the rules/metadata used by standings endpoints.
standings_rules()standings_rules()
data.frame with one row per season
standings_rules <- standings_rules()standings_rules <- standings_rules()
streams() returns the public "where to watch" payload for the current
region, including broadcast/streaming providers when the endpoint is
available.
streams()streams()
data.frame with one row per stream
all_streams <- streams()all_streams <- streams()
team_edge_leaders() returns the team EDGE landing-page leader groups for
one season and game type, such as skating, shot, and zone-time leader blocks.
team_edge_leaders(season = "now", game_type = "")team_edge_leaders(season = "now", game_type = "")
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
list of various items
team_EDGE_leaders_regular_20242025 <- team_edge_leaders( season = 20242025, game_type = 2 )team_EDGE_leaders_regular_20242025 <- team_edge_leaders( season = 20242025, game_type = 2 )
team_edge_seasons() returns the seasons and game type IDs for which the NHL
EDGE team endpoints expose data.
team_edge_seasons()team_edge_seasons()
data.frame with one row per season
team_EDGE_seasons <- team_edge_seasons()team_EDGE_seasons <- team_edge_seasons()
team_edge_shot_location() returns team EDGE shot-location detail by rink
region, or totals by strength state and position when category = 'totals'.
team_edge_shot_location( team = 1, season = "now", game_type = "", category = "details" )team_edge_shot_location( team = 1, season = "now", game_type = "", category = "details" )
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/details' or 't'/'totals' |
data.frame with one row per location (category = 'details') or combination of strength state and position (category = 'totals')
COL_shot_location_totals_regular_20242025 <- team_edge_shot_location( team = 21, season = 20242025, game_type = 2, category = 'T' )COL_shot_location_totals_regular_20242025 <- team_edge_shot_location( team = 21, season = 20242025, game_type = 2, category = 'T' )
team_edge_shot_speed() returns team EDGE shot-speed detail by position, or
hardest-shot rows when category = 'hardest'.
team_edge_shot_speed( team = 1, season = "now", game_type = "", category = "details" )team_edge_shot_speed( team = 1, season = "now", game_type = "", category = "details" )
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 'h'/'hardest' |
data.frame with one row per position (category = 'details') or shot (category = 'hardest')
COL_hardest_shots_regular_20242025 <- team_edge_shot_speed( team = 21, season = 20242025, game_type = 2, category = 'H' )COL_hardest_shots_regular_20242025 <- team_edge_shot_speed( team = 21, season = 20242025, game_type = 2, category = 'H' )
team_edge_skating_distance() returns team EDGE skating-distance detail by
strength state and position, or recent game rows when category = 'last 10'.
team_edge_skating_distance( team = 1, season = "now", game_type = "", category = "details" )team_edge_skating_distance( team = 1, season = "now", game_type = "", category = "details" )
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 'l'/'l10'/'last 10' |
data.frame with one row per combination of strength state and position (category = 'details') or game (category = 'last 10') game
COL_L10_skating_distance_regular_20242025 <- team_edge_skating_distance( team = 21, season = 20242025, game_type = 2, category = 'L' )COL_L10_skating_distance_regular_20242025 <- team_edge_skating_distance( team = 21, season = 20242025, game_type = 2, category = 'L' )
team_edge_skating_speed() returns team EDGE skating-speed detail by
position, or top-speed burst rows when category = 'top speeds'.
team_edge_skating_speed( team = 1, season = "now", game_type = "", category = "details" )team_edge_skating_speed( team = 1, season = "now", game_type = "", category = "details" )
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 't'/'top'/'top speeds' |
data.frame with one row per position (category = 'details') or burst (category = 'top speeds')
COL_top_speeds_regular_20242025 <- team_edge_skating_speed( team = 21, season = 20242025, game_type = 2, category = 'T' )COL_top_speeds_regular_20242025 <- team_edge_skating_speed( team = 21, season = 20242025, game_type = 2, category = 'T' )
team_edge_summary() returns the full NHL EDGE detail payload for one team,
season, and game type, including team metadata and the available skating,
shot, and zone-time summary blocks.
team_edge_summary(team = 1, season = "now", game_type = "")team_edge_summary(team = 1, season = "now", game_type = "")
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
list of various items
COL_EDGE_summary_regular_20242025 <- team_edge_summary( team = 21, season = 20242025, game_type = 2 )COL_EDGE_summary_regular_20242025 <- team_edge_summary( team = 21, season = 20242025, game_type = 2 )
team_edge_zone_time() returns a team's EDGE zone-time detail table by
strength state, or the shot-differential split list when requested.
team_edge_zone_time( team = 1, season = "now", game_type = "", category = "details" )team_edge_zone_time( team = 1, season = "now", game_type = "", category = "details" )
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see
|
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
'playoff'/'post'; see |
category |
character of 'd'/'details' or 'dS'/'dSOG'/'dShot'/'shot differential' |
data.frame with one row per strength state (category = 'details') or list with four items (category = 'shot differential')
COL_dS_regular_20242025 <- team_edge_zone_time( team = 21, season = 20242025, game_type = 2, category = 'dS' )COL_dS_regular_20242025 <- team_edge_zone_time( team = 21, season = 20242025, game_type = 2, category = 'dS' )
team_game_report() returns the game-level version of a selected team stats
report, with one row per team per game and the category-specific metric
columns exposed by the stats API.
team_game_report( season = season_now(), game_type = game_type_now(), category = "summary" )team_game_report( season = season_now(), game_type = game_type_now(), category = "summary" )
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character (e.g., 'leadingtrailing'); see
|
data.frame with one row per game per team
situational_team_game_report_playoffs_20212022 <- team_game_report( season = 20212022, game_type = 3, category = 'leadingtrailing' )situational_team_game_report_playoffs_20212022 <- team_game_report( season = 20212022, game_type = 3, category = 'leadingtrailing' )
team_logos() returns records-site logo metadata with one row per team logo
interval, including team ID, logo URL fields, and start/end season IDs.
team_logos()team_logos()
data.frame with one row per logo
all_team_logos <- team_logos()all_team_logos <- team_logos()
team_month_schedule() returns the same normalized club-schedule rows as
team_season_schedule(), restricted to the requested YYYY-MM month.
team_month_schedule(team = 1, month = "now")team_month_schedule(team = 1, month = "now")
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
month |
character in 'YYYY-MM' (e.g., '2025-01'); see |
data.frame with one row per game
COL_schedule_December_2025 <- team_month_schedule( team = 21, month = '2025-12' )COL_schedule_December_2025 <- team_month_schedule( team = 21, month = '2025-12' )
team_prospects() returns a team's prospect list for one position group,
including prospect/player IDs, names, position, size, birth data, and
prospect status fields when available.
team_prospects(team = 1, position = "forwards")team_prospects(team = 1, position = "forwards")
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
position |
character of 'f'/'forwards', 'd'/'defensemen', or 'g'/'goalies' |
data.frame with one row per player
COL_forward_prospects <- team_prospects( team = 21, position = 'F' )COL_forward_prospects <- team_prospects( team = 21, position = 'F' )
team_report_configurations() returns the team-report configuration block
from the stats API, including valid report categories, fields, filters, and
split options accepted by team_season_report() and team_game_report().
team_report_configurations() team_report_configs()team_report_configurations() team_report_configs()
list with various items
team_report_configs <- team_report_configurations()team_report_configs <- team_report_configurations()
team_season_report() returns a season-level team report for a selected
stats category, with one row per team and the metric columns defined by that
category.
team_season_report( season = season_now(), game_type = game_type_now(), category = "summary" )team_season_report( season = season_now(), game_type = game_type_now(), category = "summary" )
season |
integer in YYYYYYYY (e.g., 20242025); see |
game_type |
integer in 1:3 (where 1 = pre-season, 2 = regular season, 3
= playoff/post-season) OR character of 'pre', 'regular', or
playoff'/'post'; see |
category |
character (e.g., 'leadingtrailing'); see
|
data.frame with one row per team
situational_team_season_report_playoffs_20212022 <- team_season_report( season = 20212022, game_type = 3, category = 'leadingtrailing' )situational_team_season_report_playoffs_20212022 <- team_season_report( season = 20212022, game_type = 3, category = 'leadingtrailing' )
team_season_schedule() returns one team's season schedule with one row per
game and normalized game, opponent, score/status, venue, broadcast, and link
fields.
team_season_schedule(team = 1, season = "now")team_season_schedule(team = 1, season = "now")
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per game
COL_schedule_20252026 <- team_season_schedule( team = 21, season = 20252026 )COL_schedule_20252026 <- team_season_schedule( team = 21, season = 20252026 )
team_season_statistics() returns records-site team totals by team, season,
and game type, including win/loss, goal, shot, standings-point, and related
season-total fields.
team_season_statistics() team_season_stats()team_season_statistics() team_season_stats()
data.frame with one row per team per season per game type
# May take >5s, so skip. team_season_statistics <- team_season_statistics()# May take >5s, so skip. team_season_statistics <- team_season_statistics()
team_seasons() returns the seasons and game type IDs available for a team
in the public club-stats API.
team_seasons(team = 1)team_seasons(team = 1)
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
data.frame with one row per season
COL_seasons <- team_seasons(team = 21)COL_seasons <- team_seasons(team = 21)
team_week_schedule() returns the same normalized club-schedule rows as
team_season_schedule(), restricted to the API's week window starting from
the requested date.
team_week_schedule(team = 1, date = "now")team_week_schedule(team = 1, date = "now")
team |
integer ID (e.g., 21), character full name (e.g., 'Colorado
Avalanche'), OR three-letter code (e.g., 'COL'); see |
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per game
COL_schedule_Family_Week_2025 <- team_week_schedule( team = 21, date = '2025-10-06' )COL_schedule_Family_Week_2025 <- team_week_schedule( team = 21, date = '2025-10-06' )
teams() returns the stats API team catalog with one row per franchise-era
team entry and normalized identifiers, full names, and tri-codes.
teams()teams()
data.frame with one row per team
all_teams <- teams()all_teams <- teams()
tv_schedule() returns NHL Network broadcast schedule rows for one date,
with one row per program/broadcast item.
tv_schedule(date = "now")tv_schedule(date = "now")
date |
character in 'YYYY-MM-DD' (e.g., '2025-01-01'); see
|
data.frame with one row per program
tv_schedule_Halloween_2025 <- tv_schedule(date = '2025-10-31')tv_schedule_Halloween_2025 <- tv_schedule(date = '2025-10-31')
venues() returns the records-site venue catalog with one row per venue and
location/name fields.
venues()venues()
data.frame with one row per venue
all_venues <- venues()all_venues <- venues()
wsc_play_by_play() retrieves the World Showcase (WSC) play-by-play for a
game as a data.frame where each row represents an event. The returned
schema follows the same cleaned public-facing naming as gc_play_by_play(),
including servedByPlayerId, goalieInNetId, and utc immediately after
secondsElapsedInGame while omitting GC-only clip fields. It also includes
the same HTML-report-derived on-ice player ID columns added to the GC output,
including dynamically expanded overflow skater slots when needed. HTML report
skater and goalie IDs are returned whenever they can be matched back to a
supported row, even when the raw situationCode is stale. For blocked-shot
rows, xCoord, yCoord, xCoordNorm, yCoordNorm, distance, and angle
describe the recorded block location, not the original shot-release location.
Use add_shift_times() with shift_chart() (or shift_charts()) to add
on-ice shift timing columns.
wsc_play_by_play(game = 2023030417) wsc_pbp(game = 2023030417)wsc_play_by_play(game = 2023030417) wsc_pbp(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per event (play)
# May take >5s, so skip. wsc_pbp_Martin_Necas_legacy_game <- wsc_play_by_play(game = 2025020275)# May take >5s, so skip. wsc_pbp_Martin_Necas_legacy_game <- wsc_play_by_play(game = 2025020275)
wsc_play_by_play_raw() returns the raw flattened World Showcase play-by-play
as served by the NHL API for one game. Use wsc_play_by_play() for the
cleaned public schema that repairs common clock/order defects and appends the
derived public columns.
wsc_play_by_play_raw(game = 2023030417) wsc_pbp_raw(game = 2023030417)wsc_play_by_play_raw(game = 2023030417) wsc_pbp_raw(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
data.frame with one row per event (play)
wsc_raw_Martin_Necas_legacy_game <- wsc_play_by_play_raw(game = 2025020275)wsc_raw_Martin_Necas_legacy_game <- wsc_play_by_play_raw(game = 2025020275)
wsc_play_by_plays() downloads the cleaned season-level World Showcase
parquet snapshot and pads situationCode to the four-character public
format. For blocked-shot rows, xCoord, yCoord, xCoordNorm,
yCoordNorm, distance, and angle describe the recorded block location,
not the original shot-release location.
wsc_play_by_plays(season = 20242025) wsc_pbps(season = 20242025)wsc_play_by_plays(season = 20242025) wsc_pbps(season = 20242025)
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per event (play) per game
# May take >5s, so skip. wsc_pbps_20212022 <- wsc_play_by_plays(season = 20212022)# May take >5s, so skip. wsc_pbps_20212022 <- wsc_play_by_plays(season = 20212022)
wsc_play_by_plays_raw() downloads the stored season-level World Showcase
parquet snapshot and returns the raw rows without public-schema cleanup or
situation-code padding.
wsc_play_by_plays_raw(season = 20242025) wsc_pbps_raw(season = 20242025)wsc_play_by_plays_raw(season = 20242025) wsc_pbps_raw(season = 20242025)
season |
integer in YYYYYYYY (e.g., 20242025); see |
data.frame with one row per raw event (play) per game
# May take >5s, so skip. wsc_pbps_raw_20212022 <- wsc_play_by_plays_raw(season = 20212022)# May take >5s, so skip. wsc_pbps_raw_20212022 <- wsc_play_by_plays_raw(season = 20212022)
wsc_summary() returns the World Showcase game-story payload for one game,
including recap/story blocks, team metadata, scoring state, and supporting
media/link fields when that endpoint provides them.
wsc_summary(game = 2023030417)wsc_summary(game = 2023030417)
game |
integer ID (e.g., 2025020275); see |
list of various items
wsc_summary_Martin_Necas_legacy_game <- wsc_summary(game = 2025020275)wsc_summary_Martin_Necas_legacy_game <- wsc_summary(game = 2025020275)
x_game_cumulative_expected_goals() is the X/Twitter-sized companion to
ig_game_cumulative_expected_goals(). It uses the same xG-scored cumulative
series on a 1200-by-675-style canvas.
x_game_cumulative_expected_goals(game = 2023030417, model = NULL, save = TRUE) x_game_cum_xG(game = 2023030417, model = NULL)x_game_cumulative_expected_goals(game = 2023030417, model = NULL, save = TRUE) x_game_cum_xG(game = 2023030417, model = NULL)
game |
integer ID (e.g., 2025020275); see |
model |
deprecated legacy model selector; ignored |
save |
logical; use |
NULL, invisibly
# May take >5s, so skip. x_game_cumulative_expected_goals( game = 2023030417, save = FALSE )# May take >5s, so skip. x_game_cumulative_expected_goals( game = 2023030417, save = FALSE )
x_game_shot_locations() is the X/Twitter-sized companion to
ig_game_shot_locations(). It uses the same xG-scored shot map and legend
logic on a 1200-by-675-style canvas.
x_game_shot_locations( game = 2023030417, team = "home", model = NULL, save = TRUE ) x_game_shot_locs(game = 2023030417, team = "home", model = NULL)x_game_shot_locations( game = 2023030417, team = "home", model = NULL, save = TRUE ) x_game_shot_locs(game = 2023030417, team = "home", model = NULL)
game |
integer ID (e.g., 2025020275); see |
team |
character of 'h'/'home' or 'a'/'away' |
model |
deprecated legacy model selector; ignored |
save |
logical; use |
NULL, invisibly
# May take >5s, so skip. x_game_shot_locations( game = 2023030417, team = 'H', save = FALSE )# May take >5s, so skip. x_game_shot_locations( game = 2023030417, team = 'H', save = FALSE )