Skip to main content

Golf — ESPN site API (v2)

sportsdataverse.golf — 4 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_WD", "STATUS_IN_PROGRESS"). Null on the scoreboard.
thruInt64Hole the player last completed in the current round (18 when the round is done). 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_WD", "STATUS_IN_PROGRESS"). Null on the scoreboard.
thruInt64Hole the player last completed in the current round (18 when the round is done). 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_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')