Skip to main content

MLB — MLB Stats API — Schedule

mlb_schedule_postseason​

GET /api/v1/schedule/postseason — postseason-only schedule for a season.

Endpoint URL: GET https://statsapi.mlb.com/api/v1/schedule/postseason

Valid URL: https://statsapi.mlb.com/api/v1/schedule/postseason

API ParameterPythonPatternRequiredNullableDescription
seasonseasonYSeason year (e.g. 2024).
sportIdsport_idYsportId query parameter.
hydratehydrateYhydrate 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
schedule_datecharacterThe calendar date grouping postseason games in this response row, as returned by the MLB Stats API schedule endpoint.
game_pkintegerUnique game identifier.
game_guidcharacterGlobally unique game identifier (GUID).
linkcharacterAPI link to the game feed.
game_typecharacterGame type code (R, P, etc.).
seasoncharacterSeason year.
game_datecharacterGame date (YYYY-MM-DD).
official_datecharacterOfficial game date (YYYY-MM-DD).
is_tielogicalWhether the game ended in a tie.
is_featured_gamelogicalWhether the game is a featured game.
game_numberintegerGame number within a doubleheader.
public_facinglogicalWhether the game is public-facing.
double_headercharacterDoubleheader indicator ('N', 'S', 'Y').
gameday_typecharacterGameday data feed type.
tiebreakercharacterWhether the game is a tiebreaker.
calendar_event_idcharacterCalendar event identifier.
season_displaycharacterDisplay string for the season.
day_nightcharacterDay or night game indicator.
descriptioncharacterLong-form description text.
scheduled_inningsintegerScheduled number of innings.
reverse_home_away_statuslogicalWhether home/away teams are reversed.
inning_break_lengthintegerLength of inning breaks in seconds.
games_in_seriesintegerNumber of games in the series.
series_game_numberintegerGame number within the series.
series_descriptioncharacterDescription of the series.
record_sourcecharacterSource of the schedule record.
if_necessarycharacterWhether the game is played only if necessary.
if_necessary_descriptioncharacterDescription of the if-necessary status.
status_abstract_game_statecharacterAbstract game state (e.g. 'Final').
status_coded_game_statecharacterCoded game state.
status_detailed_statecharacterDetailed game state.
status_status_codecharacterStatus code for the game.
status_start_time_tbdlogicalWhether the start time is TBD.
status_abstract_game_codecharacterAbstract game state code.
teams_away_team_idintegerAway team MLBAM ID.
teams_away_team_namecharacterAway team name.
teams_away_team_linkcharacterAPI link to the away team.
teams_away_league_record_winsintegerAway team league-record wins.
teams_away_league_record_lossesintegerAway team league-record losses.
teams_away_league_record_tiesintegerAway team league-record ties.
teams_away_league_record_pctcharacterAway team winning percentage.
teams_away_scoreintegerAway team score.
teams_away_is_winnerlogicalWhether the away team won.
teams_away_split_squadlogicalWhether the away team is a split squad.
teams_away_series_numberintegerAway team's series number.
teams_home_team_idintegerHome team MLBAM ID.
teams_home_team_namecharacterHome team name.
teams_home_team_linkcharacterAPI link to the home team.
teams_home_league_record_winsintegerHome team league-record wins.
teams_home_league_record_lossesintegerHome team league-record losses.
teams_home_league_record_tiesintegerHome team league-record ties.
teams_home_league_record_pctcharacterHome team winning percentage.
teams_home_scoreintegerHome team score.
teams_home_is_winnerlogicalWhether the home team won.
teams_home_split_squadlogicalWhether the home team is a split squad.
teams_home_series_numberintegerHome team's series number.
venue_idintegerMLBAM venue ID.
venue_namecharacterVenue name.
venue_linkcharacterAPI link to the venue.
content_linkcharacterAPI link to the game content.

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

Example​

mlb_schedule_postseason()

Last validated n/a.

mlb_schedule_tied​

View tied game schedule info.

Endpoint URL: GET https://statsapi.mlb.com/api/v1/schedule/games/tied

Valid URL: https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016

API ParameterPythonPatternRequiredNullableDescription
gameTypesgame_typesYgameTypes query parameter.
seasonseasonYSeason year (e.g. 2024).
hydratehydrateYhydrate query parameter.
fieldsfieldsYfields 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
schedule_datecharacterThe calendar date grouping tied (suspended and resumed) games in this response row, as returned by the MLB Stats API schedule endpoint.
game_pkintegerUnique game identifier.
game_guidcharacterGlobally unique game identifier (GUID).
linkcharacterAPI link to the game feed.
game_typecharacterGame type code (R, P, etc.).
seasoncharacterSeason year.
game_datecharacterGame date (YYYY-MM-DD).
official_datecharacterOfficial game date (YYYY-MM-DD).
is_tielogicalWhether the game ended in a tie.
game_numberintegerGame number within a doubleheader.
public_facinglogicalWhether the game is public-facing.
double_headercharacterDoubleheader indicator ('N', 'S', 'Y').
gameday_typecharacterGameday data feed type.
tiebreakercharacterWhether the game is a tiebreaker.
calendar_event_idcharacterCalendar event identifier.
season_displaycharacterDisplay string for the season.
day_nightcharacterDay or night game indicator.
scheduled_inningsintegerScheduled number of innings.
reverse_home_away_statuslogicalWhether home/away teams are reversed.
inning_break_lengthintegerLength of inning breaks in seconds.
games_in_seriesintegerNumber of games in the series.
series_game_numberintegerGame number within the series.
series_descriptioncharacterDescription of the series.
record_sourcecharacterSource of the schedule record.
if_necessarycharacterWhether the game is played only if necessary.
if_necessary_descriptioncharacterDescription of the if-necessary status.
status_abstract_game_statecharacterAbstract game state (e.g. 'Final').
status_coded_game_statecharacterCoded game state.
status_detailed_statecharacterDetailed game state.
status_status_codecharacterStatus code for the game.
status_start_time_tbdlogicalWhether the start time is TBD.
status_reasoncharacterReason for the game status (e.g. 'Rain').
status_abstract_game_codecharacterAbstract game state code.
teams_away_team_idintegerAway team MLBAM ID.
teams_away_team_namecharacterAway team name.
teams_away_team_linkcharacterAPI link to the away team.
teams_away_league_record_winsintegerAway team league-record wins.
teams_away_league_record_lossesintegerAway team league-record losses.
teams_away_league_record_tiesintegerAway team league-record ties.
teams_away_league_record_pctcharacterAway team winning percentage.
teams_away_scoreintegerAway team score.
teams_away_split_squadlogicalWhether the away team is a split squad.
teams_away_series_numberintegerAway team's series number.
teams_home_team_idintegerHome team MLBAM ID.
teams_home_team_namecharacterHome team name.
teams_home_team_linkcharacterAPI link to the home team.
teams_home_league_record_winsintegerHome team league-record wins.
teams_home_league_record_lossesintegerHome team league-record losses.
teams_home_league_record_tiesintegerHome team league-record ties.
teams_home_league_record_pctcharacterHome team winning percentage.
teams_home_scoreintegerHome team score.
teams_home_split_squadlogicalWhether the home team is a split squad.
teams_home_series_numberintegerHome team's series number.
venue_idintegerMLBAM venue ID.
venue_namecharacterVenue name.
venue_linkcharacterAPI link to the venue.
content_linkcharacterAPI link to the game content.

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

Example​

mlb_schedule_tied(season='2016')

Last validated n/a.

mlb_schedule_postseason_series​

View schedule info for postseason based on series.

Endpoint URL: GET https://statsapi.mlb.com/api/v1/schedule/postseason/series

Valid URL: https://statsapi.mlb.com/api/v1/schedule/postseason/series?season=2023

API ParameterPythonPatternRequiredNullableDescription
gameTypesgame_typesYgameTypes query parameter.
seriesNumberseries_numberYseriesNumber query parameter.
teamIdteam_idYteamId query parameter.
sportIdsport_idYsportId query parameter.
seasonseasonYSeason year (e.g. 2024).
fieldsfieldsYfields 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
total_itemsintegerTotal schedule items on the date.
total_gamesintegerTotal games on the date.
total_games_in_progressintegerGames currently in progress on the date.
gamescharacterGames played.
sort_orderintegerDisplay sort order for the sport.
series_idcharacterSeries identifier (e.g. 'W_1').
series_sort_numberintegerSort number for the series.
series_is_defaultlogicalWhether the series is the default series.
series_game_typecharacterGame type code for the series.

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

Example​

mlb_schedule_postseason_series(season='2023')

Last validated n/a.

mlb_schedule_postseason_tunein​

View schedule info for the tuneIn application.

Endpoint URL: GET https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn

Valid URL: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?season=2023

API ParameterPythonPatternRequiredNullableDescription
teamIdteam_idYteamId query parameter.
sportIdsport_idYsportId query parameter.
seasonseasonYSeason year (e.g. 2024).
hydratehydrateYhydrate query parameter.
fieldsfieldsYfields query parameter.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_mlb_api_schedule); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

mlb_schedule_postseason_tunein(season='2023')

Last validated n/a.