NHL recipes
Hockey lives under sdv.nhl and spans the richest native surface in the
package — the ESPN wrappers plus four NHL-operated APIs:
| Family | Methods | Host | What it covers |
|---|---|---|---|
| ESPN | espnNhl* | site.api.espn.com | scoreboard, rosters, summary |
| api-web | nhl* (nhlWeb* where sdv-py has a hand-written nhl_*) | api-web.nhle.com | play-by-play, boxscores, standings, leaders |
| EDGE | nhlEdge* | api-web.nhle.com | player/team puck & skating tracking |
| Stats REST | nhlStatsRest* | api.nhle.com/stats/rest | franchises, seasons, glossary |
| Records | nhlRecords* | records.nhl.com | all-time franchise & player records |
All honor { parsed: true }.
ESPN scoreboard
import sdv from 'sportsdataverse';
const games = await sdv.nhl.espnNhlScoreboard({ parsed: true });
console.table(games);
Full-season standings (api-web)
No parameters needed — the current season's standings, tidied.
import sdv from 'sportsdataverse';
const standings = await sdv.nhl.nhlStandingsSeason({ parsed: true });
console.table(standings);
Live and inline — a native api-web.nhle.com request, no params:
Play-by-play for one game (api-web)
import sdv from 'sportsdataverse';
// 2023030417 = a 2023 Stanley Cup Final game
const plays = await sdv.nhl.nhlWebPbp({ game_id: '2023030417', parsed: true });
console.table(plays.slice(0, 10));
The game feed, parsed to plays — change game_id and re-run:
The other native families
EDGE player tracking
Skating-speed top-10 board. Pass positions, sort_by, a season (e.g.
20242025), and game_type (2 = regular season).
import sdv from 'sportsdataverse';
const fastest = await sdv.nhl.nhlEdgeSkaterSpeedTop10({
positions: 'forwards',
sort_by: 'maxSkatingSpeed',
season: '20242025',
game_type: 2,
parsed: true,
});
console.table(fastest);
Stats REST — franchises
The lang path param defaults to en.
import sdv from 'sportsdataverse';
const franchises = await sdv.nhl.nhlStatsRestFranchise({ lang: 'en', parsed: true });
console.table(franchises);
Records — every franchise
No params — every NHL franchise with its records metadata.
import sdv from 'sportsdataverse';
const records = await sdv.nhl.nhlRecordsFranchises({ parsed: true });
console.table(records);
Beyond the NHL — HockeyTech (PWHL + junior/minor)
The rest of hockey lives on its own sdv.hockeytech namespace (HockeyTech /
LeagueStat), nested under Hockey in the sidebar. One gateway serves every
league — pick it with the league param:
league | League |
|---|---|
pwhl | Professional Women's Hockey League (major) |
ahl | American Hockey League |
ohl / whl | Ontario / Western Hockey League (CHL juniors) |
qmjhl | Québec Maritimes Junior Hockey League |
Keys default in; switch leagues by changing league. Every endpoint honors
{ parsed: true }.
PWHL schedule
import sdv from 'sportsdataverse';
// season_id 8 = the PWHL 2025-26 regular season (hockeytechSeasons({ league: 'pwhl' }) lists them all)
const games = await sdv.hockeytech.hockeytech_schedule({ league: 'pwhl', season_id: 8, parsed: true });
console.table(games);
Live and inline — swap league for ahl / ohl / whl:
PWHL standings
import sdv from 'sportsdataverse';
const standings = await sdv.hockeytech.hockeytech_standings({ league: 'pwhl', parsed: true });
console.table(standings);
Stat leaders, players & play-by-play
hockeytech_leaders (skater/goalie leaderboards), hockeytech_player_stats
(career season stats by player_id) and hockeytech_pbp (per-game events by
game_id) round out the surface, alongside teams, team_roster,
game_shifts, game_summary, and seasons.
import sdv from 'sportsdataverse';
const leaders = await sdv.hockeytech.hockeytech_leaders({ league: 'pwhl', parsed: true });
console.table(leaders);
PWHL / AHL / OHL / WHL run live in the playground. QMJHL uses a secondary
host (cluster.leaguestat.com) that isn't in the playground's proxy allowlist —
league: 'qmjhl' works from the library, but its in-browser playground/RunCell
calls won't resolve. Full method + column tables:
HockeyTech reference.
Run it yourself
The game feed, parsed to plays, as a ready-to-run Node sandbox (it installs the published npm package and hits api-web live — no API key needed):
Opens a Node sandbox in a new tab with this script as index.mjs; runs live (no API key for ESPN).
The NHL tutorial walks the same feed plus EDGE, with the output frozen into the page.
Full method + parameter tables: NHL reference (ESPN, api-web, EDGE, Stats REST, and Records families).