Skip to main content

MLB — ESPN core API (v2) — Other

espn_mlb_league_root​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb

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
abbreviationStringShort abbreviation.
colorStringPrimary color (hex, no leading '#').
display_nameStringDisplay name.
genderStringPlayer gender.
guidStringStable cross-league team GUID.
idInt64Id.
is_tournamentBoolean
linksString
logosStringLogos.
nameStringDisplay name.
short_nameStringShort display name.
slugStringURL-safe identifier.
uidStringESPN UID string.
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_dateStringSeason end date.
season_futures_$refString
season_power_index_leaders_$refString
season_power_indexes_$refString
season_rankings_$refString
season_start_dateStringSeason start date.
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_mlb_league_root()

espn_mlb_seasons​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/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_mlb_seasons()

espn_mlb_games​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/events

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/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_mlb_games()

espn_mlb_game​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/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
dateStringDate in YYYY-MM-DD format.
idInt64Id.
linksString
nameStringDisplay name.
short_nameStringShort display name.
time_validBoolean
uidStringESPN UID string.
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_mlb_game(event_id='401584793')

espn_mlb_teams_core​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/teams

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/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_mlb_teams_core()

espn_mlb_team_core​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/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
$refString
abbreviationStringShort abbreviation.
alternate_colorStringAlternate color (hex without leading '#').
colorStringPrimary color (hex, no leading '#').
display_nameStringDisplay name.
guidStringStable cross-league team GUID.
idInt64Id.
is_activeBooleanWhether the team was active in this season.
is_all_starBooleanIs all star.
linksString
locationStringTeam city/region (e.g. "Los Angeles").
logosStringLogos.
nameStringDisplay name.
short_display_nameStringShort display name.
slugStringURL-safe identifier.
uidStringESPN UID string.
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_idInt64MLBAM venue ID.
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_mlb_team_core(team_id='4')

espn_mlb_venues​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/venues

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/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_mlb_venues()

espn_mlb_venue​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/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_nameStringPlayer's full name.
grassBoolean
guidStringStable cross-league team GUID.
idInt64Id.
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_mlb_venue(venue_id='3663')

espn_mlb_franchises​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/franchises

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/franchises?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_mlb_franchises()

espn_mlb_franchise​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/franchises/{franchise_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/franchises/2

API ParameterPythonPatternRequiredNullableDescription
franchise_idfranchise_idYfranchise_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
abbreviationStringShort abbreviation.
colorStringPrimary color (hex, no leading '#').
display_nameStringDisplay name.
idInt64Id.
is_activeBooleanWhether the team was active in this season.
locationStringTeam city/region (e.g. "Los Angeles").
nameStringDisplay name.
short_display_nameStringShort display name.
slugStringURL-safe identifier.
uidStringESPN UID string.
team_$refString
venue_$refString
venue_address_cityString
venue_address_stateString
venue_full_nameString
venue_grassBoolean
venue_guidString
venue_idInt64MLBAM venue ID.
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_mlb_franchise(franchise_id='2')

espn_mlb_coach​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/coaches/{coach_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/coaches/1

API ParameterPythonPatternRequiredNullableDescription
coach_idcoach_idYcoach_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
career_recordsString
coach_seasonsString
experienceInt64Years of professional experience.
first_nameStringPlayer first name.
idInt64Id.
last_nameStringPlayer last name.
uidStringESPN UID string.
birth_place_cityStringBirth place city.
birth_place_stateStringBirth place state.

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_mlb_coach(coach_id='1')

espn_mlb_coach_record​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/coaches/{coach_id}/record/{record_type}

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/coaches/1/record/0

API ParameterPythonPatternRequiredNullableDescription
coach_idcoach_idYcoach_id path parameter.
record_typerecord_typeYrecord_type 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
display_valueStringHuman-readable value.
idInt64Id.
nameStringDisplay name.
statsString
summaryStringRecord summary (e.g. 'W-L').
typeStringRecord type / category.
valueFloat64Numeric value.

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_mlb_coach_record(coach_id='1')

espn_mlb_coach_season​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/coaches/{coach_id}/seasons/{season}

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/coaches/1/seasons/2024

API ParameterPythonPatternRequiredNullableDescription
coach_idcoach_idYcoach_id path parameter.
seasonseasonYseason path parameter.

Returns​

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

No returns table is published for this endpoint: no capture: 404 in nba, nfl, mlb, nhl, wnba, cfb, mbb, wbb with the documented example arguments (2026-10-07).

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_mlb_coach_season(coach_id='1', season=2024)

espn_mlb_positions​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/positions

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/positions?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_mlb_positions()

espn_mlb_position​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/positions/{position_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/positions/1

API ParameterPythonPatternRequiredNullableDescription
position_idposition_idYposition_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
abbreviationStringShort abbreviation.
display_nameStringDisplay name.
idInt64Id.
leafBooleanTRUE if a leaf position.
nameStringDisplay name.
parent_$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_mlb_position(position_id='1')

espn_mlb_tournaments​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/tournaments

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/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_mlb_tournaments()

espn_mlb_awards​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/awards

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/awards?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_mlb_awards()

espn_mlb_award​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/awards/{award_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/awards/1

API ParameterPythonPatternRequiredNullableDescription
award_idaward_idYaward_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
countInt64Count of count.
itemsString
page_countInt64
page_indexInt64
page_sizeInt64

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_mlb_award(award_id='1')

espn_mlb_standings_core​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/standings

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/standings

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_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.
ot_lossesFloat64
ot_winsFloat64
avg_points_againstFloat64Avg points against.
avg_points_forFloat64Avg points for.
clincherFloat64Clincher.
differentialFloat64Differential.
division_win_percentFloat64Division win percent.
games_behindFloat64Games behind.
games_playedFloat64Matches played.
league_win_percentFloat64League win percent.
lossesFloat64Losses.
playoff_seedFloat64Playoff seed.
point_differentialFloat64Point differential.
pointsFloat64Points.
points_againstFloat64Points against.
points_forFloat64Points for.
streakFloat64Streak.
tiesFloat64Number of matches the team has drawn.
win_percentFloat64Win percent.
winsFloat64Wins.
division_games_behindFloat64Number of games the team trails the division leader in the standings, expressed as a decimal (e.g., 0.5 for half a game back).
division_percentFloat64The team's winning percentage in division games, calculated as division wins divided by total division games played.
division_tiedFloat64Number of games the team has tied against opponents within their own division.
home_lossesFloat64
home_tiesFloat64
home_winsFloat64
magic_number_divisionFloat64Combination of wins needed by the team (or losses needed by the division leader) for the team to clinch a division title.
magic_number_wildcardFloat64Combination of wins needed by the team (or losses needed by the next wildcard team) for the team to clinch a wildcard playoff berth.
playoff_percentFloat64Estimated or model-derived probability that the team will qualify for the playoffs, expressed as a decimal between 0 and 1.
road_lossesFloat64
road_tiesFloat64
road_winsFloat64
wild_card_percentFloat64The team's winning percentage in games that count toward wildcard standings positioning.
overallStringOverall.
homeStringHome.
roadStringRoad.
intradivisionStringIntradivision.
intraleagueStringIntraleague.
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_mlb_standings_core()

espn_mlb_leaders_core​

All-time league leaders. ESPN ignores season here (nba with and without season=2015 returned the same career totals, 2026-11-17).

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/leaders

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/leaders

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, 2026-10-07); its rows sit under keys it does not read (top level: $ref, abbreviation, categories, id, name, type).

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_mlb_leaders_core()

espn_mlb_league_notes​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/notes

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/notes

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: no capture: the page holds zero items (count 0) in nba, nfl, mlb, nhl, wnba, cfb, mbb, wbb with the documented example arguments (2026-10-07).

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_mlb_league_notes()

espn_mlb_talentpicks​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/talentpicks

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/talentpicks

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
pick_competition_$refString
pick_competitor_$refString
pick_correctBoolean
pick_person_display_nameString
pick_person_first_nameString
pick_person_headshot_altString
pick_person_headshot_hrefString
pick_person_idInt64
pick_person_last_nameString
week_record_display_valueString
week_record_season_$refString
week_record_statsString
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_mlb_talentpicks()