Skip to main content

NHL recipes

Hockey lives under sdv.nhl and spans the richest native surface in the package — the ESPN wrappers plus four NHL-operated APIs:

FamilyMethodsHostWhat it covers
ESPNespnNhl*site.api.espn.comscoreboard, rosters, summary
api-webnhl* (nhlWeb* where sdv-py has a hand-written nhl_*)api-web.nhle.complay-by-play, boxscores, standings, leaders
EDGEnhlEdge*api-web.nhle.complayer/team puck & skating tracking
Stats RESTnhlStatsRest*api.nhle.com/stats/restfranchises, seasons, glossary
RecordsnhlRecords*records.nhl.comall-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);

Open in playground ▶

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:

Loading live cell…

Open in playground ▶

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:

Loading live cell…

Open in playground ▶

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);

Open in playground ▶

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);

Open in playground ▶

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);

Open in playground ▶

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:

leagueLeague
pwhlProfessional Women's Hockey League (major)
ahlAmerican Hockey League
ohl / whlOntario / Western Hockey League (CHL juniors)
qmjhlQué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:

Loading live cell…

Open in playground ▶

PWHL standings​

import sdv from 'sportsdataverse';

const standings = await sdv.hockeytech.hockeytech_standings({ league: 'pwhl', parsed: true });
console.table(standings);
Loading live cell…

Open in playground ▶

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);
Loading live cell…

Open in playground ▶

note

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.

tip

Full method + parameter tables: NHL reference (ESPN, api-web, EDGE, Stats REST, and Records families).