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
https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=2026-06-29const 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
| Name | Type | Required | Description |
|---|---|---|---|
sportId | number | no | Sport id. |
date | date | no | Single day, |
startDate | date | no | Range start, |
endDate | date | no | Range end, |
teamId | number | no | Limit to a single team. |
gameType | RSEAFDLW | no | Regular, Spring, Exhibition, All-Star, and postseason rounds. |
hydrate | csv | no | e.g. |
fields | csv | no | Comma-separated field paths to keep (trims the response), e.g. |
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 emptydatesarray.Use
hydrate=linescoreto 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