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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
$ref | String | |
abbreviation | String | |
color | String | |
display_name | String | |
gender | String | |
guid | String | |
id | Int64 | |
is_tournament | Boolean | |
links | String | |
logos | String | |
name | String | |
short_name | String | |
slug | String | |
uid | String | |
athletes_$ref | String | |
awards_$ref | String | |
calendar_$ref | String | |
draft_$ref | String | |
events_$ref | String | |
franchises_$ref | String | |
group_$ref | String | |
groups_$ref | String | |
leaders_$ref | String | |
notes_$ref | String | |
rankings_$ref | String | |
season_$ref | String | |
season_athletes_$ref | String | |
season_coaches_$ref | String | |
season_display_name | String | |
season_end_date | String | |
season_futures_$ref | String | |
season_power_index_leaders_$ref | String | |
season_power_indexes_$ref | String | |
season_rankings_$ref | String | |
season_start_date | String | |
season_type_$ref | String | |
season_type_abbreviation | String | |
season_type_corrections_$ref | String | |
season_type_end_date | String | |
season_type_groups_$ref | String | |
season_type_has_groups | Boolean | |
season_type_has_legs | Boolean | |
season_type_has_standings | Boolean | |
season_type_id | Int64 | |
season_type_name | String | |
season_type_slug | String | |
season_type_start_date | String | |
season_type_type | Int64 | |
season_type_weeks_$ref | String | |
season_type_year | Int64 | |
season_types_$ref | String | |
season_types_count | Int64 | |
season_types_items | String | |
season_types_page_count | Int64 | |
season_types_page_index | Int64 | |
season_types_page_size | Int64 | |
season_year | Int64 | |
seasons_$ref | String | |
teams_$ref | String | |
transactions_$ref | String |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
limit | limit | Y | Maximum 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_name | type | description |
|---|---|---|
$ref | String | |
count | Int64 | Total 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_count | Int64 | Pages 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
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
active | active | Y | active query parameter. | ||
limit | limit | Y | Maximum number of items to return. | ||
page | page | Y | page 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_name | type | description |
|---|---|---|
$ref | String | |
count | Int64 | Total 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_count | Int64 | Pages 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
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
athlete_id | athlete_id | Y | athlete_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_name | type | description |
|---|---|---|
$ref | String | |
active | Boolean | |
age | Int64 | |
date_of_birth | String | |
debut_year | Int64 | |
display_height | String | |
display_name | String | |
display_weight | String | |
first_name | String | |
full_name | String | |
guid | String | |
height | Float64 | |
id | Int64 | |
jersey | String | |
last_name | String | |
linked | Boolean | |
links | String | |
short_name | String | |
slug | String | |
type | String | |
uid | String | |
weight | Float64 | |
alternate_ids_sdr | String | |
birth_place_city | String | |
birth_place_state | String | |
college_$ref | String | |
college_athlete_$ref | String | |
contracts_$ref | String | |
draft_display_text | String | |
draft_pick_$ref | String | |
draft_round | Int64 | |
draft_selection | Int64 | |
draft_team_$ref | String | |
draft_year | Int64 | |
experience_years | Int64 | |
hand_abbreviation | String | |
hand_display_value | String | |
hand_type | String | |
headshot_alt | String | |
headshot_href | String | |
position_$ref | String | |
position_abbreviation | String | |
position_display_name | String | |
position_id | Int64 | |
position_leaf | Boolean | |
position_name | String | |
seasons_$ref | String | |
statistics_$ref | String | |
statisticslog_$ref | String | |
status_abbreviation | String | |
status_id | Int64 | |
status_name | String | |
status_type | String | |
team_$ref | String |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
athlete_id | athlete_id | Y | athlete_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_name | type | description |
|---|---|---|
statistics | String | |
season_$ref | String | |
count | Int64 | Always null, since the statisticslog payload ships its rows under entries with no page envelope. |
page_count | Int64 | Always null, since the statisticslog payload ships its rows under entries with no page envelope. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
athlete_id | athlete_id | Y | athlete_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_name | type | description |
|---|---|---|
$ref | String | |
count | Int64 | Total 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_count | Int64 | Pages 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
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
dates | dates | Y | Date or date range filter (YYYYMMDD or YYYYMMDD-YYYYMMDD). | ||
limit | limit | Y | Maximum 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_name | type | description |
|---|---|---|
$ref | String | |
count | Int64 | Total 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_count | Int64 | Pages 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
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
event_id | event_id | Y | event_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_name | type | description |
|---|---|---|
$ref | String | |
competitions | String | |
date | String | |
id | Int64 | |
links | String | |
name | String | |
short_name | String | |
time_valid | Boolean | |
uid | String | |
venues | String | |
league_$ref | String | |
season_$ref | String | |
season_type_$ref | String |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
limit | limit | Y | Maximum number of items to return. | ||
page | page | Y | page 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_name | type | description |
|---|---|---|
team_abbreviation | String | Short team abbreviation (e.g. "BOS"). |
team_alternate_color | String | Secondary team color as a hex string (no leading '#'). |
team_color | String | Primary team color as a hex string (no leading '#'). |
team_display_name | String | Full team display name (location + nickname). |
team_id | Int64 | ESPN team id (stable join key across ESPN endpoints). |
team_is_active | Boolean | Whether the team is currently active. |
team_is_all_star | Boolean | Whether the entry is an all-star squad rather than a franchise. |
team_location | String | Team location / city (e.g. "Boston"). |
team_logos | String | Pipe-delimited logo image URLs. |
team_name | String | Team nickname/mascot (e.g. "Celtics"). |
team_nickname | String | Team nickname as ESPN labels it (often equals team_name). |
team_short_display_name | String | Abbreviated display name for compact UIs. |
team_slug | String | URL slug used in ESPN web paths. |
team_uid | String | ESPN global UID (encodes sport/league/team). |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
team_id | team_id | Y | team_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_name | type | description |
|---|---|---|
$ref | String | |
abbreviation | String | |
alternate_color | String | |
color | String | |
display_name | String | |
guid | String | |
id | Int64 | |
is_active | Boolean | |
is_all_star | Boolean | |
links | String | |
location | String | |
logos | String | |
name | String | |
short_display_name | String | |
slug | String | |
uid | String | |
against_the_spread_records_$ref | String | |
athletes_$ref | String | |
awards_$ref | String | |
coaches_$ref | String | |
depth_charts_$ref | String | |
events_$ref | String | |
franchise_$ref | String | |
groups_$ref | String | |
injuries_$ref | String | |
notes_$ref | String | |
odds_records_$ref | String | |
ranks_$ref | String | |
record_$ref | String | |
transactions_$ref | String | |
venue_$ref | String | |
venue_address_city | String | |
venue_address_state | String | |
venue_full_name | String | |
venue_grass | Boolean | |
venue_guid | String | |
venue_id | Int64 | |
venue_images | String | |
venue_indoor | Boolean | |
venue_short_name | String |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
limit | limit | Y | Maximum 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_name | type | description |
|---|---|---|
$ref | String | |
count | Int64 | Total 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_count | Int64 | Pages 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
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
venue_id | venue_id | Y | venue_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_name | type | description |
|---|---|---|
$ref | String | |
full_name | String | |
grass | Boolean | |
guid | String | |
id | Int64 | |
images | String | |
indoor | Boolean |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
limit | limit | Y | Maximum 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_name | type | description |
|---|---|---|
$ref | String | |
count | Int64 | Total 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_count | Int64 | Pages 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
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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')