National Hockey League REST API

User Documentation

The NHL REST API is the easiest way to gather current statistics and information about National Hockey League players and teams.

Overview

The NHL REST API is a full-featured service for gathering current player statistics and team standings for the National Hockey League. It is hosted on RapidAPI, and allows for different calls to be made based on what your needs are. Read on for further details.

The API is perfect for pulling stats and standings for the following use cases:

Usage

Each player in the system has a unique id. This is guaranteed to never change and can be used to identify the player on subsequent API calls. Each player also has a slug attached to them. This value is more human-readable, but is not absolutely guaranteed to be unique. Also keep in mind that many players have non-latin characters in their name, as well as hyphens and suffixes. This may lead to slugs that are not easily guessable. Either of these values may be used on the /stats calls to identify the player.

The statistics and standings endpoints always return the last modified timestamp for the data being returned. This can be used by your app to determine how fresh the data is. The value is always specified in UTC.

Endpoints

Following are the available endpoints in this API. Please see the official documentation for details on how to make the actual call, as well as the expected return types.

GET /search?q={search-criteria} - searches for a player’s unique id. This id can then be used on subsequent lookups to gather statistics. The search can include the player’s name, team, and position.

GET /stats/scoring/{id-or-slug} - gets scoring stats for a player.

GET /stats/goaltending/{id-or-slug} - gets goaltending stats for a player.

GET /stats/scoring?ids={list-of-ids} - gets scoring stats for up to 10 players at a time. The list is specified delimited by commas.

GET /stats/goaltending?ids={list-of-ids} - gets goaltending stats for up to 10 players at a time. The list is specified delimited by commas.

GET /standings/{conference}/{division} - gets the standings for the given conference and division.

Support

Please contact us with any issues you are having by emailing us at support@moonlabs.app. If there is a feature you’d like us to add, please let us know!