MLB Stats API Docs

Type to search endpoints by name, path, or keyword.

GET/api/v1/schedule

Schedule

Games for a date, date range, team, or season.

The primary way to discover gamePk values. Returns games grouped by date. Combine sportId with date (single day) or startDate + endDate (range), and optionally teamId.

On this page

Try it

Query
https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=2026-06-29
const res = await fetch('https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=2026-06-29')
const data = await res.json()
curl -s 'https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=2026-06-29'

Reference

Query parameters

NameTypeRequiredDescription
sportIdnumberno

Sport id. 1 is MLB.

datedateno

Single day, YYYY-MM-DD.

startDatedateno

Range start, YYYY-MM-DD. Requires endDate.

endDatedateno

Range end, YYYY-MM-DD. Requires startDate.

teamIdnumberno

Limit to a single team.

gameTypeRSEAFDLWno

Regular, Spring, Exhibition, All-Star, and postseason rounds.

hydratecsvno

e.g. team,linescore,probablePitcher.

fieldscsvno

Comma-separated field paths to keep (trims the response), e.g. dates,games,gamePk.

Response

Type: ScheduleResponse

/** `GET /api/v1/schedule` */
export interface ScheduleResponse extends WithCopyright {
	totalItems: number
	totalEvents: number
	totalGames: number
	totalGamesInProgress: number
	dates: ScheduleDate[]
}

Notes

  • Games are nested under dates[].games[]; a day with no games still returns an empty dates array.

  • Use hydrate=linescore to get scores without a second request.

Build with it

Live examples powered by this endpoint with real data. Inspiration — restyle and remix freely.

Live scoreboard

A grid of mini scorebugs for the day’s slate — live games tick along on their own.

Loading the schedule…

Example URLs

  • All MLB games today: https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=2026-06-29
  • Dodgers games in a date range: https://statsapi.mlb.com/api/v1/schedule?sportId=1&teamId=119&startDate=2026-06-22&endDate=2026-06-29