MLB Stats API Docs

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

Endpoints

Sport

Sports, leagues, and divisions — the org structure.

  • /api/v1/sportsSportsAll sports/levels and their ids.
  • /api/v1/divisionsDivisionsDivisions, optionally filtered by league or sport.
  • /api/v1/leaguesLeaguesLeagues and their season/structure metadata.

Schedule

Games by date, team, or season.

  • /api/v1/scheduleScheduleGames for a date, date range, team, or season.
  • /api/v1/schedule/postseasonPostseason schedulePostseason games for a season.

Game

Live feeds (GUMBO), box scores, and play-by-play.

  • /api/v1.1/game/{gamePk}/feed/liveLive game feed (GUMBO)The complete real-time state of a game.
  • /api/v1/game/{gamePk}/boxscoreBoxscorePer-team batting/pitching/fielding box score.
  • /api/v1/game/{gamePk}/linescoreLinescoreRuns by inning, plus current inning/outs/baserunners.
  • /api/v1/game/{gamePk}/contentGame contentEditorial, media, and highlight content for a game.
  • /api/v1/game/{gamePk}/contextMetricsContext metricsWin probability and situational metrics for current state.
  • /api/v1/game/{gamePk}/winProbabilityWin probabilityPer-play win probability across the game.
  • /api/v1/game/{gamePk}/playByPlayPlay-by-playEvery play and pitch event for a game.
  • /api/v1/game/changesGame changesGames updated since a given timestamp.
  • /api/v1/gamePaceGame pacePace-of-play metrics by team/league for a season.

Teams

Team listings, rosters, coaches, and franchise history.

  • /api/v1/teamsList teamsAll teams for a sport and (optionally) a season.
  • /api/v1/teams/{teamId}Get team by idA single team by its id.
  • /api/v1/teams/{teamId}/rosterTeam rosterPlayers on a team for a season or roster type.
  • /api/v1/teams/{teamId}/coachesTeam coachesCoaching staff for a team and season.
  • /api/v1/teams/{teamId}/historyTeam historyA franchise across its seasons (name/location changes).
  • /api/v1/teams/{teamId}/affiliatesTeam affiliatesA club’s minor-league affiliates.

People

Players, coaches, and umpires — bios and stats.

  • /api/v1/people/{personId}Get personA player, coach, or umpire by id.
  • /api/v1/people/{personId}/statsPerson statsA person’s stats for a type, group, and season.
  • /api/v1/people/{personId}/stats/game/{gamePk}Person game statsA person’s stat line for a single game.
  • /api/v1/people/freeAgentsFree agentsFree agents for a season.
  • /api/v1/people/changesPeople changesPeople records updated since a timestamp.
  • /api/v1/people/searchSearch peopleFind people by name.

Standings

Division and league standings.

  • /api/v1/standingsStandingsStandings for one or more leagues and a season.

Stats

Statistical queries and leaderboards.

  • /api/v1/statsStatsFlexible stat queries across players/teams.
  • /api/v1/stats/leadersStat leadersLeaderboards for a stat category.

Other

Seasons, venues, draft, transactions, and more.

  • /api/v1/seasonsSeasonsKey dates for a season (or all seasons).
  • /api/v1/venuesVenuesBallparks and their ids.
  • /api/v1/draft/{year}DraftDraft picks for a year, by round.
  • /api/v1/transactionsTransactionsRoster moves over a date range.
  • /api/v1/jobs/{jobType}JobsPeople holding a job type (umpires, datacasters, …).
  • /api/v1/uniforms/gameGame uniformsUniform assignments for one or more games.
  • /api/v1/attendanceAttendanceAttendance totals for a team and season(s).

Meta

Enumerations: stat types, game statuses, and game types.