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)

golf — Site API

9 endpoints on sdv.golf. 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).

espnGolfConferences​

GOLF — conferences (ESPN site.api.espn.com).

Endpoint URL: GET https://site.api.espn.com/apis/site/v2/sports/golf/{league}/groups

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
—parsednoboolean — return tidy rows instead of raw JSON

Returns: raw ESPN Dict by default. With { parsed: true } the payload is routed through its parser (parse_groups); the column set varies by league and payload, so no fixed table is published. This endpoint is exposed on 42 leagues (nba, wnba, nbagl, nbl, fiba, olympics_mbk, olympics_wbk, nbasl_lv, nbasl_ut, nbasl_ca, nbasl_sac, nbasl_orl, nbasl_gs, mbb, wbb, cfb, nfl, mlb, nhl, mch, wch, college_baseball, college_softball, ufl, xfl, cfl, soccer, epl, laliga, bundesliga, seriea, ligue1, mls, ligamx, ucl, uel, nwsl, wwc, wc, cricket, lacrosse, golf) — see parse_groups for the shared parser note.

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

Example:

await sdv.golf.espnGolfConferences({ league: 'pga' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_conferences(...)

espnGolfLeaderboard​

GOLF — leaderboard (ESPN site.api.espn.com).

Endpoint URL: GET https://site.api.espn.com/apis/site/v2/sports/golf/leaderboard

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
eventevent_idnonumber | string — ESPN event (tournament) id; omitted, the tour's current or most recent event
—parsednoboolean — return tidy rows instead of raw JSON

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

col_nametypedescription
event_idcharacterESPN event (tournament) id, as a string.
event_namecharacterTournament name (e.g. "Masters Tournament").
event_datecharacterTournament start date, ISO 8601 UTC as ESPN sends it.
event_statuscharacterTournament status name (e.g. "STATUS_FINAL", "STATUS_IN_PROGRESS", "STATUS_SCHEDULED").
player_idcharacterESPN golfer (athlete) id, as a string.
player_namecharacterGolfer's display name.
player_short_namecharacterGolfer's short name (e.g. "R. McIlroy").
countrycharacterCountry the golfer represents, from the flag ESPN shows beside the name.
amateurlogicalTrue for an amateur in the field. Null on the scoreboard, which does not carry it.
sort_orderintegerLeaderboard order (1 = leader). Players tied on score keep distinct values here.
positioncharacterDisplayed position, with a "T" prefix for a tie (e.g. "1", "T3"). Null for a player off the board (missed cut, withdrawn) and on the scoreboard.
position_is_tielogicalTrue when the position is shared. Null for a player off the board and on the scoreboard.
player_statuscharacterPlayer status name (e.g. "STATUS_FINISH", "STATUS_CUT", "STATUS_IN_PROGRESS"). ESPN files a withdrawal and a disqualification under "STATUS_CUT" too; player_status_abbr separates them. Null on the scoreboard.
player_status_abbrcharacterPlayer status as ESPN abbreviates it ("F" finished, "CUT" missed cut, "WD" withdrawn, "DQ" disqualified). Null on the scoreboard.
playofflogicalTrue for a player who was in the event's playoff, False otherwise. Null on the scoreboard.
thruintegerHoles completed in the current round (18 when the round is done), whatever hole the round started on. 18 for a playoff player (playoff holes are not a round). Null on the scoreboard.
to_parintegerTotal score relative to par as an integer ("E" is 0, "-12" is -12); null when no score is posted.
to_par_displaycharacterTotal score relative to par as ESPN displays it (e.g. "-12", "E", "+3").
total_strokesintegerTotal strokes over the rounds played. On the scoreboard it is summed from round_1 to round_4.
round_1integerStrokes in round 1; null when the round was not played. A round in progress holds the strokes so far (see thru); a playoff is never a round.
round_2integerStrokes in round 2; null when the round was not played.
round_3integerStrokes in round 3; null when the round was not played (a missed cut, or not started).
round_4integerStrokes in round 4; null when the round was not played (a missed cut, a 54-hole event, or not started).
round_1_to_parcharacterRound 1 score relative to par as ESPN displays it (e.g. "-5"); null when the round was not played.
round_2_to_parcharacterRound 2 score relative to par as ESPN displays it; null when the round was not played.
round_3_to_parcharacterRound 3 score relative to par as ESPN displays it; null when the round was not played.
round_4_to_parcharacterRound 4 score relative to par as ESPN displays it; null when the round was not played.
earningsnumericPrize money won, in the tour's currency (0.0 for a missed cut). Null on the scoreboard.
cup_pointsnumericSeason-long points earned at the event (FedExCup on the PGA Tour, the Race to the CME Globe on the LPGA). Null on the scoreboard.

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

Example:

await sdv.golf.espnGolfLeaderboard({ league: 'pga' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_leaderboard(...)

espnGolfNews​

GOLF — news (ESPN site.api.espn.com).

Endpoint URL: GET https://site.api.espn.com/apis/site/v2/sports/golf/{league}/news

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
limitlimitnonumber | string — the maximum number of items to return; default 50
—parsednoboolean — return tidy rows instead of raw JSON

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

col_nametypedescription
idintegerESPN numeric identifier for the article.
now_idcharacterESPN 'now' feed id.
content_keycharacterInternal content key.
data_source_identifiercharacterSource-system identifier.
typecharacterArticle type (Story, Media, HeadlineNews, etc.).
headlinecharacterArticle headline.
descriptioncharacterArticle summary/description.
last_modifiedcharacterLast-modified timestamp (ISO 8601).
publishedcharacterPublish timestamp (ISO 8601).
imagescharacterArticle images (list, stringified).
categoriescharacterArticle categories (list, stringified).
premiumlogicalWhether the article is premium/paywalled.
links_web_hrefcharacterWeb article URL.
links_mobile_hrefcharacterMobile article URL.
links_api_self_hrefcharacterESPN API canonical self-link for the article resource.
links_app_sportscenter_hrefcharacterSportsCenter app deep link.
bylinecharacterAuthor byline string as published by ESPN.

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

Example:

await sdv.golf.espnGolfNews({ league: 'pga' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_news(...)

espnGolfScoreboard​

GOLF — scoreboard (ESPN site.api.espn.com).

Endpoint URL: GET https://site.api.espn.com/apis/site/v2/sports/golf/{league}/scoreboard

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
datesdatesnonumber | string — One day (YYYYMMDD) or one calendar year (YYYY). A range (YYYYMMDD-YYYYMMDD) is rejected with HTTP 400; request each day, or use the Core v2 events wrapper
weekweeknonumber | string — the week of the season (football)
seasontypeseason_typenonumber | string — the season type: 1 preseason, 2 regular season, 3 postseason
groupsgroupsnonumber | string — an ESPN group (conference / division) id, e.g. 50 for all of men's college basketball
limitlimitnonumber | string — the maximum number of items to return; default 500
—parsednoboolean — return tidy rows instead of raw JSON

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

col_nametypedescription
event_idcharacterESPN event (tournament) id, as a string.
event_namecharacterTournament name (e.g. "Masters Tournament").
event_datecharacterTournament start date, ISO 8601 UTC as ESPN sends it.
event_statuscharacterTournament status name (e.g. "STATUS_FINAL", "STATUS_IN_PROGRESS", "STATUS_SCHEDULED").
player_idcharacterESPN golfer (athlete) id, as a string.
player_namecharacterGolfer's display name.
player_short_namecharacterGolfer's short name (e.g. "R. McIlroy").
countrycharacterCountry the golfer represents, from the flag ESPN shows beside the name.
amateurlogicalTrue for an amateur in the field. Null on the scoreboard, which does not carry it.
sort_orderintegerLeaderboard order (1 = leader). Players tied on score keep distinct values here.
positioncharacterDisplayed position, with a "T" prefix for a tie (e.g. "1", "T3"). Null for a player off the board (missed cut, withdrawn) and on the scoreboard.
position_is_tielogicalTrue when the position is shared. Null for a player off the board and on the scoreboard.
player_statuscharacterPlayer status name (e.g. "STATUS_FINISH", "STATUS_CUT", "STATUS_IN_PROGRESS"). ESPN files a withdrawal and a disqualification under "STATUS_CUT" too; player_status_abbr separates them. Null on the scoreboard.
player_status_abbrcharacterPlayer status as ESPN abbreviates it ("F" finished, "CUT" missed cut, "WD" withdrawn, "DQ" disqualified). Null on the scoreboard.
playofflogicalTrue for a player who was in the event's playoff, False otherwise. Null on the scoreboard.
thruintegerHoles completed in the current round (18 when the round is done), whatever hole the round started on. 18 for a playoff player (playoff holes are not a round). Null on the scoreboard.
to_parintegerTotal score relative to par as an integer ("E" is 0, "-12" is -12); null when no score is posted.
to_par_displaycharacterTotal score relative to par as ESPN displays it (e.g. "-12", "E", "+3").
total_strokesintegerTotal strokes over the rounds played. On the scoreboard it is summed from round_1 to round_4.
round_1integerStrokes in round 1; null when the round was not played. A round in progress holds the strokes so far (see thru); a playoff is never a round.
round_2integerStrokes in round 2; null when the round was not played.
round_3integerStrokes in round 3; null when the round was not played (a missed cut, or not started).
round_4integerStrokes in round 4; null when the round was not played (a missed cut, a 54-hole event, or not started).
round_1_to_parcharacterRound 1 score relative to par as ESPN displays it (e.g. "-5"); null when the round was not played.
round_2_to_parcharacterRound 2 score relative to par as ESPN displays it; null when the round was not played.
round_3_to_parcharacterRound 3 score relative to par as ESPN displays it; null when the round was not played.
round_4_to_parcharacterRound 4 score relative to par as ESPN displays it; null when the round was not played.
earningsnumericPrize money won, in the tour's currency (0.0 for a missed cut). Null on the scoreboard.
cup_pointsnumericSeason-long points earned at the event (FedExCup on the PGA Tour, the Race to the CME Globe on the LPGA). Null on the scoreboard.

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

Example:

await sdv.golf.espnGolfScoreboard({ league: 'pga' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_scoreboard(...)

espnGolfStandings​

GOLF — standings (ESPN site.api.espn.com (v2)).

Endpoint URL: GET https://site.api.espn.com/apis/v2/sports/golf/{league}/standings

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
seasonseasonnonumber | string — the season year (the year the season ends for winter sports, e.g. 2025 for 2024-25)
groupgroupnonumber | string — an ESPN group (conference / division) id
typestandings_typenonumber | string — the type ESPN query parameter
—parsednoboolean — return tidy rows instead of raw JSON

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

col_nametypedescription
group_namecharacter
group_abbreviationcharacter
team_idcharacterESPN team id
team_namecharacter
team_abbreviationcharacterTeam abbreviation
team_display_namecharacterTeam display name
team_locationcharacter
team_logocharacter
avg_points_againstnumber
avg_points_fornumber
clincherinteger
differentialinteger
division_win_percentnumber
games_behindinteger
league_win_percentnumber
lossesintegerNumber of matches the team has lost.
playoff_seedinteger
point_differentialintegerGoal difference (for minus against).
pointsintegerCompetition points.
points_againstintegerGoals conceded.
points_forintegerGoals (or runs) scored by the team.
streakinteger
win_percentnumber
winsintegerNumber of matches the team has won.
games_aheadinteger
overallcharacterOverall record summary as published by ESPN.
homecharacter
roadcharacter
vs_divcharacter
vs_confcharacter
last_ten_gamescharacter

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

Example:

await sdv.golf.espnGolfStandings({ league: 'pga' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_standings(...)

espnGolfStatisticsLeague​

GOLF — statistics league (ESPN site.api.espn.com).

Endpoint URL: GET https://site.api.espn.com/apis/site/v2/sports/golf/{league}/statistics

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
—parsednoboolean — return tidy rows instead of raw JSON

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

col_nametypedescription
$refcharacterCore v2 $ref URL to the resource

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

Example:

await sdv.golf.espnGolfStatisticsLeague({ league: 'pga' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_statistics_league(...)

espnGolfTeam​

GOLF — team (ESPN site.api.espn.com).

Endpoint URL: GET https://site.api.espn.com/apis/site/v2/sports/golf/{league}/teams/{team_id}

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
{team_id}team_idyesnumber | string — the ESPN team id (see espn_<league>_teams)
—parsednoboolean — return tidy rows instead of raw JSON

Returns: raw ESPN Dict by default. With { parsed: true } the payload is routed through its parser (parse_single_entity); the column set varies by league and payload, so no fixed table is published. This endpoint is exposed on 42 leagues (nba, wnba, nbagl, nbl, fiba, olympics_mbk, olympics_wbk, nbasl_lv, nbasl_ut, nbasl_ca, nbasl_sac, nbasl_orl, nbasl_gs, mbb, wbb, cfb, nfl, mlb, nhl, mch, wch, college_baseball, college_softball, ufl, xfl, cfl, soccer, epl, laliga, bundesliga, seriea, ligue1, mls, ligamx, ucl, uel, nwsl, wwc, wc, cricket, lacrosse, golf) — see parse_single_entity for the shared parser note.

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

Example:

await sdv.golf.espnGolfTeam({ team_id: '…' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_team(...)

espnGolfTeamSchedule​

GOLF — team schedule (ESPN site.api.espn.com).

Endpoint URL: GET https://site.api.espn.com/apis/site/v2/sports/golf/{league}/teams/{team_id}/schedule

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
{team_id}team_idyesnumber | string — the ESPN team id (see espn_<league>_teams)
seasonseasonnonumber | string — the season year (the year the season ends for winter sports, e.g. 2025 for 2024-25)
—parsednoboolean — return tidy rows instead of raw JSON

Returns: raw ESPN Dict by default. With { parsed: true } the payload is routed through its parser (parse_team_schedule); the column set varies by league and payload, so no fixed table is published. This endpoint is exposed on 42 leagues (nba, wnba, nbagl, nbl, fiba, olympics_mbk, olympics_wbk, nbasl_lv, nbasl_ut, nbasl_ca, nbasl_sac, nbasl_orl, nbasl_gs, mbb, wbb, cfb, nfl, mlb, nhl, mch, wch, college_baseball, college_softball, ufl, xfl, cfl, soccer, epl, laliga, bundesliga, seriea, ligue1, mls, ligamx, ucl, uel, nwsl, wwc, wc, cricket, lacrosse, golf) — see parse_team_schedule for the shared parser note.

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

Example:

await sdv.golf.espnGolfTeamSchedule({ team_id: '…' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_team_schedule(...)

espnGolfTeamsSite​

GOLF — teams site (ESPN site.api.espn.com).

Endpoint URL: GET https://site.api.espn.com/apis/site/v2/sports/golf/{league}/teams

API paramJSrequireddescription
leagueleaguenoESPN league slug override (default pga)
limitlimitnonumber | string — the maximum number of items to return; default 1000
—parsednoboolean — return tidy rows instead of raw JSON

Returns: raw ESPN Dict by default. With { parsed: true } the payload is routed through its parser (parse_teams); the column set varies by league and payload, so no fixed table is published. This endpoint is exposed on 42 leagues (nba, wnba, nbagl, nbl, fiba, olympics_mbk, olympics_wbk, nbasl_lv, nbasl_ut, nbasl_ca, nbasl_sac, nbasl_orl, nbasl_gs, mbb, wbb, cfb, nfl, mlb, nhl, mch, wch, college_baseball, college_softball, ufl, xfl, cfl, soccer, epl, laliga, bundesliga, seriea, ligue1, mls, ligamx, ucl, uel, nwsl, wwc, wc, cricket, lacrosse, golf) — see parse_teams for the shared parser note.

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

Example:

await sdv.golf.espnGolfTeamsSite({ league: 'pga' });
// snake_case alias (py/R parity): sdv.golf.espn_golf_teams_site(...)

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