NBA & WNBA recipes
Basketball lives under sdv.nba and sdv.wnba. Both expose the full ESPN
cross-league surface โ scoreboard, team roster, the 21-section summary
dispatcher, standings, rankings, and more โ under espnNba* / espnWnba*
method names. Pass { parsed: true } for tidy rows.
Today's scoreboardโ
import sdv from 'sportsdataverse';
const games = await sdv.nba.espnNbaScoreboard({ parsed: true });
console.table(games);
The cell below is the same call, live and inline โ edit a param, hit Run โถ, and the response is parsed into tidy rows right here (no copy-paste, no leaving the page). It runs against the deployed site's proxy.
A full team rosterโ
team_id 13 is the Lakers. One row per player.
import sdv from 'sportsdataverse';
const roster = await sdv.nba.espnNbaTeamRoster({ team_id: 13, parsed: true });
console.table(roster);
Drill into a game (summary dispatcher)โ
The summary endpoint returns many sub-frames. Pull one with section:
import sdv from 'sportsdataverse';
const sb = await sdv.nba.espnNbaScoreboard({});
const id = sb.events[0].id;
const boxscore = await sdv.nba.espnNbaSummary({
event_id: id,
parsed: true,
section: 'boxscore_team',
});
console.table(boxscore);
Frozen output (real summary sub-frame, no network)โ
The table below is real summary-dispatcher output โ the leaders sub-frame,
rendered at build time from a committed ESPN fixture and frozen into this page
(deterministic; CI reproduces it exactly). Regenerate with npm run docs:examples.
sdv.nba.espnNbaSummary({ event_id, parsed: true, section: 'leaders' }) โ the leaders sub-frame of the 21-section summary dispatcher.
| team_id | team_abbreviation | category_name | category_display_name | athlete_id | athlete_display_name |
|---|---|---|---|---|---|
| 19 | ORL | points | Points | 4432573 | Paolo Banchero |
| 19 | ORL | assists | Assists | 4432573 | Paolo Banchero |
| 19 | ORL | rebounds | Rebounds | 4566434 | Franz Wagner |
| 28 | TOR | points | Points | 4277883 | Jordan Nwora |
| 28 | TOR | assists | Assists | 4395724 | Immanuel Quickley |
| 28 | TOR | rebounds | Rebounds | 4277883 | Jordan Nwora |
6 rows, 12 cols total โ first 6 shown.
WNBA โ same surface, different namespaceโ
import sdv from 'sportsdataverse';
const wnba = await sdv.wnba.espnWnbaScoreboard({ parsed: true });
console.table(wnba);
Full method + parameter tables: NBA reference and WNBA reference.