MLB — ESPN CDN API (cdn.espn.com)
sportsdataverse.mlb — 4 endpoints.
espn_mlb_cdn_playbyplay
One game's espn.com play-by-play page data. The gamepackageJSON block is a Site v2 summary (header, boxscore, plays or drives, win probability, ...), so the parsed result is the same dict of frames that parse_summary returns.
Endpoint URL: GET https://cdn.espn.com/core/mlb/playbyplay
Valid URL: https://cdn.espn.com/core/mlb/playbyplay?xhr=1&gameId=401696358
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
gameId | game_id | Y | ESPN game (event) id. |
Returns
return_parsed=True (default) — a dict of polars.DataFrames keyed by summary section (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).
boxscore_player
| col_name | type | description |
|---|---|---|
team_id | Int64 | Team id. |
team_abbreviation | String | Team abbreviation. |
team_display_name | String | Team display name. |
team_location | String | Team location. |
athlete_id | Int64 | Athlete id. |
athlete_display_name | String | Athlete display name. |
athlete_short_name | String | Athlete short name. |
athlete_jersey | String | Athlete jersey. |
athlete_position | String | Athlete position. |
starter | Boolean | Starter. |
active | Boolean | Active. |
did_not_play | String | Did not play. |
ejected | String | Ejected. |
reason | String | Reason. |
hits_at_bats | String | Hitting performance ratio expressed as hits divided by at-bats for the player in the box score. |
at_bats | String | At bats. |
runs | String | Runs scored. |
hits | String | Hits. |
rb_is | String | Runs batted in and other secondary hitting statistics for the player in the box score. |
home_runs | String | Home runs. |
walks | String | Number of base-on-balls (walks) recorded by the player in the box score. |
strikeouts | String | Number of strikeouts recorded by the player, either as a batter or pitcher, in the box score. |
pitches | String | Total number of pitches thrown or faced by the player in the box score. |
avg | String | Batting average. |
on_base_pct | String | Percentage of plate appearances in which the player reached base safely in the game. |
slug_avg | String | Slugging average reflecting the total bases per at-bat recorded by the player in the box score. |
full_innings.part_innings | String | Innings pitched expressed as full innings and fractional partial innings for the pitcher in the box score. |
earned_runs | String | Earned runs allowed. |
pitches_strikes | String | Combined count of pitches thrown and strikes recorded for the pitcher in the box score. |
era | String | Earned run average. |
boxscore_team
| col_name | type | description |
|---|---|---|
team_id | Int64 | Team id. |
team_abbreviation | String | Team abbreviation. |
team_display_name | String | Team display name. |
home_away | String | Home away. |
display_order | Int64 | Display order. |
stat_name | String | Stat name. |
stat_label | String | Stat label. |
stat_display_value | String | Stat display value. |
stat_value | String | Stat value. |
plays
| col_name | type | description |
|---|---|---|
id | Int64 | Id. |
sequence_number | String | Sequence number. |
text | String | Text. |
away_score | Int64 | Away score. |
home_score | Int64 | Home score. |
scoring_play | Boolean | Scoring play. |
score_value | Int64 | Score value. |
wallclock | String | Wallclock. |
at_bat_id | Int64 | Identifier of the at-bat the play belongs to. |
summary_type | String | Play summary type. |
outs | Int64 | Outs in the inning after the play. |
type_id | Int64 | Type id. |
type_text | String | Type text. |
type_type | String | Play type category. |
period_type | String | Period type ('inning'). |
period_number | Int64 | Period number. |
period_display_value | String | Period display value. |
team_id | Int64 | Team id. |
pitch_count_balls | Int64 | Balls in the count when the pitch was thrown. |
pitch_count_strikes | Int64 | Strikes in the count when the pitch was thrown. |
result_count_balls | Int64 | Balls in the count after the pitch. |
result_count_strikes | Int64 | Strikes in the count after the pitch. |
participants | String | Participants. |
bat_order | Float64 | Spot in the batting order (1-9; NA if not applicable). |
type_alternative_text | String | Alternative play type text. |
bats_type | String | Bats type. |
bats_abbreviation | String | Bats abbreviation. |
bats_display_value | String | Bats display value. |
at_bat_pitch_number | Float64 | Pitch number within the at-bat. |
pitch_velocity | Float64 | Pitch velocity (mph). |
trajectory | String | Batted-ball trajectory. |
type_abbreviation | String | Play type abbreviation. |
pitch_coordinate_x | Float64 | Pitch location x-coordinate. |
pitch_coordinate_y | Float64 | Pitch location y-coordinate. |
pitch_type_id | Int64 | Pitch type identifier. |
pitch_type_text | String | Pitch type description (e.g. 'Four-seam FB'). |
pitch_type_abbreviation | String | Pitch type abbreviation. |
hit_coordinate_x | Float64 | Batted-ball location x-coordinate. |
hit_coordinate_y | Float64 | Batted-ball location y-coordinate. |
alternative_play | String | Alternative play flag. |
alternative_type_id | Int64 | Alternative play type id. |
alternative_type_text | String | Alternative play type text. |
alternative_type_abbreviation | String | Alternative play type abbreviation. |
alternative_type_alternative_text | String | Alternative type alternative text. |
alternative_type_type | String | Alternative play type category. |
on_first_athlete_id | Int64 | Athlete id of the runner on first base. |
on_second_athlete_id | Int64 | Athlete id of the runner on second base. |
on_third_athlete_id | Int64 | Athlete id of the runner on third base. |
winprobability
| col_name | type | description |
|---|---|---|
home_win_percentage | Float64 | Home win percentage. |
tie_percentage | Float64 | Tie percentage. |
play_id | Int64 | Play id. |
game_info
| col_name | type | description |
|---|---|---|
attendance | Int64 | Attendance. |
venue_id | Int64 | Venue id. |
venue_full_name | String | Venue full name. |
venue_short_name | String | Venue short name. |
venue_address_city | String | Venue address city. |
venue_address_state | String | Venue address state. |
venue_address_zip_code | String | Postal zip code of the venue where the game was played. |
officials
| col_name | type | description |
|---|---|---|
display_name | String | Display name. |
order | Int64 | Order. |
position_name | String | Position name. |
position_display_name | String | Position display name. |
position_id | Int64 | Position id. |
header
| col_name | type | description |
|---|---|---|
id | Int64 | Id. |
uid | String | Uid. |
time_valid | Boolean | Time valid. |
competitions | String | Competitions. |
links | String | Links. |
game_note | String | Optional editorial note or context annotation attached to the game in the header. |
season_year | Int64 | Season year. |
season_current | Boolean | Season current. |
season_type | Int64 | Season type. |
league_id | Int64 | League id. |
league_uid | String | League uid. |
league_name | String | League name. |
league_abbreviation | String | League abbreviation. |
league_midsize_name | String | Medium-length display name for the league or competition as shown in the game header. |
league_slug | String | League slug. |
league_is_tournament | Boolean | League is tournament. |
league_links | String | League links. |
league_logos | String | League logos. |
season_series
| col_name | type | description |
|---|---|---|
type | String | Type. |
title | String | Title. |
description | String | Description. |
summary | String | Summary. |
completed | Boolean | Completed. |
total_competitions | Int64 | Total competitions. |
series_score | String | Series score. |
events | String | Events. |
series_label | String | Series label. |
short_summary | String | Short summary. |
round | String | Draft round number. |
standings
| col_name | type | description |
|---|---|---|
group_header | String | Group header. |
conference_header | String | Conference header. |
division_header | String | Division header. |
team_id | Int64 | Team id. |
team_uid | String | Team uid. |
team_location | String | Team location. |
games_behind | String | Games behind. |
losses | String | Losses. |
streak | String | Streak. |
win_percent | String | Win percent. |
wins | String | Wins. |
broadcasts
| col_name | type | description |
|---|---|---|
station | String | |
station_key | String | Machine-readable key identifying the broadcasting station airing the game. |
lang | String | |
region | String | Region label. |
is_national | Boolean | Boolean flag indicating whether the broadcast is a nationally distributed feed. |
type_id | Int64 | Type id. |
type_short_name | String | |
type_long_name | String | |
type_slug | String | |
market_id | Int64 | ESPN futures-market identifier. |
market_type | String | Market type code (winLeague, winConference, winDivision, ...). |
media_call_letters | String | |
media_name | String | |
media_short_name | String |
format
| col_name | type | description |
|---|---|---|
regulation_periods | Int64 | Regulation periods. |
regulation_display_name | String | Regulation display name. |
regulation_slug | String | Regulation slug. |
article
| col_name | type | description |
|---|---|---|
id | Int64 | Id. |
now_id | String | Now id. |
content_key | String | Content key. |
data_source_identifier | String | Data source identifier. |
publishedkey | String | Publishedkey. |
type | String | Type. |
game_id | Int64 | Game id. |
headline | String | Headline. |
description | String | Description. |
link_text | String | Link text. |
categorized | String | Categorized. |
originally_posted | String | Originally posted. |
last_modified | String | Last modified. |
published | String | Published. |
section | String | Section. |
source | String | Source. |
images | String | Images. |
video | String | Video. |
categories | String | Categories. |
keywords | String | Keywords. |
story | String | Story. |
premium | Boolean | Premium. |
is_live_blog | Boolean | Is live blog. |
allow_comments | Boolean | Allow comments. |
allow_search | Boolean | Allow search. |
allow_content_reactions | Boolean | Allow content reactions. |
links_web_href | String | Links web href. |
links_mobile_href | String | Links mobile href. |
links_api_self_href | String | Links api self href. |
links_app_sportscenter_href | String | Links app sportscenter href. |
injuries
| col_name | type | description |
|---|---|---|
injuries | String | Injuries. |
team_id | Int64 | Team id. |
team_uid | String | Team uid. |
team_display_name | String | Team display name. |
team_abbreviation | String | Team abbreviation. |
team_links | String | Team links. |
team_logo | String | Team logo. |
team_logos | String | Team logos. |
news
| col_name | type | description |
|---|---|---|
id | Int64 | Id. |
now_id | String | Now id. |
content_key | String | Content key. |
data_source_identifier | String | Data source identifier. |
type | String | Type. |
headline | String | Headline. |
description | String | Description. |
last_modified | String | Last modified. |
published | String | Published. |
images | String | Images. |
categories | String | Categories. |
premium | Boolean | Premium. |
links_web_href | String | Links web href. |
links_mobile_href | String | Links mobile href. |
links_api_self_href | String | Links api self href. |
links_app_sportscenter_href | String | Links app sportscenter href. |
links_web_self_href | String | URL for the canonical web page of the associated article or editorial content. |
links_web_self_dsi_href | String | Data-source-identified URL for the web page of the associated article content. |
links_api_artwork_href | String | API endpoint URL for artwork or imagery associated with the article. |
links_sportscenter_href | String | URL for the article's page on ESPN's SportsCenter platform. |
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_mlb_cdn_playbyplay(game_id='401696358')
espn_mlb_cdn_boxscore
One game's espn.com box-score page data, parsed like a Site v2 summary. For football the drives and scoring plays are only on the playbyplay page.
Endpoint URL: GET https://cdn.espn.com/core/mlb/boxscore
Valid URL: https://cdn.espn.com/core/mlb/boxscore?xhr=1&gameId=401696358
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
gameId | game_id | Y | ESPN game (event) id. |
Returns
return_parsed=True (default) — a dict of polars.DataFrames keyed by summary section (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).
boxscore_player
| col_name | type | description |
|---|---|---|
team_id | Int64 | Team id. |
team_abbreviation | String | Team abbreviation. |
team_display_name | String | Team display name. |
team_location | String | Team location. |
athlete_id | Int64 | Athlete id. |
athlete_display_name | String | Athlete display name. |
athlete_short_name | String | Athlete short name. |
athlete_jersey | String | Athlete jersey. |
athlete_position | String | Athlete position. |
starter | Boolean | Starter. |
active | Boolean | Active. |
did_not_play | String | Did not play. |
ejected | String | Ejected. |
reason | String | Reason. |
hits_at_bats | String | Hitting performance ratio expressed as hits divided by at-bats for the player in the box score. |
at_bats | String | At bats. |
runs | String | Runs scored. |
hits | String | Hits. |
rb_is | String | Runs batted in and other secondary hitting statistics for the player in the box score. |
home_runs | String | Home runs. |
walks | String | Number of base-on-balls (walks) recorded by the player in the box score. |
strikeouts | String | Number of strikeouts recorded by the player, either as a batter or pitcher, in the box score. |
pitches | String | Total number of pitches thrown or faced by the player in the box score. |
avg | String | Batting average. |
on_base_pct | String | Percentage of plate appearances in which the player reached base safely in the game. |
slug_avg | String | Slugging average reflecting the total bases per at-bat recorded by the player in the box score. |
full_innings.part_innings | String | Innings pitched expressed as full innings and fractional partial innings for the pitcher in the box score. |
earned_runs | String | Earned runs allowed. |
pitches_strikes | String | Combined count of pitches thrown and strikes recorded for the pitcher in the box score. |
era | String | Earned run average. |
boxscore_team
| col_name | type | description |
|---|---|---|
team_id | Int64 | Team id. |
team_abbreviation | String | Team abbreviation. |
team_display_name | String | Team display name. |
home_away | String | Home away. |
display_order | Int64 | Display order. |
stat_name | String | Stat name. |
stat_label | String | Stat label. |
stat_display_value | String | Stat display value. |
stat_value | String | Stat value. |
plays
| col_name | type | description |
|---|---|---|
id | Int64 | Id. |
sequence_number | String | Sequence number. |
text | String | Text. |
away_score | Int64 | Away score. |
home_score | Int64 | Home score. |
scoring_play | Boolean | Scoring play. |
score_value | Int64 | Score value. |
wallclock | String | Wallclock. |
at_bat_id | Int64 | Identifier of the at-bat the play belongs to. |
summary_type | String | Play summary type. |
outs | Int64 | Outs in the inning after the play. |
type_id | Int64 | Type id. |
type_text | String | Type text. |
type_type | String | Play type category. |
period_type | String | Period type ('inning'). |
period_number | Int64 | Period number. |
period_display_value | String | Period display value. |
team_id | Int64 | Team id. |
pitch_count_balls | Int64 | Balls in the count when the pitch was thrown. |
pitch_count_strikes | Int64 | Strikes in the count when the pitch was thrown. |
result_count_balls | Int64 | Balls in the count after the pitch. |
result_count_strikes | Int64 | Strikes in the count after the pitch. |
participants | String | Participants. |
bat_order | Float64 | Spot in the batting order (1-9; NA if not applicable). |
type_alternative_text | String | Alternative play type text. |
bats_type | String | Bats type. |
bats_abbreviation | String | Bats abbreviation. |
bats_display_value | String | Bats display value. |
at_bat_pitch_number | Float64 | Pitch number within the at-bat. |
pitch_velocity | Float64 | Pitch velocity (mph). |
trajectory | String | Batted-ball trajectory. |
type_abbreviation | String | Play type abbreviation. |
pitch_coordinate_x | Float64 | Pitch location x-coordinate. |
pitch_coordinate_y | Float64 | Pitch location y-coordinate. |
pitch_type_id | Int64 | Pitch type identifier. |
pitch_type_text | String | Pitch type description (e.g. 'Four-seam FB'). |
pitch_type_abbreviation | String | Pitch type abbreviation. |
hit_coordinate_x | Float64 | Batted-ball location x-coordinate. |
hit_coordinate_y | Float64 | Batted-ball location y-coordinate. |
alternative_play | String | Alternative play flag. |
alternative_type_id | Int64 | Alternative play type id. |
alternative_type_text | String | Alternative play type text. |
alternative_type_abbreviation | String | Alternative play type abbreviation. |
alternative_type_alternative_text | String | Alternative type alternative text. |
alternative_type_type | String | Alternative play type category. |
on_first_athlete_id | Int64 | Athlete id of the runner on first base. |
on_second_athlete_id | Int64 | Athlete id of the runner on second base. |
on_third_athlete_id | Int64 | Athlete id of the runner on third base. |
winprobability
| col_name | type | description |
|---|---|---|
home_win_percentage | Float64 | Home win percentage. |
tie_percentage | Float64 | Tie percentage. |
play_id | Int64 | Play id. |
game_info
| col_name | type | description |
|---|---|---|
attendance | Int64 | Attendance. |
venue_id | Int64 | Venue id. |
venue_full_name | String | Venue full name. |
venue_short_name | String | Venue short name. |
venue_address_city | String | Venue address city. |
venue_address_state | String | Venue address state. |
venue_address_zip_code | String | Postal zip code of the venue where the game was played. |
officials
| col_name | type | description |
|---|---|---|
display_name | String | Display name. |
order | Int64 | Order. |
position_name | String | Position name. |
position_display_name | String | Position display name. |
position_id | Int64 | Position id. |
header
| col_name | type | description |
|---|---|---|
id | Int64 | Id. |
uid | String | Uid. |
time_valid | Boolean | Time valid. |
competitions | String | Competitions. |
links | String | Links. |
game_note | String | Optional editorial note or context annotation attached to the game in the header. |
season_year | Int64 | Season year. |
season_current | Boolean | Season current. |
season_type | Int64 | Season type. |
league_id | Int64 | League id. |
league_uid | String | League uid. |
league_name | String | League name. |
league_abbreviation | String | League abbreviation. |
league_midsize_name | String | Medium-length display name for the league or competition as shown in the game header. |
league_slug | String | League slug. |
league_is_tournament | Boolean | League is tournament. |
league_links | String | League links. |
league_logos | String | League logos. |
season_series
| col_name | type | description |
|---|---|---|
type | String | Type. |
title | String | Title. |
description | String | Description. |
summary | String | Summary. |
completed | Boolean | Completed. |
total_competitions | Int64 | Total competitions. |
series_score | String | Series score. |
events | String | Events. |
series_label | String | Series label. |
short_summary | String | Short summary. |
round | String | Draft round number. |
standings
| col_name | type | description |
|---|---|---|
group_header | String | Group header. |
conference_header | String | Conference header. |
division_header | String | Division header. |
team_id | Int64 | Team id. |
team_uid | String | Team uid. |
team_location | String | Team location. |
games_behind | String | Games behind. |
losses | String | Losses. |
streak | String | Streak. |
win_percent | String | Win percent. |
wins | String | Wins. |
broadcasts
| col_name | type | description |
|---|---|---|
station | String | |
station_key | String | Machine-readable key identifying the broadcasting station airing the game. |
lang | String | |
region | String | Region label. |
is_national | Boolean | Boolean flag indicating whether the broadcast is a nationally distributed feed. |
type_id | Int64 | Type id. |
type_short_name | String | |
type_long_name | String | |
type_slug | String | |
market_id | Int64 | ESPN futures-market identifier. |
market_type | String | Market type code (winLeague, winConference, winDivision, ...). |
media_call_letters | String | |
media_name | String | |
media_short_name | String |
format
| col_name | type | description |
|---|---|---|
regulation_periods | Int64 | Regulation periods. |
regulation_display_name | String | Regulation display name. |
regulation_slug | String | Regulation slug. |
article
| col_name | type | description |
|---|---|---|
id | Int64 | Id. |
now_id | String | Now id. |
content_key | String | Content key. |
data_source_identifier | String | Data source identifier. |
publishedkey | String | Publishedkey. |
type | String | Type. |
game_id | Int64 | Game id. |
headline | String | Headline. |
description | String | Description. |
link_text | String | Link text. |
categorized | String | Categorized. |
originally_posted | String | Originally posted. |
last_modified | String | Last modified. |
published | String | Published. |
section | String | Section. |
source | String | Source. |
images | String | Images. |
video | String | Video. |
categories | String | Categories. |
keywords | String | Keywords. |
story | String | Story. |
premium | Boolean | Premium. |
is_live_blog | Boolean | Is live blog. |
allow_comments | Boolean | Allow comments. |
allow_search | Boolean | Allow search. |
allow_content_reactions | Boolean | Allow content reactions. |
links_web_href | String | Links web href. |
links_mobile_href | String | Links mobile href. |
links_api_self_href | String | Links api self href. |
links_app_sportscenter_href | String | Links app sportscenter href. |
injuries
| col_name | type | description |
|---|---|---|
injuries | String | Injuries. |
team_id | Int64 | Team id. |
team_uid | String | Team uid. |
team_display_name | String | Team display name. |
team_abbreviation | String | Team abbreviation. |
team_links | String | Team links. |
team_logo | String | Team logo. |
team_logos | String | Team logos. |
news
| col_name | type | description |
|---|---|---|
id | Int64 | Id. |
now_id | String | Now id. |
content_key | String | Content key. |
data_source_identifier | String | Data source identifier. |
type | String | Type. |
headline | String | Headline. |
description | String | Description. |
last_modified | String | Last modified. |
published | String | Published. |
images | String | Images. |
categories | String | Categories. |
premium | Boolean | Premium. |
links_web_href | String | Links web href. |
links_mobile_href | String | Links mobile href. |
links_api_self_href | String | Links api self href. |
links_app_sportscenter_href | String | Links app sportscenter href. |
links_web_self_href | String | URL for the canonical web page of the associated article or editorial content. |
links_web_self_dsi_href | String | Data-source-identified URL for the web page of the associated article content. |
links_api_artwork_href | String | API endpoint URL for artwork or imagery associated with the article. |
links_sportscenter_href | String | URL for the article's page on ESPN's SportsCenter platform. |
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_mlb_cdn_boxscore(game_id='401696358')
espn_mlb_cdn_schedule
espn.com schedule page data, one row per game: up to 7 days starting at date (mbb and wbb: that day only; cfb and nfl: one week).
Endpoint URL: GET https://cdn.espn.com/core/mlb/schedule
Valid URL: https://cdn.espn.com/core/mlb/schedule?xhr=1&date=20250415
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
date | date | Y | Single date (YYYYMMDD). Ignored by cfb and nfl, which are week-oriented. Defaults to today. | ||
week | week | Y | Week number (cfb and nfl). | ||
year | season | Y | Season year that week belongs to (cfb and nfl). | ||
seasontype | season_type | Y | Season phase for week: 1=preseason, 2=regular season, 3=postseason (cfb and nfl). |
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 |
|---|---|---|
game_id | Int64 | ESPN event id. |
uid | String | ESPN UID string. |
date | String | Match start timestamp (ISO 8601, UTC). |
name | String | Full event name (e.g. 'Team A at Team B'). |
short_name | String | Abbreviated event name (e.g. 'TA @ TB'). |
season_year | Int64 | Integer season year ESPN assigns the event (e.g. 2025 for the 2025-26 season). |
season_type | Int64 | ESPN season-type id of the event's season: 1 preseason, 2 regular season, 3 postseason, 4 offseason for the US leagues; soccer competitions carry their own competition-specific ids (e.g. 13481). |
season_slug | String | ESPN slug of the event's season type (e.g. 'regular-season', 'post-season'; soccer competitions use their own, such as 'final' or 'torneo-apertura'). |
status_type_id | Int64 | |
status_type_name | String | |
status_type_state | String | |
status_type_completed | Boolean | |
status_type_description | String | |
status_type_detail | String | |
status_type_short_detail | String | |
status_clock | Float64 | Game clock in seconds as ESPN reports it: time remaining in the period for clock sports, elapsed seconds for soccer (e.g. 5400.0 at full time); 0.0 once a game has ended. |
status_display_clock | String | |
status_period | Int64 | Current or final period number (quarter, half, inning or period, depending on the sport). |
neutral_site | Boolean | Whether the match is played at a neutral venue. |
conference_competition | Boolean | Conference competition. |
attendance | Int64 | Reported attendance (NA on the redesigned page). |
venue_id | Int64 | MLBAM venue ID. |
venue_full_name | String | |
venue_city | String | Venue city. |
venue_state | String | Venue state / province. |
venue_indoor | Boolean | |
broadcast | String | Every network name of the competition in feed order, deduped and ", "-joined (an entry with no names gives its market); "" when the game lists no broadcast. |
note | String | Event note text from the competition (e.g. a series or game label such as 'World Series - Game 1', or a shootout result); an empty string when there is none. |
home_id | Int64 | |
home_name | String | |
home_abbreviation | String | |
home_display_name | String | |
home_location | String | |
home_color | String | |
home_alternate_color | String | |
home_logo | String | |
home_score | String | Home team's score. For cricket, the innings string (e.g. '161/5 (18/20 ov, target 156)'). |
home_winner | Boolean | |
home_rank | String | |
away_id | Int64 | |
away_name | String | |
away_abbreviation | String | |
away_display_name | String | |
away_location | String | |
away_color | String | |
away_alternate_color | String | |
away_logo | String | |
away_score | String | Away team's score. For cricket, the innings string. |
away_winner | Boolean | |
away_rank | 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_mlb_cdn_schedule(date='20250415')
espn_mlb_cdn_scoreboard
espn.com scoreboard page data for one day (one week for football), one row per game. The page's sbData block is a Site v2 scoreboard payload.
Endpoint URL: GET https://cdn.espn.com/core/mlb/scoreboard
Valid URL: https://cdn.espn.com/core/mlb/scoreboard?xhr=1&date=20250415
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
date | date | Y | Single date (YYYYMMDD). Ignored by cfb and nfl, which are week-oriented. Defaults to today. | ||
week | week | Y | Week number (cfb and nfl). | ||
year | season | Y | Season year that week belongs to (cfb and nfl). | ||
seasontype | season_type | Y | Season phase for week: 1=preseason, 2=regular season, 3=postseason (cfb and nfl). |
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 |
|---|---|---|
game_id | Int64 | ESPN event id. |
uid | String | ESPN UID string. |
date | String | Match start timestamp (ISO 8601, UTC). |
name | String | Full event name (e.g. 'Team A at Team B'). |
short_name | String | Abbreviated event name (e.g. 'TA @ TB'). |
season_year | Int64 | Integer season year ESPN assigns the event (e.g. 2025 for the 2025-26 season). |
season_type | Int64 | ESPN season-type id of the event's season: 1 preseason, 2 regular season, 3 postseason, 4 offseason for the US leagues; soccer competitions carry their own competition-specific ids (e.g. 13481). |
season_slug | String | ESPN slug of the event's season type (e.g. 'regular-season', 'post-season'; soccer competitions use their own, such as 'final' or 'torneo-apertura'). |
status_type_id | Int64 | |
status_type_name | String | |
status_type_state | String | |
status_type_completed | Boolean | |
status_type_description | String | |
status_type_detail | String | |
status_type_short_detail | String | |
status_clock | Float64 | Game clock in seconds as ESPN reports it: time remaining in the period for clock sports, elapsed seconds for soccer (e.g. 5400.0 at full time); 0.0 once a game has ended. |
status_display_clock | String | |
status_period | Int64 | Current or final period number (quarter, half, inning or period, depending on the sport). |
neutral_site | Boolean | Whether the match is played at a neutral venue. |
conference_competition | Boolean | Conference competition. |
attendance | Int64 | Reported attendance (NA on the redesigned page). |
venue_id | Int64 | MLBAM venue ID. |
venue_full_name | String | |
venue_city | String | Venue city. |
venue_state | String | Venue state / province. |
venue_indoor | Boolean | |
broadcast | String | Every network name of the competition in feed order, deduped and ", "-joined (an entry with no names gives its market); "" when the game lists no broadcast. |
note | String | Event note text from the competition (e.g. a series or game label such as 'World Series - Game 1', or a shootout result); an empty string when there is none. |
home_id | Int64 | |
home_name | String | |
home_abbreviation | String | |
home_display_name | String | |
home_location | String | |
home_color | String | |
home_alternate_color | String | |
home_logo | String | |
home_score | String | Home team's score. For cricket, the innings string (e.g. '161/5 (18/20 ov, target 156)'). |
home_winner | Boolean | |
home_rank | String | |
away_id | Int64 | |
away_name | String | |
away_abbreviation | String | |
away_display_name | String | |
away_location | String | |
away_color | String | |
away_alternate_color | String | |
away_logo | String | |
away_score | String | Away team's score. For cricket, the innings string. |
away_winner | Boolean | |
away_rank | 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_mlb_cdn_scoreboard(date='20250415')