Skip to main content
Version: 0.2.0

Golf — ESPN site API (v2)

sportsdataverse.golf — 9 endpoints.

espn_golf_scoreboard​

ESPN endpoint.

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

Valid URL: https://site.api.espn.com/apis/site/v2/sports/golf/pga/scoreboard?dates=20240115&limit=500

API ParameterPythonPatternRequiredNullableDescription
datesdatesYOne 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.
weekweekYWeek number within the season.
seasontypeseason_typeYSeason phase: 1=preseason, 2=regular season, 3=postseason.
groupsgroupsYConference or group id filter (e.g. an ESPN conference id).
limitlimitYMaximum number of items to return.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
event_idStringESPN event id for the match.
event_nameStringTournament name (e.g. "Masters Tournament").
event_dateStringTournament start date, ISO 8601 UTC as ESPN sends it.
event_statusStringTournament status name (e.g. "STATUS_FINAL", "STATUS_IN_PROGRESS", "STATUS_SCHEDULED").
player_idStringESPN golfer (athlete) id, as a string.
player_nameStringGolfer's display name.
player_short_nameStringGolfer's short name (e.g. "R. McIlroy").
countryStringCountry the golfer represents, from the flag ESPN shows beside the name.
amateurBooleanTrue for an amateur in the field. Null on the scoreboard, which does not carry it.
sort_orderInt64Leaderboard order (1 = leader). Players tied on score keep distinct values here.
positionStringDisplayed 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_tieBooleanTrue when the position is shared. Null for a player off the board and on the scoreboard.
player_statusStringPlayer 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_abbrStringPlayer status as ESPN abbreviates it ("F" finished, "CUT" missed cut, "WD" withdrawn, "DQ" disqualified). Null on the scoreboard.
playoffBooleanTrue for a player who was in the event's playoff, False otherwise. Null on the scoreboard.
thruInt64Holes 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_parInt64Total score relative to par as an integer ("E" is 0, "-12" is -12); null when no score is posted.
to_par_displayStringTotal score relative to par as ESPN displays it (e.g. "-12", "E", "+3").
total_strokesInt64Total strokes over the rounds played. On the scoreboard it is summed from round_1 to round_4.
round_1Int64Strokes 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_2Int64Strokes in round 2; null when the round was not played.
round_3Int64Strokes in round 3; null when the round was not played (a missed cut, or not started).
round_4Int64Strokes in round 4; null when the round was not played (a missed cut, a 54-hole event, or not started).
round_1_to_parStringRound 1 score relative to par as ESPN displays it (e.g. "-5"); null when the round was not played.
round_2_to_parStringRound 2 score relative to par as ESPN displays it; null when the round was not played.
round_3_to_parStringRound 3 score relative to par as ESPN displays it; null when the round was not played.
round_4_to_parStringRound 4 score relative to par as ESPN displays it; null when the round was not played.
earningsFloat64Prize money won, in the tour's currency (0.0 for a missed cut). Null on the scoreboard.
cup_pointsFloat64Season-long points earned at the event (FedExCup on the PGA Tour, the Race to the CME Globe on the LPGA). Null on the scoreboard.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_scoreboard(league='pga', dates='20240115')

espn_golf_leaderboard​

Tournament leaderboard: the full field of one golf event (the current one when event_id is omitted), one row per player.

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

Valid URL: https://site.api.espn.com/apis/site/v2/sports/golf/leaderboard?league=pga&event=401811941

API ParameterPythonPatternRequiredNullableDescription
eventevent_idYESPN event (tournament) id; omitted, the tour's current or most recent event.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
event_idStringESPN event (tournament) id, as a string.
event_nameStringTournament name (e.g. "Masters Tournament").
event_dateStringTournament start date, ISO 8601 UTC as ESPN sends it.
event_statusStringTournament status name (e.g. "STATUS_FINAL", "STATUS_IN_PROGRESS", "STATUS_SCHEDULED").
player_idStringESPN golfer (athlete) id, as a string.
player_nameStringGolfer's display name.
player_short_nameStringGolfer's short name (e.g. "R. McIlroy").
countryStringCountry the golfer represents, from the flag ESPN shows beside the name.
amateurBooleanTrue for an amateur in the field. Null on the scoreboard, which does not carry it.
sort_orderInt64Leaderboard order (1 = leader). Players tied on score keep distinct values here.
positionStringDisplayed 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_tieBooleanTrue when the position is shared. Null for a player off the board and on the scoreboard.
player_statusStringPlayer 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_abbrStringPlayer status as ESPN abbreviates it ("F" finished, "CUT" missed cut, "WD" withdrawn, "DQ" disqualified). Null on the scoreboard.
playoffBooleanTrue for a player who was in the event's playoff, False otherwise. Null on the scoreboard.
thruInt64Holes 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_parInt64Total score relative to par as an integer ("E" is 0, "-12" is -12); null when no score is posted.
to_par_displayStringTotal score relative to par as ESPN displays it (e.g. "-12", "E", "+3").
total_strokesInt64Total strokes over the rounds played. On the scoreboard it is summed from round_1 to round_4.
round_1Int64Strokes 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_2Int64Strokes in round 2; null when the round was not played.
round_3Int64Strokes in round 3; null when the round was not played (a missed cut, or not started).
round_4Int64Strokes in round 4; null when the round was not played (a missed cut, a 54-hole event, or not started).
round_1_to_parStringRound 1 score relative to par as ESPN displays it (e.g. "-5"); null when the round was not played.
round_2_to_parStringRound 2 score relative to par as ESPN displays it; null when the round was not played.
round_3_to_parStringRound 3 score relative to par as ESPN displays it; null when the round was not played.
round_4_to_parStringRound 4 score relative to par as ESPN displays it; null when the round was not played.
earningsFloat64Prize money won, in the tour's currency (0.0 for a missed cut). Null on the scoreboard.
cup_pointsFloat64Season-long points earned at the event (FedExCup on the PGA Tour, the Race to the CME Globe on the LPGA). Null on the scoreboard.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_leaderboard(league='pga', event_id='401811941')

espn_golf_news​

ESPN endpoint.

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

Valid URL: https://site.api.espn.com/apis/site/v2/sports/golf/pga/news?limit=50

API ParameterPythonPatternRequiredNullableDescription
limitlimitYMaximum number of items to return.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
idInt64ESPN numeric identifier for the article.
now_idStringESPN 'now' feed id.
content_keyStringInternal content key.
data_source_identifierStringSource-system identifier.
typeStringArticle type (Story, Media, HeadlineNews, etc.).
headlineStringArticle headline.
descriptionStringArticle summary/description.
last_modifiedStringLast-modified timestamp (ISO 8601).
publishedStringPublish timestamp (ISO 8601).
imagesStringArticle images (list, stringified).
categoriesStringArticle categories (list, stringified).
premiumBooleanWhether the article is premium/paywalled.
bylineStringAuthor byline string as published by ESPN.
links_web_hrefStringWeb article URL.
links_mobile_hrefStringMobile article URL.
links_api_self_hrefStringESPN API canonical self-link for the article resource.
links_app_sportscenter_hrefStringSportsCenter app deep link.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_news(league='pga')

espn_golf_conferences​

ESPN endpoint.

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

Valid URL: https://site.api.espn.com/apis/site/v2/sports/golf/tgl/groups

API ParameterPythonPatternRequiredNullableDescription

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
group_idInt64
nameString
abbreviationString
short_nameString
is_conferenceBoolean
parent_group_idInt64
depthInt64
children_countInt64

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_conferences(league='tgl')

espn_golf_statistics_league​

ESPN endpoint.

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

Valid URL: https://site.api.espn.com/apis/site/v2/sports/golf/pga/statistics

API ParameterPythonPatternRequiredNullableDescription

Returns​

return_parsed=True (default) — the output of parse_items; pass return_as_pandas=True for a pandas.DataFrame.

No returns table is published for this endpoint: parser: parse_items returns no columns on the live payload (nba, nfl, mlb, nhl, wnba, cfb, mbb, wbb, 2026-10-07); its rows sit under keys it does not read (top level: league, season, status, timestamp).

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_statistics_league(league='pga')

espn_golf_teams_site​

ESPN endpoint.

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

Valid URL: https://site.api.espn.com/apis/site/v2/sports/golf/tgl/teams?limit=1000

API ParameterPythonPatternRequiredNullableDescription
limitlimitYMaximum number of items to return.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
team_abbreviationStringShort team abbreviation (e.g. "BOS").
team_alternate_colorStringSecondary team color as a hex string (no leading '#').
team_colorStringPrimary team color as a hex string (no leading '#').
team_display_nameStringFull team display name (location + nickname).
team_idInt64ESPN team id (stable join key across ESPN endpoints).
team_is_activeBooleanWhether the team is currently active.
team_is_all_starBooleanWhether the entry is an all-star squad rather than a franchise.
team_locationStringTeam location / city (e.g. "Boston").
team_logosStringPipe-delimited logo image URLs.
team_nameStringTeam nickname/mascot (e.g. "Celtics").
team_nicknameStringTeam nickname as ESPN labels it (often equals team_name).
team_short_display_nameStringAbbreviated display name for compact UIs.
team_slugStringURL slug used in ESPN web paths.
team_uidStringESPN global UID (encodes sport/league/team).

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_teams_site(league='tgl')

espn_golf_team​

ESPN endpoint.

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

Valid URL: https://site.api.espn.com/apis/site/v2/sports/golf/pga/teams/4

API ParameterPythonPatternRequiredNullableDescription
team_idteam_idYteam_id path parameter.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
team_abbreviationString
team_alternate_colorString
team_colorString
team_display_nameString
team_franchise_$refString
team_franchise_abbreviationString
team_franchise_colorString
team_franchise_display_nameString
team_franchise_idInt64
team_franchise_is_activeBoolean
team_franchise_locationString
team_franchise_nameString
team_franchise_short_display_nameString
team_franchise_slugString
team_franchise_team_$refString
team_franchise_uidString
team_franchise_venue_$refString
team_franchise_venue_address_cityString
team_franchise_venue_address_stateString
team_franchise_venue_full_nameString
team_franchise_venue_grassBoolean
team_franchise_venue_guidString
team_franchise_venue_idInt64
team_franchise_venue_imagesString
team_franchise_venue_indoorBoolean
team_franchise_venue_short_nameString
team_groups_idInt64
team_groups_is_conferenceBoolean
team_groups_parent_idInt64
team_idInt64
team_is_activeBoolean
team_linksString
team_locationString
team_logosString
team_nameString
team_next_eventString
team_record_itemsString
team_short_display_nameString
team_slugString
team_standing_summaryString
team_uidString

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_team(league='pga', team_id='4')

espn_golf_team_schedule​

ESPN endpoint.

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

Valid URL: https://site.api.espn.com/apis/site/v2/sports/golf/tgl/teams/130349/schedule

API ParameterPythonPatternRequiredNullableDescription
team_idteam_idYteam_id path parameter.
seasonseasonYSeason year (e.g. 2024).

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
idInt64ESPN numeric event identifier.
dateStringEvent timestamp (ISO 8601, UTC).
nameStringFull event name (e.g. 'Team A at Team B').
short_nameStringAbbreviated event name (e.g. 'TA @ TB').
time_validBooleanWhether the event time is confirmed.
competitionsStringCompetition detail (list of dicts, stringified): competitors, venue, status.
linksStringRelated links (list, stringified).
season_yearInt64Four-digit season year.
season_display_nameStringHuman-readable season label (e.g. '2024-25').
season_type_idInt64ESPN numeric identifier for the season type.
season_type_typeInt64Season type numeric code.
season_type_nameStringSeason type name (e.g. Regular Season).
season_type_abbreviationStringSeason type abbreviation.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_team_schedule(league='tgl', team_id='130349')

espn_golf_standings​

ESPN endpoint.

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

Valid URL: https://site.api.espn.com/apis/v2/sports/golf/tgl/standings

API ParameterPythonPatternRequiredNullableDescription
seasonseasonYSeason year (e.g. 2024).
groupgroupYConference or group id filter (e.g. an ESPN conference id).
typestandings_typeYStandings variant (e.g. 'by-division' or 'by-conference').

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
group_nameStringGroup name.
group_abbreviationStringGroup abbreviation.
team_idInt64Team id.
team_nameStringTeam name.
team_abbreviationStringTeam abbreviation.
team_display_nameStringTeam display name.
team_locationStringTeam location.
team_logoStringTeam logo.
avg_points_againstFloat64Avg points against.
avg_points_forFloat64Avg points for.
clincherFloat64Clincher.
differentialFloat64Differential.
division_win_percentFloat64Division win percent.
games_behindFloat64Games behind.
league_win_percentFloat64League win percent.
lossesFloat64Losses.
playoff_seedFloat64Playoff seed.
point_differentialFloat64Point differential.
pointsFloat64Points.
points_againstFloat64Points against.
points_forFloat64Points for.
streakFloat64Streak.
win_percentFloat64Win percent.
winsFloat64Wins.
games_aheadFloat64Games ahead.
overallStringOverall.
homeStringHome.
roadStringRoad.
vs. div.StringVs. div..
vs. conf.StringVs. conf..
last ten gamesStringLast ten games.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_golf_standings(league='tgl')