Overview
This page documents all MLB Stats API endpoints available in the application. Each endpoint includes a description, required parameters, and common use cases.All endpoints are relative to the base URL:
https://statsapi.mlb.comSport
List Sports
Get Divisions
Filter by league:
103 (AL), 104 (NL)Year for division alignment
Get Leagues
Comma-separated league IDs
Schedule
Get Schedule
Sport ID (1=MLB)
Specific date (YYYY-MM-DD)
Start of date range
End of date range
Filter by team ID
Filter by venue ID(s)
Field filtering (e.g.,
"dates,games,officialDate,teams,team,name")Get Postseason Schedule
Filter by game type:
W (World Series), L (LCS), D (LDS)Postseason year
Filter by team ID
Game
Get Live Game Feed
Game primary key (e.g.,
813024)Get game state at specific time (format:
YYYYMMDD_HHMMSS)Field filtering
Get Boxscore
Game primary key
Get Linescore
Game primary key
Get Game Content
Game primary key
Get Context Metrics
Game primary key
Get Win Probability
Game primary key
Get Play by Play
Game primary key
Get Game Changes
Sport ID
ISO date to check for updates
Get Game Pace
Sport ID
Season year
Teams
List Teams
Filter by sport ID
Filter by season year
Get Team Details
Team ID (e.g.,
119 for Dodgers)Get Team Roster
Team ID
Season year for roster
Set to
"person" to include player detailsGet Team Coaches
Team ID
Season year for coaching staff
Get Team History
Team ID
Get Team Affiliates
Team ID
People
Get Person Details
Player ID (e.g.,
660271 for Shohei Ohtani)Add related data (e.g.,
"currentTeam")Get Person Stats
Player ID
Stat type:
season, career, hotColdZonesStat group:
hitting, pitching, fieldingComma-separated years or single year
Filter by game type:
R (regular), P (playoffs)Get Person Game Stats
Player ID
Game primary key
Get Free Agents
Offseason year
Get People Changes
ISO date to check for updates
Search People
Player name or partial name
Standings
Get Standings
League ID:
103 (AL), 104 (NL), 103,104 (both)Season year
Stats
Get Stats
Stat type:
season, careerStat group:
hitting, pitching, fieldingSeason year
Get Leaders
Stat category:
homeRuns, battingAverage, earnedRunAverage, etc.Game type:
R (regular season), P (playoffs)Stat group:
hitting, pitchingSeason year
Other
Get Seasons
Sport ID
Season year
Get Venues
Comma-separated venue IDs
Get Draft
Draft year
Get Transactions
Sport ID
Filter by team ID
Filter by player ID
Specific date
Start of date range
End of date range
Get Jobs
Job type:
umpires, officialScorers, datacastersDate for assignments
Get Uniforms
Comma-separated game IDs
Get Attendance
Team ID
Season year