API key Sign in, or get an instant trial key below — no signup required.

MLB

MLB API for Scores, Stats, Odds & AI Agents

One event graph for Major League Baseball — first-pitch schedules, inning-aware live scores, nine-book moneyline/run line/totals, public splits, baseball-native stats, and a market-anchored intelligence Price plane agents can reason over.

Available data

Everything below filters on the stable slug sport=mlb (league mlb). Discover seasons with GET /v1/seasons?sport=mlb and teams with GET /v1/teams?sport=mlb.

LayerEndpointMLB notes
Schedule / boardGET /v1/eventssport=mlb; status, date, include_odds / include_scores
Live scoreGET /v1/events/{id}/score · SSETop 7th / Bot 9th; clock is null
OddsGET …/odds · …/odds/historyTwo-way h2h, run line (spreads), totals · 9 books
SplitsGET …/splitsPre-game ticket% vs handle% (in-season)
Stats (Data)GET …/statsBaseball-native Path A — post-final box aggregates
IntelligenceGET …/intelligenceProbability plane + Price surface (blend_w=0)

MLB API / MLB odds API intent lives here. Odds are an H2 on this page — there is no separate thin /odds/mlb-odds-api until Search Console shows distinct demand. Cross-sport odds depth: /sports-odds-api.

Schedules

List the slate with GET /v1/events?sport=mlb. Narrow by status (scheduled / inprogress / final), date or from/to (max 90 days per request), and paginate with after_id / limit.

Daily MLB volume is high — use date windows and include_odds=true / include_scores=true to keep a night’s board to one round trip. Rain delays / postponements surface via event status fields.

Scores

MLB score payloads use baseball period labels — e.g. "Top 7th", "Bot 9th". Game clock is null (not in source for MLB).

  • GET /v1/events?sport=mlb&status=inprogress&include_scores=true — live board
  • GET /v1/events/{id}/score — lightweight poll (~15s cache while live)
  • GET /v1/events/{id}/stream — SSE event: score or signed webhooks

Cloneable pattern: live scoreboard use case (keep keys server-side).

Odds

MLB markets are two-way: moneyline (h2h), run line (spreads, typically ±1.5), and game totals. American odds integers; point is null on moneyline sides. Default single-book call is Pinnacle (1 credit); bookmaker=all is 2 credits.

GET /v1/events/{id}/odds/history returns recorded price/point moves between ingest cycles. No player props, team totals, or alternate lines in v1.

Full bookmaker list: Sports Odds API.

Stats (Data layer)

GET /v1/events/{id}/stats returns a baseball-native payload shaped for MLB box-score aggregates. Path A reads ingested box scores for completed games:

  • Season W/L record · recent form (W/L + runs scored/allowed)
  • Head-to-head · team batting/pitching rates
  • Starting pitcher season rates · lineup from the completed box

No confidence, narrative, or odds inside /stats. Expect useful aggregates primarily post-final; always check available. Pair with /intelligence when you want the market Price plane on the same ID.

Intelligence

MLB /intelligence is on the predictive probability / market-anchor shape. With blend_w=0, probability / fair_price are a vig-stripped market reference — not a model pick — and edge / tier stay null together.

Read the Price surface for cross-book line-shopping:

  • fair — sharp-consensus fair (Pinnacle + Circa when both quote)
  • edges_by_book — price gap vs fair.probability per soft book (not EV)
  • best — highest-gap book/price for line-shopping (Tier C informational)

Price ≠ Edge. A positive gap is not a bet recommendation. Always check available before reading bets.

Splits

GET /v1/events/{id}/splits — public ticket% vs handle% on moneyline, run line, and total, with consensus + per-book breakdown. Pre-game only; frozen after first pitch. 1 credit when available.

Sportsbooks

Odds keys: pinnacle, fanduel, draftkings, betmgm, caesars, bet365, circa, hardrock, betonline. Availability varies by event — check each bookmaker entry. MLB sharp fair for intelligence uses Pinnacle and Circa when both quote.

Splits use the same bookmaker slugs as odds under bookmakers[].bookmaker (e.g. draftkings, fanduel).

Examples

Today’s MLB schedule with odds inlined:

curl
curl "https://lumify.ai/v1/events?sport=mlb&status=scheduled&include_odds=true&limit=5" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
from lumify import Lumify

client = Lumify(api_key="YOUR_API_KEY")
page = client.events.list(
    sport="mlb",
    status="scheduled",
    include_odds=True,
    limit=5,
)
for event in page["events"]:
    print(event["id"], event["name"], event.get("odds"))
TypeScript
import { Lumify } from "@lumifyai/sdk";

const client = new Lumify({ apiKey: "YOUR_API_KEY" });
const { events } = await client.events.list({
  sport: "mlb",
  status: "scheduled",
  includeOdds: true,
  limit: 5,
});
events.forEach(e => console.log(e.id, e.name, e.odds));

Intelligence Price surface (1 credit when available):

curl
curl "https://lumify.ai/v1/events/8815/intelligence" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
intel = client.events.intelligence(8815)
if intel.get("available"):
    for bet in intel.get("bets") or []:
        print(
            bet.get("bet_type"),
            bet.get("probability"),
            bet.get("fair"),
            bet.get("best"),
        )
TypeScript
const intel = await client.events.intelligence(8815);
if (intel.available) {
  for (const bet of intel.bets ?? []) {
    console.log(bet.bet_type, bet.probability, bet.fair, bet.best);
  }
}

Post-final Data-layer stats:

curl
curl "https://lumify.ai/v1/events/8815/stats" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
stats = client.events.stats(8815)
if stats.get("available"):
    print(stats.get("league_slug"), stats.get("teams"))
TypeScript
const stats = await client.events.stats(8815);
if (stats.available) {
  console.log(stats.league_slug, stats.teams);
}

Sample odds shape (abridged MLB run line):

json
{
  "event_id": 8815,
  "available": true,
  "bookmakers": [
    {
      "bookmaker": "pinnacle",
      "markets": [
        {
          "key": "spreads",
          "label": "spread",
          "outcomes": [
            { "outcome": "New York Yankees", "price": -120, "point": -1.5 },
            { "outcome": "Boston Red Sox", "price": 100, "point": 1.5 }
          ]
        }
      ],
      "captured_at": "2026-08-10T17:05:00Z"
    }
  ]
}

Freshness

FeedCadenceFit
Live scores~1 minute (+ SSE/webhooks)Scoreboards, in-game agents
Odds ingest~30 minutes (2-min response cache)Research, line shop, alerts — not HFT
SplitsPre-game ingestStops updating after first pitch
StatsAfter box scores ingest (post-final)Data layer for completed games
IntelligenceAfter publish runsCheck available; Price quotes age-capped

Pricing

CallCredits
Most successful GETs (events, score, stats, intelligence, splits, …)1
Multi-book odds (bookmaker=all or a list)2
Compound include_odds / include_intelligence+1–2
available: false / errors0

Free Tier: 1,000 credits that never expire. Instant trial: 100 credits / 14 days, no signup. Details: /pricing.

For agents: machine-readable twin at /sports/mlb-api.md. MCP tools: list_events, get_odds, get_splits, get_stats, get_intelligence — setup at /sports-mcp-server.

FAQ

What does the MLB API include?

Filter with sport=mlb for schedules, live scores (Top/Bot innings), teams/players, multi-book moneyline / run line / totals, public betting splits, baseball-native /stats (Data layer), and predictive /intelligence with a sharp fair + cross-book Price surface. Same event IDs across every layer.

What shape is MLB intelligence?

MLB is on the probability / market-anchor plane (blend_w=0 today): vig-stripped market reference plus fair / edges_by_book / best for line-shopping against Pinnacle/Circa. That price gap is not expected value and not a pick. Tokens: ML_P1/ML_P2, SPREAD_* (run line), OVER/UNDER.

What is MLB /stats vs /intelligence?

/stats is the raw Data layer — season W/L, form, H2H, batting/pitching rates, starting pitcher season rates, lineup from completed box scores (post-final Path A). No scoring or narrative. /intelligence is judgment + market Price overlay on the same event IDs. Fetch both when you want aggregates alongside Lumify’s market plane.

Do you support MLB player props?

No player props, futures, or alternate lines on odds v1. Player box aggregates in /stats are foundation for future props — not a props market feed today.

How do MLB betting splits work?

GET /v1/events/{id}/splits returns public ticket% vs handle% for MLB pre-game — same coverage class as NBA/NHL/NFL. Splits stop updating once first pitch goes live. Pair with /odds and the intelligence Price surface for sharp-vs-public and cross-book context.

Start with the MLB API

Create a free key — or use an instant trial key with no signup — and pull today’s MLB slate with odds in under a minute.