STAT-API
MLB

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.

38
MLB tables
6.4M
Pitches tracked
1.7M
At-bats
9
Seasons deep
Quickstart

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": ... }
What's inside

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.

Questions

MLB API questions, answered.

Is there a free MLB API?

Yes — stat-api offers a free preview with sample cut-off data 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 preview.

Explore sample data across every league, no card required. The full MLB reference has live, runnable examples for all 38 tables.