Skip to content

Zmalski/NHL-API-Reference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

NHL API Documentation

This document aims to serve as an unofficial reference for the NHL APIs. Corrections and/or suggestions are welcome.

Please note that there appears to be two primary sources for official NHL APIs. (api-web.nhle.com and api.nhle.com/stats/rest). This document is broken into distinct sections detailing each API.

Table of Contents

  1. Base URL
  2. Player Information
    1. Players
      1. Get Game Log
      2. Get Specific Player Info
      3. Get Game Log As of Now
    2. Skaters
      1. Get Current Skater Stats Leaders
      2. Get Skater Stats Leaders for a Specific Season and Game Type
    3. Goalies
      1. Get Current Goalie Stats Leaders
      2. Get Goalie Stats Leaders by Season
    4. Player Spotlight
      1. Get Players
  3. Team Information
    1. Standings
      1. Get Standings
      2. Get Standings by Date
      3. Get Standings information for each Season
    2. Stats
      1. Get Club Stats Now
      2. Get Club Stats for the Season for a Team
      3. Get Club Stats by Season and Game Type
      4. Get Team Scoreboard
    3. Roster
      1. Get Team Roster As of Now
      2. Get Team Roster by Season
      3. Get Roster Season for Team
      4. Get Team Prospects
    4. Schedule
      1. Get Team Season Schedule As of Now
      2. Get Team Season Schedule
      3. Get Month Schedule As of Now
      4. Get Month Schedule
      5. Get Week Schedule
      6. Get Week Schedule As of Now
  4. League Schedule Information
    1. Schedule
      1. Get Current Schedule
      2. Get Schedule by Date
    2. Schedule Calendar
      1. Get Schedule Calendar As of Now
      2. Get Schedule Calendar for a Specific Date
  5. Game Information
    1. Daily Scores
      1. Get Daily Scores As of Now
      2. Get Daily Scores by Date
      3. Get Scoreboard
    2. Where to Watch
      1. Get Streams
    3. Game Events
      1. Get Play By Play
      2. Get Landing
      3. Get Boxscore
      4. Get Game Story
    4. Network
      1. Get TV Schedule for a Specific Date
      2. Get Current TV Schedule
    5. Odds
      1. Get Partner Game Odds
  6. Playoff Information
    1. Overview
      1. Playoff Series Carousel
    2. Schedule
      1. Get Playoff Series Schedule
    3. Bracket
      1. Get Playoff Bracket
  7. Season
    1. Get Seasons
  8. Draft
    1. Get Draft Rankings
    2. Get Draft Rankings by Date
  9. Miscellaneous
    1. Meta
      1. Get Meta Information
      2. Get Game Information
      3. Get Location
    2. OpenAPI Specification
      1. Get OpenAPI Specification

  1. Base URL
  2. Players
    1. Get Player Information
    2. Skaters
      1. Get Skater Leaders
      2. Get Skater Milestones
      3. Get Skater Information
      4. Get Skater Stats
    3. Goalies
      1. Get Goalie Leaders
      2. Get Goalie Stats
      3. Get Goalie Milestones
    4. Draft
      1. Get Draft Information
  3. Teams
    1. Get Team Information
    2. Get Team Stats
    3. Get Franchise Information
  4. Season
    1. Get Component Season
    2. Get Season
  5. Game
    1. Get Game Information
    2. Get Game Metadata
  6. Miscellaneous
    1. Configuration
      1. Get Configuration
    2. Ping the Server
    3. Get Country Information
    4. Get Shift Charts
    5. Glossary
      1. Get Glossary
    6. Content Module
      1. Get Content Module
      2. Get Metadata for Content Module

NHL Web API Documentation

This section provides documentation for the NHL Web API (https://api-web.nhle.com/).

Base URL

All endpoints described in this section are relative to the following base URL:

https://api-web.nhle.com/

Player Information

Players

Get Game Log

  • Endpoint: /v1/player/{player}/game-log/{season}/{game-type}
  • Method: GET
  • Description: Retrieve the game log for a specific player, season, and game type.
  • Parameters:
    • player (int) - Player ID
    • season (int) - Season in YYYYYYYY format, where the first four digits represent the start year of the season, and the last four digits represent the end year.
    • game-type (int) - Game type (guessing 2 for regular season, 3 for playoffs)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/player/8478402/game-log/20232024/2"

Get Specific Player Info

  • Endpoint: /v1/player/{player}/landing
  • Method: GET
  • Description: Retrieve information for a specific player.
  • Parameters:
    • player (int) - Player ID
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/player/8478402/landing"

Get Game Log As of Now

  • Endpoint: /v1/player/{player}/game-log/now
  • Method: GET
  • Description: Retrieve the game log for a specific player as of the current moment.
  • Parameters:
    • player (int) - Player ID
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/player/8478402/game-log/now"

Skaters

Get Current Skater Stats Leaders

  • Endpoint: /v1/skater-stats-leaders/current
  • Method: GET
  • Description: Retrieve current skater stats leaders.
  • Parameters:
    • categories (query, string) - Optional
    • limit (query, int) - Optional (Note: a limit of -1 will return all results)
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/skater-stats-leaders/current?categories=goals&limit=5"

Get Skater Stats Leaders for a Specific Season and Game Type

  • Endpoint: /v1/skater-stats-leaders/{season}/{game-type}
  • Method: GET
  • Description: Retrieve skater stats leaders for a specific season and game type.
  • Parameters:
    • season (int) - Season in YYYYYYYY format, where the first four digits represent the start year of the season, and the last four digits represent the end year.
    • game-type (int) - Game type (guessing 2 for regular season, 3 for playoffs)
  • Parameters:
    • categories (query, string) - Optional
    • limit (query, int) - Optional (Note: a limit of -1 will return all results)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/skater-stats-leaders/20222023/2?categories=assists&limit=3"

Goalies

Get Current Goalie Stats Leaders

  • Endpoint: /v1/goalie-stats-leaders/current
  • Method: GET
  • Description: Retrieve current goalie stats leaders.
  • Request Parameters:
    • categories (query, string) - Optional
    • limit (query, int) - Optional (Note: a limit of -1 will return all results)
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/goalie-stats-leaders/current?categories=wins&limit=5"

Get Goalie Stats Leaders by Season

  • Endpoint: /v1/goalie-stats-leaders/{season}/{game-type}
  • Method: GET
  • Description: Retrieve goalie stats leaders for a specific season and game type.
  • Parameters:
    • season (int) - Season in YYYYYYYY format, where the first four digits represent the start year of the season, and the last four digits represent the end year.
    • game-type (int) - Game type (guessing 2 for regular season, 3 for playoffs)
  • Request Parameters:
    • categories (query, string) - Optional
    • limit (query, int) - Optional (Note: a limit of -1 will return all results)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/goalie-stats-leaders/20232024/2?categories=wins&limit=3"

Player Spotlight

Get Players

  • Endpoint: /v1/player-spotlight
  • Method: GET
  • Description: Retrieve information about players in the "spotlight".
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/player-spotlight"

Team Information

Standings

Get Standings

  • Endpoint: /v1/standings/now
  • Method: GET
  • Description: Retrieve the standings as of the current moment.
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/standings/now"

Get Standings by Date

  • Endpoint: /v1/standings/{date}
  • Method: GET
  • Description: Retrieve the standings for a specific date.
  • Parameters:
    • date (string) - Date in YYYY-MM-DD format
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/standings/2023-11-10"

Get Standings information for each Season

  • Endpoint: /v1/standings-season
  • Method: GET
  • Description: Retrieves information for each season's standings
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/standings-season"

Stats

Get Club Stats Now

  • Endpoint: /v1/club-stats/{team}/now
  • Method: GET
  • Description: Retrieve current statistics for a specific club.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/club-stats/TOR/now"

Get Club Stats for the Season for a Team

  • Endpoint: /v1/club-stats-season/{team}
  • Method: GET
  • Description: Returns an overview of the stats for each season for a specific club. Seems to only indicate the gametypes played in each season.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/club-stats-season/TOR"

Get Club Stats by Season and Game Type

  • Endpoint: /v1/club-stats/{team}/{season}/{game-type}
  • Method: GET
  • Description: Retrieve the stats for a specific team, season, and game type.
  • Parameters:
    • team (string) - Three-letter team code
    • season (int) - Season in YYYYYYYY format, where the first four digits represent the start year of the season, and the last four digits represent the end year.
    • game-type (int) - Game type (guessing 2 for regular season, 3 for playoffs)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/club-stats/TOR/20232024/2"

Get Team Scoreboard

  • Endpoint: /v1/scoreboard/{team}/now
  • Method: GET
  • Description: Retrieve the scoreboard for a specific team as of the current moment.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/scoreboard/TOR/now"

Roster

Get Team Roster As of Now

  • Endpoint: /v1/roster/{team}/current
  • Method: GET
  • Description: Retrieve the roster for a specific team as of the current moment.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/roster/TOR/current"

Get Team Roster by Season

  • Endpoint: /v1/roster/{team}/{season}
  • Method: GET
  • Description: Retrieve the roster for a specific team and season.
  • Parameters:
    • team (string) - Three-letter team code
    • season (int) - Season in YYYYYYYY format, where the first four digits represent the start year of the season, and the last four digits represent the end year.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/roster/TOR/20232024"

Get Roster Season for Team

  • Endpoint: /v1/roster-season/{team}
  • Method: GET
  • Description: Seems to just return a list of all of the seasons that the team played.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/roster-season/TOR"

Get Team Prospects

  • Endpoint: /v1/prospects/{team}
  • Method: GET
  • Description: Retrieve prospects for a specific team.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/prospects/TOR"

Schedule

Get Team Season Schedule As of Now

  • Endpoint: /v1/club-schedule-season/{team}/now
  • Method: GET
  • Description: Retrieve the season schedule for a specific team as of the current moment.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/club-schedule-season/TOR/now"

Get Team Season Schedule

  • Endpoint: /v1/club-schedule-season/{team}/{season}
  • Method: GET
  • Description: Retrieve the season schedule for a specific team and season.
  • Parameters:
    • team (string) - Three-letter team code
    • season (int) - Season in YYYYYYYY format, where the first four digits represent the start year of the season, and the last four digits represent the end year.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/club-schedule-season/TOR/20232024"

Get Month Schedule As of Now

  • Endpoint: /v1/club-schedule/{team}/month/now
  • Method: GET
  • Description: Retrieve the monthly schedule for a specific team as of the current moment.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/club-schedule/TOR/month/now"

Get Month Schedule

  • Endpoint: /v1/club-schedule/{team}/month/{month}
  • Method: GET
  • Description: Retrieve the monthly schedule for a specific team and month.
  • Parameters:
    • team (string) - Three-letter team code
    • month (string) - Month in YYYY-MM format
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/club-schedule/TOR/month/2023-11"

Get Week Schedule

  • Endpoint: /v1/club-schedule/{team}/week/{date}
  • Method: GET
  • Description: Retrieve the weekly schedule for a specific team and date.
  • Parameters:
    • team (string) - Three-letter team code
    • date (string) - Date in YYYY-MM-DD format
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/club-schedule/TOR/week/2023-11-10"

Get Week Schedule As of Now

  • Endpoint: /v1/club-schedule/{team}/week/now
  • Method: GET
  • Description: Retrieve the weekly schedule for a specific team as of the current moment.
  • Parameters:
    • team (string) - Three-letter team code
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/club-schedule/TOR/week/now"

League Schedule Information

Schedule

Get Current Schedule

  • Endpoint: /v1/schedule/now
  • Method: GET
  • Description: Retrieve the current schedule.
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/schedule/now"

Get Schedule by Date

  • Endpoint: /v1/schedule/{date}
  • Method: GET
  • Description: Retrieve the schedule for a specific date.
  • Parameters:
    • date (string) - Date format: YYYY-MM-DD
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/schedule/2023-11-10"

Schedule Calendar

Get Schedule Calendar As of Now

  • Endpoint: /v1/schedule-calendar/now
  • Method: GET
  • Description: Retrieve the schedule calendar as of the current moment.
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/schedule-calendar/now"

Get Schedule Calendar for a Specific Date

  • Endpoint: /v1/schedule-calendar/{date}
  • Method: GET
  • Description: Retrieve the schedule calendar for a specific date.
  • Parameters:
    • date (string) - Date in YYYY-MM-DD format
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/schedule-calendar/2023-11-10"

Game Information

Daily Scores

Get Daily Scores As of Now

  • Endpoint: /v1/score/now
  • Method: GET
  • Description: Retrieve daily scores as of the current moment.
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/score/now"

Get Daily Scores by Date

  • Endpoint: /v1/score/{date}
  • Method: GET
  • Description: Retrieve daily scores for a specific date.
  • Parameters:
    • date (string) - Date format: YYYY-MM-DD
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/score/2023-11-10"

Get Scoreboard

  • Endpoint: /v1/scoreboard/now
  • Method: GET
  • Description: Retrieve the overall scoreboard as of the current moment.
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/scoreboard/now"

Where to Watch

Get Streams

  • Endpoint: /v1/where-to-watch
  • Method: GET
  • Description: Retrieve information about streaming options.
  • Parameters:
    • include (query, string) - Optional
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/where-to-watch"

Game Events

Get Play By Play

  • Endpoint: /v1/gamecenter/{game-id}/play-by-play
  • Method: GET
  • Description: Retrieve play-by-play information for a specific game.
  • Parameters:
    • game-id (int) - Game ID
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/gamecenter/2023020204/play-by-play"

Get Landing

  • Endpoint: /v1/gamecenter/{game-id}/landing
  • Method: GET
  • Description: Retrieve landing information for a specific game.
  • Parameters:
    • game-id (int) - Game ID
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/gamecenter/2023020204/landing"

Get Boxscore

  • Endpoint: /v1/gamecenter/{game-id}/boxscore
  • Method: GET
  • Description: Retrieve boxscore information for a specific game.
  • Parameters:
    • game-id (int) - Game ID
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/gamecenter/2023020204/boxscore"

Get Game Story

  • Endpoint: /v1/wsc/game-story/{game-id}
  • Method: GET
  • Description: Retrieve game story information for a specific game.
  • Parameters:
    • game-id (int) - Game ID
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/wsc/game-story/2023020204"

Network

Get TV Schedule for a Specific Date

  • Endpoint: /v1/network/tv-schedule/{date}
  • Method: GET
  • Description: Retrieve the TV schedule for a specific date.
  • Parameters:
    • date (string) - Date in YYYY-MM-DD format
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/network/tv-schedule/2023-11-10"

Get Current TV Schedule

  • Endpoint: /v1/network/tv-schedule/now
  • Method: GET
  • Description: Retrieve the current TV schedule.
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/network/tv-schedule/now"

Odds

Get Partner Game Odds

  • Endpoint: /v1/partner-game/{country-code}/now
  • Method: GET
  • Description: Retrieve odds for games in a specific country as of the current moment.
  • Parameters:
    • country-code (string) - Country code
  • Response: JSON format
Example using cURL:
curl -L -X GET "https://api-web.nhle.com/v1/partner-game/US/now"

Playoff Information

Overview

Playoff Series Carousel

  • Endpoint: /v1/playoff-series/carousel/{season}/
  • Method: GET
  • Description: Retrieve an overview of each playoff series.
  • Parameters:
    • season (int) - Season in YYYYYYYY format, where the first four digits represent the start year of the season, and the last four digits represent the end year.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/playoff-series/carousel/20232024/"

Schedule

Get Playoff Series Schedule

  • Endpoint: /v1/schedule/playoff-series/{season}/{series_letter}/
  • Method: GET
  • Description: Retrieve the schedule for a specific playoff series.
  • Parameters:
    • season (int) - Season in YYYYYYYY format, where the first four digits represent the start year of the season, and the last four digits represent the end year.
    • series_letter (string) - Single letter indicating which series to retrieve. Is sequential in alphabetical order.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/schedule/playoff-series/20232024/a"

Bracket

Get Playoff Bracket

  • Endpoint: /v1/playoff-bracket/{year}
  • Method: GET
  • Description: Retrieve the current bracket for a specific year's playoffs.
  • Parameters:
    • year (int) - Year in YYYY format
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/playoff-bracket/2022"

Season

Get Seasons

  • Endpoint: /v1/season
  • Method: GET
  • Description: Retrieve a list of all season IDs past & present in the NHL.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/season"

Draft

Get Draft Rankings

  • Endpoint /v1/draft/rankings/now
  • Method: GET
  • Description: Retrieve a list of all draft prospects by category of prospect as of the current moment.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/draft/rankings/now"

Get Draft Rankings by Date

  • Endpoint /v1/draft/rankings/{season}/{prospect_category}
  • Method: GET
  • Description: Retrieve a list of all draft prospects by category of prospect for a specific season.
  • Parameters:
    • season (int) - Season in YYYY format
    • prospect_category (int) - Prospect Category (1 - North American Skater, 2 - International Skater, 3 - North American Goalie, 4 - International Goalie)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/draft/rankings/2023/1"

Miscellaneous

Meta

Get Meta Information

  • Endpoint: /v1/meta
  • Method: GET
  • Description: Retrieve meta information.
  • Request Parameters:
    • players (query, string) - Optional
    • teams (query, string) - Optional
    • seasonStates (query, string) - Optional (Unsure what the options might be here)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/meta?players=8478402&teams=EDM,TOR"

Get Game Information

  • Endpoint: /v1/meta/game/{game-id}
  • Method: GET
  • Description: Retrieve information for a specific game.
  • Parameters:
    • game-id (int) - Game ID
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/meta/game/2023020204"

Get Location

  • Endpoint: /v1/location
  • Method: GET
  • Description: Returns country code tha the webserver thinks the user is in.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api-web.nhle.com/v1/location"

OpenAPI Specification

Get OpenAPI Specification

  • Endpoint: /model/v1/openapi.json
  • Method: GET
  • Description: Retrieve the OpenAPI specification. (Seems to return 404 currently)
  • Response: JSON or YAML format
Example using cURL:
curl -X GET "https://api-web.nhle.com/model/v1/openapi.json"

For the full WADL with extended resources: WADL Link


NHL Stats API Documentation

This section provides documentation for the NHL Stats API (https://api.nhle.com/stats/rest).

Base URL

All endpoints described in this section are relative to the following base URL:

https://api.nhle.com/stats/rest

Players

Get Player Information

  • Endpoint: /{lang}/players
  • Method: GET
  • Description: Retrieve player information. Currently seems to return a truncated list with a total.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/players"

Skaters

Get Skater Leaders

  • Endpoint: /{lang}/leaders/skaters/{attribute}
  • Method: GET
  • Description: Retrieve skater leaders for a specific attribute.
  • Parameters:
    • attribute (string) - Skater attribute
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/leaders/skaters/points"

Get Skater Milestones

  • Endpoint: /{lang}/milestones/skaters
  • Method: GET
  • Description: Retrieve skater milestones.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/milestones/skaters"

Get Skater Information

  • Endpoint: /{lang}/skater
  • Method: GET
  • Description: Retrieve skater information.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/skater"

Get Skater Stats

  • Endpoint: /{lang}/skater/{report}
  • Method: GET
  • Description: Retrieve skater stats for a specific report.
  • Parameters:
    • report (string) - Skater report
    • lang (string) - Language code
  • Request Parameters:
    • isAggregate (query, boolean) - Optional
    • isGame (query, boolean) - Optional
    • factCayenneExp (query, string) - Optional
    • include (query, string) - Optional
    • exclude (query, string) - Optional
    • cayenneExp (query, string) - Required
    • sort (query, string) - Optional
    • dir (query, string) - Optional
    • start (query, int) - Optional
    • limit (query, int) - Optional (Note: a limit of -1 will return all results)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/skater/summary?limit=72&start=17&sort=points&cayenneExp=seasonId=20232024"

Goalies

Get Goalie Leaders

  • Endpoint: /{lang}/leaders/goalies/{attribute}
  • Method: GET
  • Description: Retrieve goalie leaders for a specific attribute.
  • Parameters:
    • attribute (string) - Goalie attribute
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/leaders/goalies/gaa"

Get Goalie Stats

  • Endpoint: /{lang}/goalie/{report}
  • Method: GET
  • Description: Retrieve goalie stats for a specific report.
  • Parameters:
    • report (string) - Goalie report
    • lang (string) - Language code
  • Request Parameters:
    • isAggregate (query, boolean) - Optional
    • isGame (query, boolean) - Optional
    • factCayenneExp (query, string) - Optional
    • include (query, string) - Optional
    • exclude (query, string) - Optional
    • cayenneExp (query, string) - Required
    • sort (query, string) - Optional
    • dir (query, string) - Optional
    • start (query, int) - Optional
    • limit (query, int) - Optional (Note: a limit of -1 will return all results)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/goalie/summary?limit=72&start=15&sort=wins&cayenneExp=seasonId=20232024"

Get Goalie Milestones

  • Endpoint: /{lang}/milestones/goalies
  • Method: GET
  • Description: Retrieve goalie milestones.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/milestones/goalies"

Draft

Get Draft Information

  • Endpoint: /{lang}/draft
  • Method: GET
  • Description: Retrieve draft information.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/draft"

Teams

Get Team Information

  • Endpoint: /{lang}/team
  • Method: GET
  • Description: Retrieve list of all teams.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/team"

Get Team Stats

  • Endpoint: /{lang}/team/{report}
  • Method: GET
  • Description: Retrieve team stats for a specific report.
  • Parameters:
    • report (string) - Team report
    • lang (string) - Language code
  • Request Parameters:
    • isAggregate (query, boolean) - Optional
    • isGame (query, boolean) - Optional
    • factCayenneExp (query, string) - Optional
    • include (query, string) - Optional
    • exclude (query, string) - Optional
    • cayenneExp (query, string) - Optional
    • sort (query, string) - Optional
    • dir (query, string) - Optional
    • start (query, int) - Optional
    • limit (query, int) - Optional (Note: a limit of -1 will return all results)
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/team/summary?sort=shotsForPerGame&cayenneExp=seasonId=20232024 and gameTypeId=2"

Get Franchise Information

  • Endpoint: /{lang}/franchise
  • Method: GET
  • Description: Retrieve list of all franchises.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/franchise"

Season

Get Component Season

  • Endpoint: /{lang}/componentSeason
  • Method: GET
  • Description: Retrieve component season information.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/componentSeason"

Get Season

  • Endpoint: /{lang}/season
  • Method: GET
  • Description: Retrieve season information.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/season"

Game

Get Game Information

  • Endpoint: /{lang}/game
  • Method: GET
  • Description: Retrieve game information.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/game"

Get Game Metadata

  • Endpoint: /{lang}/game/meta
  • Method: GET
  • Description: Retrieve metadata for game.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/game/meta"

Miscellaneous

Configuration

Get Configuration

  • Endpoint: /{lang}/config
  • Method: GET
  • Description: Retrieve configuration information.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/config"

Ping the Server

  • Endpoint: /ping
  • Method: GET
  • Description: Ping the server to check connectivity.
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/ping"

Get Country Information

  • Endpoint: /{lang}/country
  • Method: GET
  • Description: Retrieve country information. Returns list of all countries with a hockey presence(?)
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/country"

Get Shift Charts

  • Endpoint: /{lang}/shiftcharts?cayenneExp=gameId={game_id}
  • Method: GET
  • Description: Retrieve shift charts for a specific game.
  • Parameters:
    • lang (string) - Language code
    • game-id (int) - Game ID
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/shiftcharts?cayenneExp=gameId=2021020001"

Glossary

Get Glossary

  • Endpoint: /{lang}/glossary
  • Method: GET
  • Description: Retrieve the glossary for a specific language.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/glossary"

Content Module

Get Content Module

  • Endpoint: /{lang}/content/module
  • Method: GET
  • Description: Retrieve content module information. Not sure what this one is for. Example returns empty data.
  • Parameters:
    • lang (string) - Language code
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/en/content/module/overview"

Get Metadata for Content Module

  • Endpoint: /content/module/meta
  • Method: GET
  • Description: Retrieve metadata for content modules. Example returns 404
  • Response: JSON format
Example using cURL:
curl -X GET "https://api.nhle.com/stats/rest/content/module/meta"

For the full WADL with extended resources: WADL Link

About

Unofficial reference for the NHL API endpoints.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published