MLB Starting Lineups & Probable Pitchers API + Change Alerts
Pricing
Pay per event
MLB Starting Lineups & Probable Pitchers API + Change Alerts
Daily MLB schedule with probable pitchers and starting lineups as clean JSON, plus change alerts diffed against the previous run: pitcher changes, lineups first posted, batting-order swaps. Optional webhook. Run on a schedule. Unofficial; data (c) MLB Advanced Media.
Pricing
Pay per event
Rating
0.0
(0)
Developer
kyle herman
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Get today's MLB starting lineups and probable pitchers as clean, normalized JSON — plus automatic change alerts every time you run it. This actor is a scheduled-run-friendly mlb lineups api: it fetches the daily MLB schedule (hydrated with probable pitchers and posted lineups), emits one row per game, and diffs against the previous run's snapshot to detect:
- 🔁 Probable pitcher changed (scratches, swaps)
- 📋 Lineup first posted (the moment a starting lineup drops)
- 🔀 Lineup player changed (late swaps, batting-order changes)
Perfect for fantasy baseball tools, DFS pipelines, betting models, Discord/Slack bots, and anyone searching for an mlb starting lineup api, probable pitchers api, or mlb lineup alerts feed without scraping.
How it works
- Fetches the MLB StatsAPI daily schedule for today (plus optional
days_aheadextra days). - Emits one
lineup-rowper game: teams, status, probable pitchers, and full home/away starting lineups (with batting order and positions) when posted. Before lineups are posted,home_lineup/away_lineupare empty arrays andlineups_postedisfalse— that's normal pre-game. - Diffs each game against the previous run's snapshot (stored per-game in the named key-value store
mlb-lineups-snapshots) and emitschange-alertrows. - Optionally POSTs alerts to your
webhook_url.
Run it on a schedule (e.g. every 10–15 minutes on game days) to catch lineups the moment they're posted and pitchers the moment they're scratched.
Input
All fields optional — {} works out of the box.
| Field | Type | Default | Description |
|---|---|---|---|
days_ahead | integer | 0 | Extra days of schedule beyond today (max 7). |
webhook_url | string | "" | If set, alerts are POSTed there as {"alerts": [...]}. |
include_unchanged | boolean | true | When false, only change-alert rows are pushed (alert-only mode). |
Output
lineup-row (one per game)
{"type": "lineup-row","gamePk": 823337,"game_date": "2026-09-03T16:35:00Z","status": "Scheduled","home_team": "Pittsburgh Pirates","away_team": "San Francisco Giants","home_probable_pitcher": { "id": 669199, "name": "Lake Bachar" },"away_probable_pitcher": { "id": 694918, "name": "Blade Tidwell" },"home_lineup": [{ "id": 699302, "name": "Héctor Rodríguez", "position": "RF", "batting_order": 1 }],"away_lineup": [],"lineups_posted": false,"fetched_at": "2026-09-03T02:55:41Z"}
change-alert (one per detected change)
{"type": "change-alert","gamePk": 822853,"change_kind": "probable_pitcher_changed","field": "home_probable_pitcher","old_value": "Old Guy","new_value": "Cal Quantrill","detected_at": "2026-09-03T02:56:08Z"}
change_kind values: probable_pitcher_changed, lineup_posted, lineup_player_changed. For lineup_posted, new_value is a human-readable batting order (["1. Player (RF)", ...]); for player changes, field includes the batting slot (e.g. home_lineup[3]).
The first time a game is seen, it seeds the baseline — alerts start from the second run onward.
Pricing (pay per event)
lineup-row— one normalized game row pushedchange-alert— one detected change pushed
Notes & attribution
- Off-days / offseason: zero games is handled gracefully (nothing pushed).
- This actor is unofficial and not affiliated with, endorsed by, or sponsored by MLB. Data is sourced from the public MLB StatsAPI and is subject to MLB's terms: data © MLB Advanced Media, L.P. ("Copyright 2026 MLB Advanced Media, L.P. Use of any content on this page acknowledges agreement to the terms posted at http://gdx.mlb.com/components/copyright.txt"). Use for personal, non-commercial informational purposes per MLBAM's notice.