MLB Stats API Scraper — Schedules, Standings & Transactions
Independent tool. Trademarks referenced on this page are the property of their respective owners and are used only to identify the public website this tool reads. No affiliation or endorsement.
MLB Stats API Scraper — Schedules, Standings & Transactions
Pull game schedules and box scores, division and wild-card standings, and roster transactions from the official MLB Stats API (statsapi.mlb.com). Three modes in one actor, across any date range and game type — regular season, spring training, and postseason.
What this actor does
- Schedule mode — Pulls box scores and game results for any date range. Includes home/away teams, scores, winning/losing/save pitchers, venue, and game status.
- Standings mode — Snapshots current AL and NL division standings including wild-card race position (
wildCardRank,wildCardGamesBack, wins/losses). - Transactions mode — Streams roster moves (trades, DFA, call-ups, options) from the
/transactionsendpoint for any date window. Useful year-round, not only at the deadline.
Input
| Field | Type | Default | Description |
|---|---|---|---|
mode |
string | schedule |
schedule, standings, or transactions |
startDate |
string | today | Start date YYYY-MM-DD (schedule / transactions) |
endDate |
string | startDate | End date YYYY-MM-DD (schedule / transactions) |
leagueIds |
string | 103,104 |
League IDs for standings (103=AL, 104=NL) |
gameType |
string | R |
Game type: R=Regular, S=Spring, E=Exhibition, D=Division Series |
maxItems |
integer | 10 | Maximum records to return (0 = no limit) |
Output schema
Every record shares the same 17-field flat schema regardless of mode:
| Field | Notes |
|---|---|
game_pk |
MLB game ID (or transaction ID) |
game_date |
Date YYYY-MM-DD |
game_type |
R / standings / transaction |
season |
MLB season year |
home_team / home_team_abbrev |
Home team name and abbreviation |
home_score |
Runs scored (home) — wins count in standings mode |
away_team / away_team_abbrev |
Away team or division rank in standings mode |
away_score |
Runs scored (away) — losses in standings mode |
venue |
Ballpark name — games back in standings mode |
status |
Game status or wild-card games back |
winning_pitcher |
WP name (Final games) — wild-card rank in standings |
losing_pitcher |
LP name (Final games) — games played in standings |
save_pitcher |
Save pitcher name if applicable |
home_runs_total |
Total HRs in game (when available) |
source |
statsapi.mlb.com/schedule | /standings | /transactions |
Trade deadline use case
The July 31 trade deadline is the highest-traffic period in baseball analytics. Set mode: transactions with startDate: 2026-07-28 and endDate: 2026-08-01 to capture every roster move in the deadline window:
{
"mode": "transactions",
"startDate": "2026-07-28",
"endDate": "2026-08-01",
"maxItems": 0
}
Pennant race use case
Track the wild-card standings as the pennant race heats up in August and September:
{
"mode": "standings",
"leagueIds": "103,104",
"maxItems": 0
}
API details
- Source:
https://statsapi.mlb.com/api/v1/(official MLB Stats API) - Authentication: none required — fully open public API
- Rate limits: generous; actor uses a 150ms courtesy delay