Skip to main content
Version: 0.2.0

Golf — ESPN core API (v2) — Other

espn_golf_league_root​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga

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
$refString
abbreviationString
colorString
display_nameString
genderString
guidString
idInt64
is_tournamentBoolean
linksString
logosString
nameString
short_nameString
slugString
uidString
athletes_$refString
awards_$refString
calendar_$refString
draft_$refString
events_$refString
franchises_$refString
group_$refString
groups_$refString
leaders_$refString
notes_$refString
rankings_$refString
season_$refString
season_athletes_$refString
season_coaches_$refString
season_display_nameString
season_end_dateString
season_futures_$refString
season_power_index_leaders_$refString
season_power_indexes_$refString
season_rankings_$refString
season_start_dateString
season_type_$refString
season_type_abbreviationString
season_type_corrections_$refString
season_type_end_dateString
season_type_groups_$refString
season_type_has_groupsBoolean
season_type_has_legsBoolean
season_type_has_standingsBoolean
season_type_idInt64
season_type_nameString
season_type_slugString
season_type_start_dateString
season_type_typeInt64
season_type_weeks_$refString
season_type_yearInt64
season_types_$refString
season_types_countInt64
season_types_itemsString
season_types_page_countInt64
season_types_page_indexInt64
season_types_page_sizeInt64
season_yearInt64
seasons_$refString
teams_$refString
transactions_$refString

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_league_root(league='pga')

espn_golf_seasons​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/seasons

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/seasons?limit=200

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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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_seasons(league='pga')

espn_golf_players_index​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/athletes

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/athletes?active=true&limit=100&page=1

API ParameterPythonPatternRequiredNullableDescription
activeactiveYactive query parameter.
limitlimitYMaximum number of items to return.
pagepageYpage query 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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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_players_index(league='pga')

espn_golf_player_core​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/athletes/{athlete_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/athletes/4239

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_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
$refString
activeBoolean
ageInt64
date_of_birthString
debut_yearInt64
display_heightString
display_nameString
display_weightString
first_nameString
full_nameString
guidString
heightFloat64
idInt64
jerseyString
last_nameString
linkedBoolean
linksString
short_nameString
slugString
typeString
uidString
weightFloat64
alternate_ids_sdrString
birth_place_cityString
birth_place_stateString
college_$refString
college_athlete_$refString
contracts_$refString
draft_display_textString
draft_pick_$refString
draft_roundInt64
draft_selectionInt64
draft_team_$refString
draft_yearInt64
experience_yearsInt64
hand_abbreviationString
hand_display_valueString
hand_typeString
headshot_altString
headshot_hrefString
position_$refString
position_abbreviationString
position_display_nameString
position_idInt64
position_leafBoolean
position_nameString
seasons_$refString
statistics_$refString
statisticslog_$refString
status_abbreviationString
status_idInt64
status_nameString
status_typeString
team_$refString

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_player_core(league='pga', athlete_id='4239')

espn_golf_player_statisticslog​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/athletes/{athlete_id}/statisticslog

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/athletes/4239/statisticslog

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_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
statisticsString
season_$refString
countInt64Always null, since the statisticslog payload ships its rows under entries with no page envelope.
page_countInt64Always null, since the statisticslog payload ships its rows under entries with no page envelope.

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_player_statisticslog(league='pga', athlete_id='4239')

espn_golf_player_seasons​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/athletes/{athlete_id}/seasons

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/athletes/4239/seasons

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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_player_seasons(league='pga', athlete_id='4239')

espn_golf_games​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/events

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/events?limit=500

API ParameterPythonPatternRequiredNullableDescription
datesdatesYDate or date range filter (YYYYMMDD or YYYYMMDD-YYYYMMDD).
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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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_games(league='pga')

espn_golf_game​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/events/{event_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/events/401584793

API ParameterPythonPatternRequiredNullableDescription
event_idevent_idYevent_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
$refString
competitionsString
dateString
idInt64
linksString
nameString
short_nameString
time_validBoolean
uidString
venuesString
league_$refString
season_$refString
season_type_$refString

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_game(league='pga', event_id='401584793')

espn_golf_teams_core​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/teams

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/tgl/teams?limit=1000&page=1

API ParameterPythonPatternRequiredNullableDescription
limitlimitYMaximum number of items to return.
pagepageYpage query 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_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_core(league='tgl')

espn_golf_team_core​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/tgl/teams/130349

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
$refString
abbreviationString
alternate_colorString
colorString
display_nameString
guidString
idInt64
is_activeBoolean
is_all_starBoolean
linksString
locationString
logosString
nameString
short_display_nameString
slugString
uidString
against_the_spread_records_$refString
athletes_$refString
awards_$refString
coaches_$refString
depth_charts_$refString
events_$refString
franchise_$refString
groups_$refString
injuries_$refString
notes_$refString
odds_records_$refString
ranks_$refString
record_$refString
transactions_$refString
venue_$refString
venue_address_cityString
venue_address_stateString
venue_full_nameString
venue_grassBoolean
venue_guidString
venue_idInt64
venue_imagesString
venue_indoorBoolean
venue_short_nameString

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_core(league='tgl', team_id='130349')

espn_golf_venues​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/venues

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/venues?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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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_venues(league='pga')

espn_golf_venue​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/venues/{venue_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/venues/3663

API ParameterPythonPatternRequiredNullableDescription
venue_idvenue_idYvenue_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
$refString
full_nameString
grassBoolean
guidString
idInt64
imagesString
indoorBoolean

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_venue(league='pga', venue_id='3663')

espn_golf_tournaments​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/tournaments

Valid URL: https://sports.core.api.espn.com/v2/sports/golf/leagues/pga/tournaments?limit=200

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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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_tournaments(league='pga')