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 | nhlApiWeb* | 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.nhlApiWebStandingsSeason({ 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.nhlApiWebPbp({ 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';
const games = await sdv.hockeytech.hockeytech_schedule({ league: 'pwhl', 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 live
The cell below runs the published npm package end to end against the native api-web family — the game feed, parsed to plays right in your browser:
const sdv = (await import('sportsdataverse')).default;
// 2023030417 = a 2023 Stanley Cup Final game
const plays = await sdv.nhl.nhlApiWebPbp({ game_id: '2023030417', parsed: true });
// first ten parsed play rows
plays.slice(0, 10);
RunKit cells install sportsdataverse from npm, so the v3 method names above
(nhlApiWebPbp, nhlEdge*, the parsed option) light up once v3 is
published. Until then the embed may resolve v2, whose surface differs. Copy any
snippet into Node to run it against your installed version.
Full method + parameter tables: NHL reference (ESPN, api-web, EDGE, Stats REST, and Records families).