The MLB stats API
Pitch-by-pitch detail, Statcast at-bats, park factors, umpires, weather, and betting lines — every MLB game from spring training through the World Series, nine seasons deep, one Bearer token away.
One call to the season.
Plain REST over HTTPS, keyset pagination, JSON out. The response below is real — the first row of the 2025 season list is a World Series game.
curl "https://api.stat-api.com/api/v1/mlb/games?season_id=2025" \
-H "Authorization: Bearer YOUR_API_KEY"
# → { "games": [ {
# "id": 2920,
# "game_time": "2025-11-02T00:00:00+00:00",
# "game_type": "W", "status": "Final",
# ... 31 fields per row
# } ], "next_from_id": ... }
Down to the pitch.
Pitch-by-pitch & Statcast
6.4M pitches and 1.7M at-bats with Statcast exit velocity, launch angle, and release metrics — the raw event stream, not a box-score summary.
Park factors, venues & weather
Park factors, venue dimensions, roof state, and game weather already joined to the matchup — the context run environments are made of.
Umpires, lineups & run environments
Umpire assignments, starting lineups, wOBA weights, and run-environment context per game.
Betting lines, awards & injuries
Game lines keyed to the games they price, plus awards, injuries, and player news.
MLB API questions, answered.
Is there a free MLB API?
Yes — the stat-api free tier includes 50,000 records a month across every league, MLB included, with no card required. Paid tiers start at $49/mo for 5M records.
Does the MLB API include pitch-by-pitch data?
Yes — 6.4M tracked pitches and 1.7M at-bats with Statcast metrics (exit velocity, launch angle) from the 2018 season forward.
Does it include park factors and weather?
Yes — park factors, venue dimensions, and per-game weather, already joined to the matchup, alongside umpire assignments and run-environment context.
Can AI agents and assistants use it?
Yes — an MCP server at api.stat-api.com/mcp (catalog tools need no key), a full OpenAPI 3.1 spec, a public GraphQL schema, and llms.txt. Any MCP client — Claude, ChatGPT, or your own agent — can query MLB data directly.
Start with the free tier.
50,000 records a month, every league, no card. The full MLB reference has live, runnable examples for all 38 tables.