Skip to main content

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 ParameterPythonPatternRequiredNullableDescription
gameIdgame_idYESPN game (event) id.

Returns​

return_parsed=True (default) — a dict of polars.DataFrames keyed by summary section (representative columns below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys). boxscore_player

col_nametypedescription
team_idcharacterTeam id.
team_abbreviationcharacterTeam abbreviation.
team_display_namecharacterTeam display name.
team_locationcharacterTeam location.
athlete_idcharacterAthlete id.
athlete_display_namecharacterAthlete display name.
athlete_short_namecharacterAthlete short name.
athlete_jerseycharacterAthlete jersey.
athlete_positioncharacterAthlete position.
starterlogicalStarter.
activelogicalActive.
did_not_playcharacterDid not play.
ejectedcharacterEjected.
reasoncharacterReason.
hits_at_batscharacterHitting performance ratio expressed as hits divided by at-bats for the player in the box score.
at_batscharacterAt bats.
runscharacterRuns scored.
hitscharacterHits.
rb_ischaracterRuns batted in and other secondary hitting statistics for the player in the box score.
home_runscharacterHome runs.
walkscharacterNumber of base-on-balls (walks) recorded by the player in the box score.
strikeoutscharacterNumber of strikeouts recorded by the player, either as a batter or pitcher, in the box score.
pitchescharacterTotal number of pitches thrown or faced by the player in the box score.
avgcharacterBatting average.
on_base_pctcharacterPercentage of plate appearances in which the player reached base safely in the game.
slug_avgcharacterSlugging average reflecting the total bases per at-bat recorded by the player in the box score.
full_innings.part_inningscharacterInnings pitched expressed as full innings and fractional partial innings for the pitcher in the box score.
earned_runscharacterEarned runs allowed.
pitches_strikescharacterCombined count of pitches thrown and strikes recorded for the pitcher in the box score.
eracharacterEarned run average.

boxscore_team

col_nametypedescription
team_idcharacterTeam id.
team_abbreviationcharacterTeam abbreviation.
team_display_namecharacterTeam display name.
home_awaycharacterHome away.
display_orderintegerDisplay order.
stat_namecharacterStat name.
stat_labelcharacterStat label.
stat_display_valuecharacterStat display value.
stat_valuecharacterStat value.

plays

col_nametypedescription
idcharacterId.
sequence_numbercharacterSequence number.
textcharacterText.
away_scoreintegerAway score.
home_scoreintegerHome score.
scoring_playlogicalScoring play.
score_valueintegerScore value.
wallclockcharacterWallclock.
at_bat_idcharacterIdentifier of the at-bat the play belongs to.
summary_typecharacterPlay summary type.
outsintegerOuts in the inning after the play.
type_idcharacterType id.
type_textcharacterType text.
type_typecharacterPlay type category.
period_typecharacterPeriod type ('inning').
period_numberintegerPeriod number.
period_display_valuecharacterPeriod display value.
team_idcharacterTeam id.
pitch_count_ballsintegerBalls in the count when the pitch was thrown.
pitch_count_strikesintegerStrikes in the count when the pitch was thrown.
result_count_ballsintegerBalls in the count after the pitch.
result_count_strikesintegerStrikes in the count after the pitch.
participantscharacterParticipants.
bat_orderdoubleSpot in the batting order (1-9; NA if not applicable).
type_alternative_textcharacterAlternative play type text.
bats_typecharacterBats type.
bats_abbreviationcharacterBats abbreviation.
bats_display_valuecharacterBats display value.
at_bat_pitch_numberdoublePitch number within the at-bat.
pitch_velocitydoublePitch velocity (mph).
trajectorycharacterBatted-ball trajectory.
type_abbreviationcharacterPlay type abbreviation.
pitch_coordinate_xdoublePitch location x-coordinate.
pitch_coordinate_ydoublePitch location y-coordinate.
pitch_type_idcharacterPitch type identifier.
pitch_type_textcharacterPitch type description (e.g. 'Four-seam FB').
pitch_type_abbreviationcharacterPitch type abbreviation.
hit_coordinate_xdoubleBatted-ball location x-coordinate.
hit_coordinate_ydoubleBatted-ball location y-coordinate.
alternative_playcharacterAlternative play flag.
alternative_type_idcharacterAlternative play type id.
alternative_type_textcharacterAlternative play type text.
alternative_type_abbreviationcharacterAlternative play type abbreviation.
alternative_type_alternative_textcharacterAlternative type alternative text.
alternative_type_typecharacterAlternative play type category.
on_first_athlete_idcharacterAthlete id of the runner on first base.
on_second_athlete_idcharacterAthlete id of the runner on second base.
on_third_athlete_idcharacterAthlete id of the runner on third base.

winprobability

col_nametypedescription
home_win_percentagedoubleHome win percentage.
tie_percentagedoubleTie percentage.
play_idcharacterPlay id.

game_info

col_nametypedescription
attendanceintegerAttendance.
venue_idcharacterVenue id.
venue_full_namecharacterVenue full name.
venue_short_namecharacterVenue short name.
venue_address_citycharacterVenue address city.
venue_address_statecharacterVenue address state.
venue_address_zip_codecharacterPostal zip code of the venue where the game was played.

officials

col_nametypedescription
display_namecharacterDisplay name.
orderintegerOrder.
position_namecharacterPosition name.
position_display_namecharacterPosition display name.
position_idcharacterPosition id.

header

col_nametypedescription
idcharacterId.
uidcharacterUid.
time_validlogicalTime valid.
competitionscharacterCompetitions.
linkscharacterLinks.
game_notecharacterOptional editorial note or context annotation attached to the game in the header.
season_yearintegerSeason year.
season_currentlogicalSeason current.
season_typeintegerSeason type.
league_idcharacterLeague id.
league_uidcharacterLeague uid.
league_namecharacterLeague name.
league_abbreviationcharacterLeague abbreviation.
league_midsize_namecharacterMedium-length display name for the league or competition as shown in the game header.
league_slugcharacterLeague slug.
league_is_tournamentlogicalLeague is tournament.
league_linkscharacterLeague links.
league_logoscharacterLeague logos.

season_series

col_nametypedescription
typecharacterType.
titlecharacterTitle.
descriptioncharacterDescription.
summarycharacterSummary.
completedlogicalCompleted.
total_competitionsintegerTotal competitions.
series_scorecharacterSeries score.
eventscharacterEvents.
series_labelcharacterSeries label.
short_summarycharacterShort summary.
roundcharacterDraft round number.

standings

col_nametypedescription
group_headercharacterGroup header.
conference_headercharacterConference header.
division_headercharacterDivision header.
team_idcharacterTeam id.
team_uidcharacterTeam uid.
team_locationcharacterTeam location.
games_behindcharacterGames behind.
lossescharacterLosses.
streakcharacterStreak.
win_percentcharacterWin percent.
winscharacterWins.

broadcasts

col_nametypedescription
stationcharacterStation full name (e.g. "FanDuel Sports Network Detroit").
station_keycharacterMachine-readable key identifying the broadcasting station airing the game.
langcharacterBroadcast language (e.g. "en").
regioncharacterRegion label.
is_nationallogicalBoolean flag indicating whether the broadcast is a nationally distributed feed.
type_idcharacterType id.
type_short_namecharacterBroadcast type short name (e.g. "TV").
type_long_namecharacterBroadcast type long name (e.g. "Television").
type_slugcharacterBroadcast-type slug (e.g. streaming, tv).
market_idcharacterESPN futures-market identifier.
market_typecharacterMarket type code (winLeague, winConference, winDivision, ...).
media_call_letterscharacterBroadcast call letters for the outlet.
media_namecharacterESPN media name for the outlet.
media_short_namecharacterShort ESPN media name for the outlet.

format

col_nametypedescription
regulation_periodsintegerRegulation periods.
regulation_display_namecharacterRegulation display name.
regulation_slugcharacterRegulation slug.

article

col_nametypedescription
idintegerId.
now_idcharacterNow id.
content_keycharacterContent key.
data_source_identifiercharacterData source identifier.
publishedkeycharacterPublishedkey.
typecharacterType.
game_idcharacterGame id.
headlinecharacterHeadline.
descriptioncharacterDescription.
link_textcharacterLink text.
categorizedcharacterCategorized.
originally_postedcharacterOriginally posted.
last_modifiedcharacterLast modified.
publishedcharacterPublished.
sectioncharacterSection.
sourcecharacterSource.
imagescharacterImages.
videocharacterVideo.
categoriescharacterCategories.
keywordscharacterKeywords.
storycharacterStory.
premiumlogicalPremium.
is_live_bloglogicalIs live blog.
allow_commentslogicalAllow comments.
allow_searchlogicalAllow search.
allow_content_reactionslogicalAllow content reactions.
links_web_hrefcharacterLinks web href.
links_mobile_hrefcharacterLinks mobile href.
links_api_self_hrefcharacterLinks api self href.
links_app_sportscenter_hrefcharacterLinks app sportscenter href.

injuries

col_nametypedescription
injuriescharacterInjuries.
team_idcharacterTeam id.
team_uidcharacterTeam uid.
team_display_namecharacterTeam display name.
team_abbreviationcharacterTeam abbreviation.
team_linkscharacterTeam links.
team_logocharacterTeam logo.
team_logoscharacterTeam logos.

news

col_nametypedescription
idintegerId.
now_idcharacterNow id.
content_keycharacterContent key.
data_source_identifiercharacterData source identifier.
typecharacterType.
headlinecharacterHeadline.
descriptioncharacterDescription.
last_modifiedcharacterLast modified.
publishedcharacterPublished.
imagescharacterImages.
categoriescharacterCategories.
premiumlogicalPremium.
links_web_hrefcharacterLinks web href.
links_mobile_hrefcharacterLinks mobile href.
links_api_self_hrefcharacterLinks api self href.
links_app_sportscenter_hrefcharacterLinks app sportscenter href.
links_web_self_hrefcharacterURL for the canonical web page of the associated article or editorial content.
links_web_self_dsi_hrefcharacterData-source-identified URL for the web page of the associated article content.
links_api_artwork_hrefcharacterAPI endpoint URL for artwork or imagery associated with the article.
links_sportscenter_hrefcharacterURL for the article's page on ESPN's SportsCenter platform.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

espn_mlb_cdn_playbyplay(game_id='401696358')

Last validated n/a.

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 ParameterPythonPatternRequiredNullableDescription
gameIdgame_idYESPN game (event) id.

Returns​

return_parsed=True (default) — a dict of polars.DataFrames keyed by summary section (representative columns below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys). boxscore_player

col_nametypedescription
team_idcharacterTeam id.
team_abbreviationcharacterTeam abbreviation.
team_display_namecharacterTeam display name.
team_locationcharacterTeam location.
athlete_idcharacterAthlete id.
athlete_display_namecharacterAthlete display name.
athlete_short_namecharacterAthlete short name.
athlete_jerseycharacterAthlete jersey.
athlete_positioncharacterAthlete position.
starterlogicalStarter.
activelogicalActive.
did_not_playcharacterDid not play.
ejectedcharacterEjected.
reasoncharacterReason.
hits_at_batscharacterHitting performance ratio expressed as hits divided by at-bats for the player in the box score.
at_batscharacterAt bats.
runscharacterRuns scored.
hitscharacterHits.
rb_ischaracterRuns batted in and other secondary hitting statistics for the player in the box score.
home_runscharacterHome runs.
walkscharacterNumber of base-on-balls (walks) recorded by the player in the box score.
strikeoutscharacterNumber of strikeouts recorded by the player, either as a batter or pitcher, in the box score.
pitchescharacterTotal number of pitches thrown or faced by the player in the box score.
avgcharacterBatting average.
on_base_pctcharacterPercentage of plate appearances in which the player reached base safely in the game.
slug_avgcharacterSlugging average reflecting the total bases per at-bat recorded by the player in the box score.
full_innings.part_inningscharacterInnings pitched expressed as full innings and fractional partial innings for the pitcher in the box score.
earned_runscharacterEarned runs allowed.
pitches_strikescharacterCombined count of pitches thrown and strikes recorded for the pitcher in the box score.
eracharacterEarned run average.

boxscore_team

col_nametypedescription
team_idcharacterTeam id.
team_abbreviationcharacterTeam abbreviation.
team_display_namecharacterTeam display name.
home_awaycharacterHome away.
display_orderintegerDisplay order.
stat_namecharacterStat name.
stat_labelcharacterStat label.
stat_display_valuecharacterStat display value.
stat_valuecharacterStat value.

plays

col_nametypedescription
idcharacterId.
sequence_numbercharacterSequence number.
textcharacterText.
away_scoreintegerAway score.
home_scoreintegerHome score.
scoring_playlogicalScoring play.
score_valueintegerScore value.
wallclockcharacterWallclock.
at_bat_idcharacterIdentifier of the at-bat the play belongs to.
summary_typecharacterPlay summary type.
outsintegerOuts in the inning after the play.
type_idcharacterType id.
type_textcharacterType text.
type_typecharacterPlay type category.
period_typecharacterPeriod type ('inning').
period_numberintegerPeriod number.
period_display_valuecharacterPeriod display value.
team_idcharacterTeam id.
pitch_count_ballsintegerBalls in the count when the pitch was thrown.
pitch_count_strikesintegerStrikes in the count when the pitch was thrown.
result_count_ballsintegerBalls in the count after the pitch.
result_count_strikesintegerStrikes in the count after the pitch.
participantscharacterParticipants.
bat_orderdoubleSpot in the batting order (1-9; NA if not applicable).
type_alternative_textcharacterAlternative play type text.
bats_typecharacterBats type.
bats_abbreviationcharacterBats abbreviation.
bats_display_valuecharacterBats display value.
at_bat_pitch_numberdoublePitch number within the at-bat.
pitch_velocitydoublePitch velocity (mph).
trajectorycharacterBatted-ball trajectory.
type_abbreviationcharacterPlay type abbreviation.
pitch_coordinate_xdoublePitch location x-coordinate.
pitch_coordinate_ydoublePitch location y-coordinate.
pitch_type_idcharacterPitch type identifier.
pitch_type_textcharacterPitch type description (e.g. 'Four-seam FB').
pitch_type_abbreviationcharacterPitch type abbreviation.
hit_coordinate_xdoubleBatted-ball location x-coordinate.
hit_coordinate_ydoubleBatted-ball location y-coordinate.
alternative_playcharacterAlternative play flag.
alternative_type_idcharacterAlternative play type id.
alternative_type_textcharacterAlternative play type text.
alternative_type_abbreviationcharacterAlternative play type abbreviation.
alternative_type_alternative_textcharacterAlternative type alternative text.
alternative_type_typecharacterAlternative play type category.
on_first_athlete_idcharacterAthlete id of the runner on first base.
on_second_athlete_idcharacterAthlete id of the runner on second base.
on_third_athlete_idcharacterAthlete id of the runner on third base.

winprobability

col_nametypedescription
home_win_percentagedoubleHome win percentage.
tie_percentagedoubleTie percentage.
play_idcharacterPlay id.

game_info

col_nametypedescription
attendanceintegerAttendance.
venue_idcharacterVenue id.
venue_full_namecharacterVenue full name.
venue_short_namecharacterVenue short name.
venue_address_citycharacterVenue address city.
venue_address_statecharacterVenue address state.
venue_address_zip_codecharacterPostal zip code of the venue where the game was played.

officials

col_nametypedescription
display_namecharacterDisplay name.
orderintegerOrder.
position_namecharacterPosition name.
position_display_namecharacterPosition display name.
position_idcharacterPosition id.

header

col_nametypedescription
idcharacterId.
uidcharacterUid.
time_validlogicalTime valid.
competitionscharacterCompetitions.
linkscharacterLinks.
game_notecharacterOptional editorial note or context annotation attached to the game in the header.
season_yearintegerSeason year.
season_currentlogicalSeason current.
season_typeintegerSeason type.
league_idcharacterLeague id.
league_uidcharacterLeague uid.
league_namecharacterLeague name.
league_abbreviationcharacterLeague abbreviation.
league_midsize_namecharacterMedium-length display name for the league or competition as shown in the game header.
league_slugcharacterLeague slug.
league_is_tournamentlogicalLeague is tournament.
league_linkscharacterLeague links.
league_logoscharacterLeague logos.

season_series

col_nametypedescription
typecharacterType.
titlecharacterTitle.
descriptioncharacterDescription.
summarycharacterSummary.
completedlogicalCompleted.
total_competitionsintegerTotal competitions.
series_scorecharacterSeries score.
eventscharacterEvents.
series_labelcharacterSeries label.
short_summarycharacterShort summary.
roundcharacterDraft round number.

standings

col_nametypedescription
group_headercharacterGroup header.
conference_headercharacterConference header.
division_headercharacterDivision header.
team_idcharacterTeam id.
team_uidcharacterTeam uid.
team_locationcharacterTeam location.
games_behindcharacterGames behind.
lossescharacterLosses.
streakcharacterStreak.
win_percentcharacterWin percent.
winscharacterWins.

broadcasts

col_nametypedescription
stationcharacterStation full name (e.g. "FanDuel Sports Network Detroit").
station_keycharacterMachine-readable key identifying the broadcasting station airing the game.
langcharacterBroadcast language (e.g. "en").
regioncharacterRegion label.
is_nationallogicalBoolean flag indicating whether the broadcast is a nationally distributed feed.
type_idcharacterType id.
type_short_namecharacterBroadcast type short name (e.g. "TV").
type_long_namecharacterBroadcast type long name (e.g. "Television").
type_slugcharacterBroadcast-type slug (e.g. streaming, tv).
market_idcharacterESPN futures-market identifier.
market_typecharacterMarket type code (winLeague, winConference, winDivision, ...).
media_call_letterscharacterBroadcast call letters for the outlet.
media_namecharacterESPN media name for the outlet.
media_short_namecharacterShort ESPN media name for the outlet.

format

col_nametypedescription
regulation_periodsintegerRegulation periods.
regulation_display_namecharacterRegulation display name.
regulation_slugcharacterRegulation slug.

article

col_nametypedescription
idintegerId.
now_idcharacterNow id.
content_keycharacterContent key.
data_source_identifiercharacterData source identifier.
publishedkeycharacterPublishedkey.
typecharacterType.
game_idcharacterGame id.
headlinecharacterHeadline.
descriptioncharacterDescription.
link_textcharacterLink text.
categorizedcharacterCategorized.
originally_postedcharacterOriginally posted.
last_modifiedcharacterLast modified.
publishedcharacterPublished.
sectioncharacterSection.
sourcecharacterSource.
imagescharacterImages.
videocharacterVideo.
categoriescharacterCategories.
keywordscharacterKeywords.
storycharacterStory.
premiumlogicalPremium.
is_live_bloglogicalIs live blog.
allow_commentslogicalAllow comments.
allow_searchlogicalAllow search.
allow_content_reactionslogicalAllow content reactions.
links_web_hrefcharacterLinks web href.
links_mobile_hrefcharacterLinks mobile href.
links_api_self_hrefcharacterLinks api self href.
links_app_sportscenter_hrefcharacterLinks app sportscenter href.

injuries

col_nametypedescription
injuriescharacterInjuries.
team_idcharacterTeam id.
team_uidcharacterTeam uid.
team_display_namecharacterTeam display name.
team_abbreviationcharacterTeam abbreviation.
team_linkscharacterTeam links.
team_logocharacterTeam logo.
team_logoscharacterTeam logos.

news

col_nametypedescription
idintegerId.
now_idcharacterNow id.
content_keycharacterContent key.
data_source_identifiercharacterData source identifier.
typecharacterType.
headlinecharacterHeadline.
descriptioncharacterDescription.
last_modifiedcharacterLast modified.
publishedcharacterPublished.
imagescharacterImages.
categoriescharacterCategories.
premiumlogicalPremium.
links_web_hrefcharacterLinks web href.
links_mobile_hrefcharacterLinks mobile href.
links_api_self_hrefcharacterLinks api self href.
links_app_sportscenter_hrefcharacterLinks app sportscenter href.
links_web_self_hrefcharacterURL for the canonical web page of the associated article or editorial content.
links_web_self_dsi_hrefcharacterData-source-identified URL for the web page of the associated article content.
links_api_artwork_hrefcharacterAPI endpoint URL for artwork or imagery associated with the article.
links_sportscenter_hrefcharacterURL for the article's page on ESPN's SportsCenter platform.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

espn_mlb_cdn_boxscore(game_id='401696358')

Last validated n/a.

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=20250115

API ParameterPythonPatternRequiredNullableDescription
datedateYSingle date (YYYYMMDD). Ignored by cfb and nfl, which are week-oriented. Defaults to today.
weekweekYWeek number (cfb and nfl).
yearseasonYSeason year that week belongs to (cfb and nfl).
seasontypeseason_typeYSeason 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_nametypedescription
game_idcharacterESPN event id.
uidcharacterESPN UID string.
datecharacterMatch start timestamp (ISO 8601, UTC).
namecharacterFull event name (e.g. 'Team A at Team B').
short_namecharacterAbbreviated event name (e.g. 'TA @ TB').
season_yearintegerSeason year string ('YYYY-YY' format).
season_typeintegerSeason-type id.
season_slugcharacterSeason slug.
status_type_idcharacterUnique identifier for status type.
status_type_namecharacterStatus type name.
status_type_statecharacterStatus state (pre/in/post).
status_type_completedlogicalWhether the game is complete.
status_type_descriptioncharacterStatus type description.
status_type_detailcharacterStatus type detail.
status_type_short_detailcharacterStatus type short detail.
status_clockdoubleGame clock in seconds.
status_display_clockcharacterStatus display clock.
status_periodintegerCurrent period.
neutral_sitelogicalWhether the match is played at a neutral venue.
conference_competitionlogicalConference competition.
attendanceintegerReported attendance (NA on the redesigned page).
venue_idcharacterMLBAM venue ID.
venue_full_namecharacterVenue full name.
venue_citycharacterVenue city.
venue_statecharacterVenue state / province.
venue_indoorlogicalWhether the home venue is indoors.
broadcastcharacterBroadcast information string.
notecharacterInjury status and description.
home_idcharacterUnique identifier for home.
home_namecharacterHome team display name.
home_abbreviationcharacterHome team's abbreviation.
home_display_namecharacterHome team display name.
home_locationcharacterHome team's location.
home_colorcharacterHome team primary color hex.
home_alternate_colorcharacterColor code (hex) for home alternate.
home_logocharacterHome team logo URL.
home_scorecharacterHome team's score. For cricket, the innings string (e.g. '161/5 (18/20 ov, target 156)').
home_winnerlogicalWhether the home team won.
home_rankcharacterHome team rank (if ranked).
away_idcharacterUnique identifier for away.
away_namecharacterAway team display name.
away_abbreviationcharacterAway team's abbreviation.
away_display_namecharacterAway team display name.
away_locationcharacterAway team's location.
away_colorcharacterAway team primary color hex.
away_alternate_colorcharacterColor code (hex) for away alternate.
away_logocharacterAway team logo URL.
away_scorecharacterAway team's score. For cricket, the innings string.
away_winnerlogicalWhether the away team won.
away_rankcharacterAway team rank (if ranked).

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

espn_mlb_cdn_schedule(date='20250115')

Last validated n/a.

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=20250115

API ParameterPythonPatternRequiredNullableDescription
datedateYSingle date (YYYYMMDD). Ignored by cfb and nfl, which are week-oriented. Defaults to today.
weekweekYWeek number (cfb and nfl).
yearseasonYSeason year that week belongs to (cfb and nfl).
seasontypeseason_typeYSeason 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_nametypedescription
game_idcharacterESPN event id.
uidcharacterESPN UID string.
datecharacterMatch start timestamp (ISO 8601, UTC).
namecharacterFull event name (e.g. 'Team A at Team B').
short_namecharacterAbbreviated event name (e.g. 'TA @ TB').
season_yearintegerSeason year string ('YYYY-YY' format).
season_typeintegerSeason-type id.
season_slugcharacterSeason slug.
status_type_idcharacterUnique identifier for status type.
status_type_namecharacterStatus type name.
status_type_statecharacterStatus state (pre/in/post).
status_type_completedlogicalWhether the game is complete.
status_type_descriptioncharacterStatus type description.
status_type_detailcharacterStatus type detail.
status_type_short_detailcharacterStatus type short detail.
status_clockdoubleGame clock in seconds.
status_display_clockcharacterStatus display clock.
status_periodintegerCurrent period.
neutral_sitelogicalWhether the match is played at a neutral venue.
conference_competitionlogicalConference competition.
attendanceintegerReported attendance (NA on the redesigned page).
venue_idcharacterMLBAM venue ID.
venue_full_namecharacterVenue full name.
venue_citycharacterVenue city.
venue_statecharacterVenue state / province.
venue_indoorlogicalWhether the home venue is indoors.
broadcastcharacterBroadcast information string.
notecharacterInjury status and description.
home_idcharacterUnique identifier for home.
home_namecharacterHome team display name.
home_abbreviationcharacterHome team's abbreviation.
home_display_namecharacterHome team display name.
home_locationcharacterHome team's location.
home_colorcharacterHome team primary color hex.
home_alternate_colorcharacterColor code (hex) for home alternate.
home_logocharacterHome team logo URL.
home_scorecharacterHome team's score. For cricket, the innings string (e.g. '161/5 (18/20 ov, target 156)').
home_winnerlogicalWhether the home team won.
home_rankcharacterHome team rank (if ranked).
away_idcharacterUnique identifier for away.
away_namecharacterAway team display name.
away_abbreviationcharacterAway team's abbreviation.
away_display_namecharacterAway team display name.
away_locationcharacterAway team's location.
away_colorcharacterAway team primary color hex.
away_alternate_colorcharacterColor code (hex) for away alternate.
away_logocharacterAway team logo URL.
away_scorecharacterAway team's score. For cricket, the innings string.
away_winnerlogicalWhether the away team won.
away_rankcharacterAway team rank (if ranked).

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

espn_mlb_cdn_scoreboard(date='20250115')

Last validated n/a.