Learn R Programming

nhlscraper

Overview

nhlscraper is a minimum-dependency R package to scrape, clean, and visualize 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.

Prerequisite

  • R/RStudio; you can check out my tutorial if you are not familiar!

Installation

Install the official version from CRAN with:

install.packages('nhlscraper')

Install the development version from GitHub with:

install.packages('devtools')
devtools::install_github('RentoSaijo/nhlscraper')

Disclosure

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 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.

History

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 together, we ultimately identified 400+ new endpoints that expose a wide range of NHL data. In parallel, I also discovered many new endpoints for the ESPN API, extending beyond what Joseph Wilson had already compiled.

Copy Link

Version

Install

install.packages('nhlscraper')

Monthly Downloads

276

Version

0.4.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Rento Saijo

Last Published

January 28th, 2026

Functions in nhlscraper (0.4.2)

draw_rink_arc

Draw an arc on the rink
draft_prospects

Access all the draft prospects
expansion_drafts

Access all the expansion drafts
flag_is_home

Flag if the event belongs to the home team or not for all the events (plays) in a play-by-play
espn_player_summary

Access the ESPN summary for a player
draft_tracker

Access the real-time draft tracker
drafts

Access all the drafts
coaches

Access all the coaches
espn_players

Access all the ESPN players
flag_is_rush

Flag if the shot attempt is a rush attempt or not for all the shots in a play-by-play
espn_injuries

Access the real-time ESPN injury reports
espn_play_by_play

Access the ESPN play-by-play for a game
draft_rankings

Access the draft rankings for a class and category
espn_futures

Access the ESPN futures for a season
espn_game_odds

Access the ESPN odds for a game
franchise_statistics

Access the all-time statistics for all the franchises by game type
flag_is_rebound

Flag if the shot attempt is a rebound attempt or creates a rebound for all the shots in a play-by-play
franchise_team_statistics

Access the all-time statistics for all the franchises by team and game type
espn_transactions

Access the ESPN transactions for a season
expansion_draft_picks

Access all the expansion draft picks
get_attendance

Access the attendance by season and game type
franchise_season_statistics

Access the statistics for all the franchises by season and game type
franchise_playoff_situational_results

Access the playoff series results for all the franchises by situation
game_odds

Access the real-time game odds for a country by partnered bookmaker
get_espn_events

Access the ESPN events (games) by start and end dates
get_award_winners

Access all the award winners/finalists
get_countries

Access all the countries
get_configuration

Access the configurations for team, skater, and goalie reports
get_espn_athlete

Access the ESPN summary for an athlete (player) and season
get_espn_athletes

Access all the ESPN athletes (players)
get_bracket

Access the playoff bracket for a season
get_espn_event_odds

Access the ESPN odds for an event (game)
get_awards

Access all the awards
get_espn_futures

Access the ESPN futures for a season
countries

Access all the countries
draft_picks

Access all the draft picks
draw_rink_circle

Draw a circle on the rink
get_draft_tracker

Access the real-time draft tracker
games

Access all the games
game_type_now

Access the game type as of now
espn_api

Call the ESPN API with 429 (rate limit) error-handling
get_espn_event_officials

Access the officials for an ESPN event (game)
get_espn_event

Access the ESPN summary for an event (game)
get_espn_coaches

Access the ESPN coaches for a season
get_game_boxscore

Access the boxscore for a game, team, and player type
get_drafts

Access all the drafts
get_franchises

Access all the franchises
get_franchise_vs_franchise

Access the all-time statistics versus other franchises for all the franchises by game type
get_game_landing

Access the GameCenter (GC) summary for a game
franchise_versus_franchise

Access the all-time statistics versus other franchises for all the franchises by game type
espn_team_summary

Access the ESPN summary for a team
gc_play_by_plays

Access the GameCenter (GC) play-by-plays for a season
espn_teams

Access all the ESPN teams
get_espn_injuries

Access the real-time ESPN injury reports
franchises

Access all the franchises
gc_play_by_play

Access the GameCenter (GC) play-by-play for a game
get_shift_charts

Access the shift charts for a game
get_skater_leaders

Access the skater statistics leaders for a season, game type, and category
get_goalie_leaders

Access the goalie statistics leaders for a season, game type, and category
general_managers

Access all the general managers
get_espn_coach

Access the ESPN statistics for a coach and (multiple) season(s)
gc_summary

Access the GameCenter (GC) summary for a game
game_rosters

Access the rosters for a game
get_goalie_statistics

Access various reports for all the goalies by season or game
get_game_story

Access the World Showcase (WSC) summary for a game
get_games

Access all the games
get_spotlight_players

Access the spotlight players
get_skaters

Access all the skaters for a range of seasons
get_espn_event_play_by_play

Access the ESPN play-by-play for an event (game)
get_draft_rankings

Access the draft rankings for a year and player type
get_season_now

Access the season and game type as of now
get_draft_picks

Access all the draft picks
get_seasons

Access all the seasons
get_goalies

Access all the goalies for a range of seasons
get_streams

Access all the streams
get_team_schedule

Access the schedule for a team and season
get_team_scoreboard

Access the team scoreboard as of now
get_player_landing

Access the summary for a player
get_espn_coach_career

Access the career ESPN statistics for a coach
get_player_game_log

Access the game log for a player, season, and game type
get_espn_teams

Access all the ESPN teams for a season
get_espn_transactions

Access the ESPN transactions by start and end dates
get_officials

Access all the officials
get_espn_team

Access the ESPN summary for a team and season
get_skater_milestones

Access the skaters on milestone watch
get_goalie_milestones

Access the goalies on milestone watch
get_scoreboards

Access the scoreboards for a date
get_scores

Access the scores for a date
get_partner_odds

Access the real-time game odds for a country by partnered bookmaker
get_espn_event_stars

Access the three stars for an ESPN event (game)
get_players

Access all the players
goalie_leaders

Access the goalie statistics leaders for a season, game type, and category
get_schedule

Access the schedule for a date
get_tv_schedule

Access the NHL Network TV schedule for a date
goalie_milestones

Access the goalies on milestone watch
get_teams

Access all the teams
goalie_game_report

Access various reports for a season, game type, and category for all the goalies by game
goalie_season_report

Access various reports for a season, game type, and category for all the goalies by season
goalie_edge_summary

Access the EDGE summary for a goalie, season, and game type
goalie_scoring

Access the career scoring statistics for all the goalies
get_glossary

Access the glossary
get_franchise_team_totals

Access the all-time statistics for all the franchises by team and game type
get_gc_play_by_play

Access the GameCenter (GC) play-by-play for a game
get_franchise_season_by_season

Access the statistics for all the franchises by season and game type
ping

Ping
get_team_prospects

Access the prospects for a team and position
player_game_log

Access the game log for a player, season, and game type
get_venues

Access all the venues
get_skater_statistics

Access various reports for all the skaters by season or game
get_wsc_play_by_play

Access the World Showcase (WSC) play-by-play for a game
goalie_regular_statistics

Access the career regular season statistics for all the goalies
get_team_seasons

Access the season(s) and game type(s) in which a team played
get_standings

Access the standings for a date
get_standings_information

Access the standings rules by season
ig_game_shot_locations

Save an Instagram (IG) share-able shot-location plot for a game
goalie_edge_shot_location

Access the EDGE shot location statistics for a goalie, season, game type, and category
goalie_edge_seasons

Access the season(s) and game type(s) in which there exists goalie EDGE statistics
location

Access the location for a zip code
get_team_statistics

Access various reports for all the teams by season or game
goalie_game_scoring

Access the scoring statistics for all the goalies by game
goalie_game_statistics

Access the statistics for all the goalies by game
goalie_statistics

Access the career statistics for all the goalies
player_seasons

Access the season(s) and game type(s) in which a player played
ig_game_cumulative_expected_goals

Save an Instagram (IG) share-able cumulative expected goals (xG) time-series plot for a game
get_series

Access the playoff series for a season and round
goalie_report_configurations

Access the configurations for goalie reports
nhl_api

Call the NHL API with 429 (rate limit) error-handling
lottery_odds

Access the draft lottery odds
penalty_shots

Access all the penalty shots
officials

Access all the officials
scores

Access the scores for a date
season_now

Access the season as of now
skater_leaders

Access the skater statistics leaders for a season, game type, and category
skater_edge_leaders

Access the skater EDGE statistics leaders for a season and game type
skater_game_report

Access various reports for a season, game type, and category for all the skaters by game
skater_edge_seasons

Access the season(s) and game type(s) in which there exists skater EDGE statistics
get_series_schedule

Access the playoff schedule for a season and series
get_team_roster

Access the roster for a team, season, and player type
glossary

Access the glossary
get_team_roster_statistics

Access the roster statistics for a team, season, game type, and player type
seasons

Access all the seasons
series

Access all the playoff series by game
players

Access all the players
spotlight_players

Access the spotlight players
standings

Access the standings for a date
goalie_edge_five_versus_five

Access the EDGE 5 vs. 5 statistics for a goalie, season, game type, and category
goalie_edge_leaders

Access the goalie EDGE statistics leaders for a season and game type
goalie_season_statistics

Access the statistics for all the goalies by season, game type, and team.
goalie_edge_save_percentage

Access the EDGE save percentage statistics for a goalie, season, game type, and category
goalie_series_statistics

Access the playoff statistics for all the goalies by series
normalize_team_key

Normalize the team key
skater_edge_shot_location

Access the EDGE shot location statistics for a skater, season, game type, and category
roster

Access the roster for a team, season, and position
replay

Access the replay for an event
skater_season_statistics

Access the statistics for all the skaters by season, game type, and team
playoff_season_statistics

Access the playoff statistics by season
team_logos

Access all the team logos
x_game_cumulative_expected_goals

Save an X (Twitter) share-able cumulative expected goals (xG) time-series plot for a game
skater_season_report

Access various reports for a season, game type, and category for all the skaters by season
team_edge_leaders

Access the team EDGE statistics leaders for a season and game type
normalize_coordinates

Normalize the x and y coordinates for all the events (plays) in a play-by-play
strip_time_period

Strip the timestamp and period number into the time elapsed in the period and game for all the events (plays) in a play-by-play
team_month_schedule

Access the schedule for a team and month
schedule

Access the schedule for a date
roster_statistics

Access the roster statistics for a team, season, game type, and position
shift_charts

Access the shift charts for a season
team_week_schedule

Access the schedule for a team and week since a date
team_edge_shot_location

Access the EDGE shot location statistics for a team, season, game type, and category
team_edge_seasons

Access the season(s) and game type(s) in which there exists team EDGE statistics
skater_edge_skating_distance

Access the EDGE skating distance statistics for a skater, season, game type, and category
skater_edge_skating_speed

Access the EDGE skating speed statistics for a skater, season, game type, and category
skater_edge_shot_speed

Access the EDGE shot speed statistics for a skater, season, game type, and category
skater_edge_summary

Access the EDGE summary for a skater, season, and game type
skater_edge_zone_time

Access the EDGE zone time statistics for a skater, season, game type, and category
strip_game_id

Strip the game ID into the season ID, game type ID, and game number for all the events (plays) in a play-by-play
team_report_configurations

Access the configurations for team reports
x_game_shot_locations

Save an X (Twitter) share-able shot-location plot for a game
team_prospects

Access the prospects for a team and position
team_season_report

Access various reports for a season, game type, and category for all the teams by season
team_season_schedule

Access the schedule for a team and season
wsc_summary

Access the World Showcase (WSC) summary for a game
wsc_play_by_plays

Access the World Showcase (WSC) play-by-plays for a season
team_edge_skating_speed

Access the EDGE skating speed statistics for a team, season, game type, and category
strip_situation_code

Strip the situation code into goalie and skater counts, man differential, and strength state for all the events (plays) in a play-by-play by perspective
team_edge_summary

Access the EDGE summary for a team, season, and game type
skater_series_statistics

Access the playoff statistics for all the skaters by series
shifts

Access the shift charts for a game
skater_playoff_statistics

Access the career playoff statistics for all the skaters
skater_milestones

Access the skaters on milestone watch
skater_statistics

Access the career statistics for all the skaters
team_edge_shot_speed

Access the EDGE shot speed statistics for a team, season, game type, and category
shift_chart

Access the shift chart for a game
player_summary

Access the summary for a player
series_schedule

Access the playoff schedule for a season and series
skater_regular_statistics

Access the career regular season statistics for all the skaters
skater_report_configurations

Access the configurations for skater reports
standings_rules

Access the standings rules by season
team_season_statistics

Access the statistics for all the teams by season and game type
streams

Access all the streams
tv_schedule

Access the NHL Network TV schedule for a date
to_team_tri_code

Convert to the appropriate team three-letter code
team_edge_zone_time

Access the EDGE zone time statistics for a team, season, game type, and category
team_game_report

Access various reports for a season, game type, and category for all the teams by game
team_edge_skating_distance

Access the EDGE skating distance statistics for a team, season, game type, and category
to_game_type_id

Convert to the appropriate game type ID
to_team_id

Convert to the appropriate team ID
teams

Access all the teams
wsc_play_by_play

Access the World Showcase (WSC) play-by-play for a game
team_seasons

Access the season(s) and game type(s) in which a team played
venues

Access all the venues
award_winners

Access all the award winners/finalists
bracket

Access the playoff bracket for a season
boxscore

Access the boxscore for a game, team, and position
calculate_angle

Calculate the Euclidean angle from the attacking net for all the events (plays) in a play-by-play
awards

Access all the awards
calculate_expected_goals_v2

Calculate version 2 of the expected goals for all the events (plays) in a play-by-play
calculate_expected_goals_v1

Calculate version 1 of the expected goals for all the events (plays) in a play-by-play
coach_franchise_statistics

Access the statistics for all the coaches by franchise and game type
add_on_ice_players

Add on-ice player IDs to a play-by-play by merging with shift charts
attendance

Access the attendance by season and game type
coach_career_statistics

Access the career statistics for all the coaches
calculate_expected_goals_v3

Calculate version 3 of the expected goals for all the events (plays) in a play-by-play
espn_game_summary

Access the ESPN summary for a game
calculate_distance

Calculate the Euclidean distance from the attacking net for all the events (plays) in a play-by-play
espn_games

Access the ESPN games for a season
combine_reports

Access the draft combine reports
draw_NHL_rink

Draw a full NHL rink
count_goals_shots

Count the as-of-event goal, shots on goal, Fenwick, and Corsi attempts and differentials for all the events (plays) in a play-by-play by perspective