Compare
The NHL API: free endpoints, community docs and PuckAPI
The NHL's api-web.nhle.com and api.nhle.com/stats are free but undocumented. Where each fits, what the community docs cover, and how PuckAPI differs.
Comparison facts checked October 14, 2026. PuckAPI data last refreshed 2026-10-14 21:05 UTC, newest data through 2026-10-14. Changelog
There is no official, documented NHL API. The NHL runs two public hosts that its own apps use, api-web.nhle.com (schedules, standings, box scores, play-by-play) and api.nhle.com/stats/rest (stats tables and shift charts). Both are free and need no key, and both are unversioned and undocumented by the NHL, so what is known about them comes from community references such as Zmalski/NHL-API-Reference.
PuckAPI is a separate, documented hockey data API and MCP server, with every tool described, a live example for each, and 500 free credits every month. It reads from the NHL's feeds and adds what they lack: odds history, expected goals and GSAX, shift-derived situation time, and games where the NHL's shift chart is missing. For a scoreboard, a bot or a one-off script, the NHL's endpoints are enough. For a model, a backtest or an AI agent, a documented API saves the clean-up work.
The options
- api-web.nhle.com
The NHL's web API: schedule, standings, rosters, box scores, play-by-play with x/y coordinates and a situation code per event, and an odds widget feed.
Live. Free, no key. No NHL documentation or published terms.
- api.nhle.com/stats/rest
The NHL's stats host: season stat tables and shift charts (shiftcharts?cayenneExp=gameId=...).
Live. Free, no key. Queried with a Cayenne expression. Not documented by the NHL.
- Zmalski/NHL-API-Reference
A community reference for both hosts above, with endpoint paths, parameters and curl examples, including play-by-play, shift charts and the odds feed.
MIT licence, unofficial. Last pushed 2025-11-07.
- dword4/nhlapi
Docs for the old statsapi.web.nhl.com/api/v1 host, written in January 2018.
The GitHub repo's last commit is from 2018-06-07 and says the work moved to GitLab. statsapi.web.nhl.com did not resolve when checked.
- coreyjs/nhl-api-py
A Python wrapper (pip install nhl-api-py) over the newer endpoints, with modules for teams, schedule, stats, standings, game center and the NHL EDGE data.
Apache-2.0. Last pushed 2026-09-07. Its README calls the NHL API undocumented and says some endpoints are still being discovered.
Side by side
| PuckAPI | the unofficial NHL endpoints | |
|---|---|---|
| Price and key | 500 free credits a month, then from $19/mo; a free key | Free, no key |
| Documentation | Every tool documented with parameters, response fields and a live example | None from the NHL; community references and wrappers |
| Schema stability | A fixed tool list, catalogued at /v1/tools | No versioned contract. The older statsapi.web.nhl.com host that dword4/nhlapi documents no longer resolves |
| Play-by-play | get_plays: filter by game, season, player, event type or strength; coordinates and strength state per event | One JSON file per game with x/y coordinates and a situation code; you fetch and filter yourself |
| Shift charts | get_shifts and get_situation_time, from 2010-11. Where the NHL has no chart, built from the NHL's HTML time-on-ice reports | api.nhle.com/stats/rest/en/shiftcharts. On 2026-10-14, 4 of 5 sampled 2026-27 games returned no rows |
| Odds | Moneyline, puck line and totals by sportsbook for every game from 2019-20, with line movement | Current odds from one betting partner per country, via partner-game; no history seen |
| Advanced stats | Expected goals, GSAX, Corsi and Fenwick returned directly | Raw events and counts; you compute them |
| AI assistants | MCP server for Claude, ChatGPT and Cursor | None |
| Live in-game data | No: results land each morning, odds hourly | Yes, as the NHL's own apps use it |
Example call
One player's shifts in one game. The same data on the NHL side is a shiftcharts request for the whole game that you then filter and merge yourself.
curl -X POST https://mcp.puckapi.com/v1/get_shifts \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"game_id": "2026020084",
"player_id": 8471214
}'{"data": {"game_id": "2026020084", "game_date": "2026-10-11", "home_team": "WSH", "away_team": "SEA", "players": [{"player_id": 8471214, "name": "Alex Ovechkin", "position": "LW", "team": "WSH", "shift_count": 18, "shift_seconds": 1016, "official_toi_seconds": 1016, "plus_minus": 0, "shifts": [{"period": 1, "start": "00:57", "end": "02:39", "start_seconds": 57, "end_seconds": 159, "duration_seconds": 102}]}], "count": 1, "dropped_shifts": 0}}The shifts array is cut to the first shift here. Responses are wrapped in a data object. get_shifts costs 10 credits.
Use the unofficial NHL endpoints instead if
- You are building a scoreboard, a Discord bot or a quick script and today's data from the NHL's own feed is enough.
- You need live, in-game updates. PuckAPI refreshes each morning, not during games.
- You want to read endpoint-level detail the NHL exposes that PuckAPI does not wrap, such as the EDGE tracking data in nhl-api-py.
- You are comfortable parsing raw JSON and handling changes yourself, and want zero cost and no account.
Questions
Is there an official NHL API?
The NHL runs public endpoints at api-web.nhle.com and api.nhle.com/stats/rest that its own apps use, but it publishes no documentation or terms for them. Community references such as Zmalski/NHL-API-Reference describe them.
Is there free NHL API documentation?
For the NHL's own endpoints, the community reference at github.com/Zmalski/NHL-API-Reference is the most complete we found. The docs at dword4/nhlapi describe the older statsapi.web.nhl.com host, which no longer resolves. PuckAPI's own tools are documented at /docs.
What is the best free NHL API?
The NHL's own endpoints are free with no key, and fit scores, schedules and box scores. PuckAPI is also free to start, with 500 credits every month, and is the better fit when you want a documented schema, odds history or expected goals.
Where do I get NHL play-by-play data from an API?
The NHL serves one play-by-play file per game at api-web.nhle.com/v1/gamecenter/{game-id}/play-by-play, with x/y coordinates and a situation code on each event. PuckAPI's get_plays returns the same kind of events for games since 2010-11, filtered by game, season, player, event type or strength.
Is there an NHL shift data API?
Yes, at api.nhle.com/stats/rest/en/shiftcharts?cayenneExp=gameId={id}, but some games have no chart. On 2026-10-14, 4 of 5 sampled 2026-27 games returned no rows. PuckAPI's get_shifts and get_situation_time fall back to the NHL's HTML time-on-ice reports for those games.
Does the NHL API have betting odds?
It has an odds widget feed at api-web.nhle.com/v1/partner-game/{country}/now, which returned current odds from a single betting partner when checked. PuckAPI keeps lines from many sportsbooks for every game since 2019-20, with line movement.
Can Claude or ChatGPT use PuckAPI?
Yes. PuckAPI runs an MCP server at mcp.puckapi.com, so Claude, ChatGPT and Cursor can call the same tools as the REST API.
Sources
- Zmalski/NHL-API-Reference
- dword4/nhlapi (old statsapi.web.nhl.com docs)
- coreyjs/nhl-api-py
- NHL web API, play-by-play example
- NHL stats API, shift chart example
Checked October 14, 2026.
See the data
Try it with 500 free credits every month
No card. REST or MCP.