Skip to main content
Breaking in 4.0.0
  • Public names are sportsdataverse-py's — athlete → player, event → game on every ESPN league; sdv-py's name_pattern on the native families (nhlApiWeb* → nhl*, nflApi* → nfl*, CBS's 16 shorts, the 3.0.0 file-stem names). Every pre-v4 name still works as a deprecated alias that warns once. (changelog)
  • Integer id columns are decimal strings — Every id column of integers (id, *_id, game_pk, playerId, …) comes back as exact decimal strings on every surface — parsers, producers, loaders, HockeyTech analytics. Compare and join ids as strings; Number(row.game_id) for a safe number back. (changelog)
  • 400 / 422 raise InvalidParameterError — For every family (it was AssetFetchError), never retried; the message names host, path and status with a redacted excerpt of the body. (changelog)
  • Typed returns — generated row types for parsed: true — TypeScript only. A wrapper's raw payload resolves to unknown (was any); verified endpoints resolve to their row interfaces; the summary dispatchers to ParsedTables. Narrow or cast a raw payload. (changelog)
  • Typed wrapper params and loader rows; strict mode — TypeScript only. A param the endpoint does not have, a missing required path param or a non-boolean bool param is a type error; parser rows are Record<string, unknown>; loader rows are their generated row types. (changelog)
  • Wrapper failures raise NoDataError / AssetFetchError — Instead of raw axios errors. NoDataError = the fetch worked and there is nothing there (404, ESPN { code: 404 }); AssetFetchError = the fetch failed (403 / 429 / 5xx after retries, network). Retries follow DEFAULT_RETRY_STATUSES with backoff. (changelog)

mbb — CDN (espn.com page data)

4 endpoints on sdv.mbb. Each is exposed under a camelCase canonical name and a snake_case alias (py/R parity), accepts snake_case or camelCase params, and returns raw ESPN JSON by default ({ parsed: true } for tidy rows).

espnMbbCdnBoxscore​

MBB — cdn boxscore (ESPN cdn.espn.com (espn.com page data)).

Endpoint URL: GET https://cdn.espn.com/core/mens-college-basketball/boxscore?xhr=1

API paramJSrequireddescription
gameIdgame_idnonumber | string — ESPN game (event) id
—parsednoboolean — return tidy rows instead of raw JSON
—sectionnowith parsed, return one named sub-frame (e.g. boxscore, plays, winprobability) instead of all

Returns: raw ESPN Dict by default. With { parsed: true } the page's gamepackageJSON (a Site v2 summary) goes through the summary dispatcher, which returns an object of 21 sub-frames keyed by section ({ parsed: true, section: '<name>' } for one); see ESPN parsed returns.

Rows are untyped Row[] (not parity-verified yet).

Example:

await sdv.mbb.espnMbbCdnBoxscore({});
// snake_case alias (py/R parity): sdv.mbb.espn_mbb_cdn_boxscore(...)

espnMbbCdnPlaybyplay​

MBB — cdn playbyplay (ESPN cdn.espn.com (espn.com page data)).

Endpoint URL: GET https://cdn.espn.com/core/mens-college-basketball/playbyplay?xhr=1

API paramJSrequireddescription
gameIdgame_idnonumber | string — ESPN game (event) id
—parsednoboolean — return tidy rows instead of raw JSON
—sectionnowith parsed, return one named sub-frame (e.g. boxscore, plays, winprobability) instead of all

Returns: raw ESPN Dict by default. With { parsed: true } the page's gamepackageJSON (a Site v2 summary) goes through the summary dispatcher, which returns an object of 21 sub-frames keyed by section ({ parsed: true, section: '<name>' } for one); see ESPN parsed returns.

Rows are untyped Row[] (not parity-verified yet).

Example:

await sdv.mbb.espnMbbCdnPlaybyplay({});
// snake_case alias (py/R parity): sdv.mbb.espn_mbb_cdn_playbyplay(...)

espnMbbCdnSchedule​

MBB — cdn schedule (ESPN cdn.espn.com (espn.com page data)).

Endpoint URL: GET https://cdn.espn.com/core/mens-college-basketball/schedule?xhr=1

API paramJSrequireddescription
datedatenonumber | string — Single date (YYYYMMDD). Ignored by cfb and nfl, which are week-oriented. Defaults to today
weekweeknonumber | string — Week number (cfb and nfl)
yearseasonnonumber | string — Season year that week belongs to (cfb and nfl)
seasontypeseason_typenonumber | string — Season phase for week: 1=preseason, 2=regular season, 3=postseason (cfb and nfl)
—parsednoboolean — return tidy rows instead of raw JSON

Returns (with { parsed: true }, via parse_cdn_schedule):

col_nametypedescription
game_idcharacterUnique game identifier.
uidcharacterESPN UID string.
datecharacterMatch start timestamp (ISO 8601, UTC).
namecharacterFull event name (e.g. 'Team A at Team B').
short_namecharacterAbbreviated event name (e.g. 'TA @ TB').
season_yearintegerInteger season year ESPN assigns the event (e.g. 2025 for the 2025-26 season).
season_typeintegerESPN season-type id of the event's season: 1 preseason, 2 regular season, 3 postseason, 4 offseason for the US leagues; soccer competitions carry their own competition-specific ids (e.g. 13481).
season_slugcharacterSeason slug.
status_type_idcharacterUnique identifier for status type.
status_type_namecharacterStatus type name.
status_type_statecharacterStatus type state.
status_type_completedlogicalStatus type completed.
status_type_descriptioncharacterStatus type description.
status_type_detailcharacterStatus type detail.
status_type_short_detailcharacterStatus type short detail.
status_clockintegerGame clock in seconds as ESPN reports it: time remaining in the period for clock sports, elapsed seconds for soccer (e.g. 5400.0 at full time); 0.0 once a game has ended.
status_display_clockcharacterStatus display clock.
status_periodintegerCurrent or final period number (quarter, half, inning or period, depending on the sport).
neutral_sitelogicalWhether the match is played at a neutral venue.
conference_competitionlogicalConference competition.
attendanceintegerReported attendance.
venue_idcharacterUnique venue identifier.
venue_full_namecharacterVenue full name.
venue_citycharacterVenue city.
venue_statecharacterVenue state / region.
venue_indoorlogicalTRUE if the venue is indoors.
broadcastcharacterBroadcast information string.
notecharacterEvent note text from the competition (e.g. a series or game label such as 'World Series - Game 1', or a shootout result); an empty string when there is none.
home_idcharacterUnique identifier for home.
home_namecharacterHome name.
home_abbreviationcharacterHome team's abbreviation.
home_display_namecharacterHome display name.
home_locationcharacterHome team's location.
home_colorcharacterColor code (hex) for home.
home_alternate_colorcharacterColor code (hex) for home alternate.
home_logocharacterHome team logo URL.
home_scorecharacterHome team's score. For cricket, the innings string (e.g. '161/5 (18/20 ov, target 156)').
home_winnerlogicalHome team's winner.
home_rankcharacter
away_idcharacterUnique identifier for away.
away_namecharacterAway name.
away_abbreviationcharacterAway team's abbreviation.
away_display_namecharacterAway display name.
away_locationcharacterAway team's location.
away_colorcharacterColor code (hex) for away.
away_alternate_colorcharacterColor code (hex) for away alternate.
away_logocharacterAway team logo URL.
away_scorecharacterAway team's score. For cricket, the innings string.
away_winnerlogicalAway team's winner.
away_rankcharacter

Rows are untyped Row[] (not parity-verified yet).

Example:

await sdv.mbb.espnMbbCdnSchedule({});
// snake_case alias (py/R parity): sdv.mbb.espn_mbb_cdn_schedule(...)

espnMbbCdnScoreboard​

MBB — cdn scoreboard (ESPN cdn.espn.com (espn.com page data)).

Endpoint URL: GET https://cdn.espn.com/core/mens-college-basketball/scoreboard?xhr=1

API paramJSrequireddescription
datedatenonumber | string — Single date (YYYYMMDD). Ignored by cfb and nfl, which are week-oriented. Defaults to today
weekweeknonumber | string — Week number (cfb and nfl)
yearseasonnonumber | string — Season year that week belongs to (cfb and nfl)
seasontypeseason_typenonumber | string — Season phase for week: 1=preseason, 2=regular season, 3=postseason (cfb and nfl)
—parsednoboolean — return tidy rows instead of raw JSON

Returns (with { parsed: true }, via parse_cdn_scoreboard):

col_nametypedescription
game_idcharacterUnique game identifier.
uidcharacterESPN UID string.
datecharacterMatch start timestamp (ISO 8601, UTC).
namecharacterFull event name (e.g. 'Team A at Team B').
short_namecharacterAbbreviated event name (e.g. 'TA @ TB').
season_yearintegerInteger season year ESPN assigns the event (e.g. 2025 for the 2025-26 season).
season_typeintegerESPN season-type id of the event's season: 1 preseason, 2 regular season, 3 postseason, 4 offseason for the US leagues; soccer competitions carry their own competition-specific ids (e.g. 13481).
season_slugcharacterSeason slug.
status_type_idcharacterUnique identifier for status type.
status_type_namecharacterStatus type name.
status_type_statecharacterStatus type state.
status_type_completedlogicalStatus type completed.
status_type_descriptioncharacterStatus type description.
status_type_detailcharacterStatus type detail.
status_type_short_detailcharacterStatus type short detail.
status_clockintegerGame clock in seconds as ESPN reports it: time remaining in the period for clock sports, elapsed seconds for soccer (e.g. 5400.0 at full time); 0.0 once a game has ended.
status_display_clockcharacterStatus display clock.
status_periodintegerCurrent or final period number (quarter, half, inning or period, depending on the sport).
neutral_sitelogicalWhether the match is played at a neutral venue.
conference_competitionlogicalConference competition.
attendanceintegerReported attendance.
venue_idcharacterUnique venue identifier.
venue_full_namecharacterVenue full name.
venue_citycharacterVenue city.
venue_statecharacterVenue state / region.
venue_indoorlogicalTRUE if the venue is indoors.
broadcastcharacterBroadcast information string.
notecharacterEvent note text from the competition (e.g. a series or game label such as 'World Series - Game 1', or a shootout result); an empty string when there is none.
home_idcharacterUnique identifier for home.
home_namecharacterHome name.
home_abbreviationcharacterHome team's abbreviation.
home_display_namecharacterHome display name.
home_locationcharacterHome team's location.
home_colorcharacterColor code (hex) for home.
home_alternate_colorcharacterColor code (hex) for home alternate.
home_logocharacterHome team logo URL.
home_scorecharacterHome team's score. For cricket, the innings string (e.g. '161/5 (18/20 ov, target 156)').
home_winnerlogicalHome team's winner.
home_rankcharacter
away_idcharacterUnique identifier for away.
away_namecharacterAway name.
away_abbreviationcharacterAway team's abbreviation.
away_display_namecharacterAway display name.
away_locationcharacterAway team's location.
away_colorcharacterColor code (hex) for away.
away_alternate_colorcharacterColor code (hex) for away alternate.
away_logocharacterAway team logo URL.
away_scorecharacterAway team's score. For cricket, the innings string.
away_winnerlogicalAway team's winner.
away_rankcharacter

Rows are untyped Row[] (not parity-verified yet).

Example:

await sdv.mbb.espnMbbCdnScoreboard({});
// snake_case alias (py/R parity): sdv.mbb.espn_mbb_cdn_scoreboard(...)

Generated by tools/codegen/generate.mjs from tools/codegen/endpoints/espn*.yaml (vendored from sdv-py) — see How this library is built._