MLB Records and Stats
MLB Records and Stats exposes Major League Baseball's current and historical statistics. Callers can search for a player by name, retrieve a player's biographical details and their season hitting, pitching, or fielding lines, list the players on a team's roster for a given season, list teams by league and division, and pull team standings and season records. Responses come back as JSON keyed by season and stat type. No credentials required.
What your agent can do with MLB Records and Stats
Triggers and actions 19 actions
- ActionFind schedule
Query the game schedule by sportId, teamId, date range, or gamePk(s). GET https://statsapi.mlb.com/api/v1/schedule
- ActionFind stats
Query player/team stats by stat type, group, season, and sortStat. GET https://statsapi.mlb.com/api/v1/stats
- ActionFind transactions
Query player transactions (trades, signings, DFA, etc.) by teamId, playerId, or date range. GET https://statsapi.mlb.com/api/v1/transactions
- ActionGet attendance
Get attendance figures by teamId, leagueId, or season/date. GET https://statsapi.mlb.com/api/v1/attendance
- ActionGet draft
Get MLB amateur draft picks by year, optionally filtered to prospects or the latest pick. GET https://statsapi.mlb.com/api/v1/draft/{year}
- ActionGet game boxscore
Get a game's full boxscore by gamePk. GET https://statsapi.mlb.com/api/v1/game/{gamePk}/boxscore
- ActionGet game linescore
Get a game's linescore (inning-by-inning) by gamePk. GET https://statsapi.mlb.com/api/v1/game/{gamePk}/linescore
- ActionGet game live feed
Get a game's full live feed (plays, boxscore, linescore combined) by gamePk. GET https://statsapi.mlb.com/api/v1/game/{gamePk}/feed/live
- ActionGet game play by play
Get all plays for a game by gamePk. GET https://statsapi.mlb.com/api/v1/game/{gamePk}/playByPlay
- ActionGet person
Get a single player/person's bio info by personId. GET https://statsapi.mlb.com/api/v1/people/{personId}
- ActionGet person stats
Get a player's stats for a specific game by personId and gamePk (or "current"). GET https://statsapi.mlb.com/api/v1/people/{personId}/stats/game/{gamePk}
- ActionGet standings
Get division/league standings by leagueId and season. GET https://statsapi.mlb.com/api/v1/standings
- ActionGet stats leaders
Get statistical leaders by leaderCategories, season, and league/sport. GET https://statsapi.mlb.com/api/v1/stats/leaders
- ActionGet team
Get a single MLB team's info by teamId. GET https://statsapi.mlb.com/api/v1/teams/{teamId}
- ActionGet team roster
Get a team's player roster by teamId. GET https://statsapi.mlb.com/api/v1/teams/{teamId}/roster
- ActionGet team stats
Get a team's season stats by teamId, season, and stat group. GET https://statsapi.mlb.com/api/v1/teams/{teamId}/stats
- ActionGet venue
Get venue info by venueIds. GET https://statsapi.mlb.com/api/v1/venues
- ActionList divisions
List MLB divisions, optionally filtered by leagueId/sportId/season. GET https://statsapi.mlb.com/api/v1/divisions
- ActionList leagues
List MLB leagues by sportId/leagueIds/seasons. GET https://statsapi.mlb.com/api/v1/league
No trigger or action matches that. Ask your agent to add it: it reads the API documentation and builds what you describe.
Not listed?
Need a trigger or action that is not here?
Ask your agent. Describe what you need in plain language and it reads the MLB Records and Stats API documentation, builds the operation at whatever depth the API allows, tests every branch and ships it. The list above is what exists today, not the limit.