MLB odds API · sport 3 · REST + WebSocket

MLB odds API.
Every book. One request.

Game lines, alternates, first-five and inning lines, team totals, player props, and futures from 25 books, on stable event IDs. Pull a REST snapshot or stream every change.

Free key · 20,000 data points a day · No credit card

GET/api/v2/sports/{sport_id}/events/{date}

RequestPython 3 · requests

import os
from datetime import datetime, timezone
import requests

key = os.environ["THERUNDOWN_API_KEY"]
api = "https://therundown.io/api/v2"
headers = {"X-TheRundown-Key": key}

# Next MLB game date: regular season (3), spring training (30),
# or postseason (31)
dates = requests.get(
    f"{api}/sports/dates",
    params={"sport_ids": "3,30,31", "format": "epoch"},
    headers=headers,
    timeout=30,
).json()

now = datetime.now(timezone.utc).timestamp()
upcoming = [
    (sport_id, stamp)
    for sport_id, body in dates.items()
    for stamp in body.get("dates") or []
    if stamp > now
]
sport_id, stamp = min(upcoming, key=lambda row: row[1], default=("3", now))
date = datetime.fromtimestamp(stamp, timezone.utc).date().isoformat()

# Moneyline, run line, and total from DraftKings, FanDuel, and BetMGM
odds = requests.get(
    f"{api}/sports/{sport_id}/events/{date}",
    params={"market_ids": "1,2,3", "affiliate_ids": "19,22,23", "main_line": "true"},
    headers=headers,
    timeout=30,
)
print(odds.text)

Response200 · trimmed

{
  "events": [{
    "event_id": "7fc43ca80a5a916682123a23559951b3",
    "sport_id": 31,
    "event_date": "2026-10-04T00:30:00Z",
    "markets": [{
      "market_id": 1,
      "name": "moneyline",
      "participants": [{
        "id": 38,
        "type": "TYPE_TEAM",
        "name": "Milwaukee Brewers",
        "lines": [{
          "prices": {
            "19": { "price": -209, "updated_at": "2026-10-03T21:18:28Z" },
            "22": { "price": -220, "updated_at": "2026-10-03T15:51:08Z" },
            "23": { "price": -210, "updated_at": "2026-10-03T15:07:06Z" }
          }
        }]
      }]
    }]
  }]
}

Padres at Brewers, 2026 postseason, trimmed to one side of one market. The full response held 2 games for 22 data points.

Free keyRuns on a Free key: pre-match prices from DraftKings, FanDuel, and BetMGM, five minutes delayed. Between seasons, the next slate can be empty until books post lines.

Markets

Every MLB market, not just the main line.

From the first-five run line to the next home run, every market comes back in the same events, markets, participants, lines, and prices shape, keyed to one event ID.

117
MLB market IDs
35
In-game markets
17
Player markets
9
Futures competitions
Market typePlan
  • Game linesMoneyline, run line, and total
    1 · 2 · 3Free
  • Alternate linesAlternate run lines, totals, and player lines
    omit main_lineStarter
  • First five inningsMoneyline, run line, total, and result
    769 · 791 · 780 · 795Starter
  • Innings1st inning runs and result; 1st 3 and 1st 7 innings; runs and result in every inning
    766 · 784 · 1109–1114 · 1359–1366 · 1459–1466Starter
  • Team totalsGame and first-five team totals, exact runs, first team to score
    94 · 95 · 1435 · 1130Starter
  • Player propsHits, total bases, home runs, RBIs, runs, stolen bases, walks; pitcher strikeouts, outs, hits allowed, and earned runs
    12 · 11 · 72 · 18 · 17 · 40 · 967 · 19 · 973 · 47 · 1121Starter
  • Player specialsFirst home run and pitcher walks
    826 · 1147Starter
  • Game propsWinning margin, extra innings, correct score, first scoring play, total runs bands, and parlays
    9 · 756 · 335 · 797 · 805 · 765 · 758Starter
  • In-gameLive game lines, team totals, player props, and the result of each inning
    41 · 42 · 43 · 96 · 980 · 1134 · 1135 · 1450Starter
  • FuturesWorld Series, pennant, and division winners; MVP, Cy Young, and Rookie of the Year; stat leaders
    /sports/3/futuresUltra

Market IDs served on MLB slates from August 15 to the October 5, 2026 postseason slate (GET /api/v2/sports/{3,31}/markets/{date}). GET /api/v2/markets lists every definition.

Books

All 25 books. One schema.

20 sportsbooks, 3 prediction markets, and 2 exchanges in one response shape. Pick yours with affiliate_ids.

25
Books
20
Sportsbooks
3
Prediction markets
2
Exchanges
Books in the API25

Sportsbooks · 20

  • DraftKingsFree19
  • FanDuelFree23
  • BetMGMFree22
  • Pinnacle3
  • Circa Sports32
  • BookMaker7
  • BetCRIS9
  • Bovada2
  • theScore Bet24
  • Unibet21
  • HardRock28
  • Bet10533
  • Heritage Sports34
  • BetOnline6
  • SportsBetting4
  • LowVig11
  • Bodog12
  • Intertops14
  • Matchbook16
  • YouWager18

Prediction markets · 3

  • Kalshi25
  • Polymarket26
  • Polymarket US31

Exchanges · 2

  • ProphetX29
  • Novig30

Live from GET /api/v2/affiliates. All 25 priced MLB postseason main lines for October 4, 2026. Coverage varies by league, game, and market.

Free vs paid

Start free. Pay when you go live.

Free · $0

Pre-match moneyline, run line, and total from DraftKings, FanDuel, and BetMGM, five minutes delayed.

Paid · from $49/mo

Every book, alternates, periods, props, live in-game odds, and history from $49 a month. Futures and WebSocket on Ultra.

Free$0/mo5-minute delay · 20,000/day · 200,000/monthPre-match game lines from DraftKings, FanDuel, and BetMGM.
Starter$49/mo60-second delay · 25,000,000/moEvery book, alternates, periods, props, and live odds. 7-day history. Internal use.
Pro$149/mo30-second delay · 125,000,000/moOpening and closing lines, 30-day history, and commercial display.
Ultra$399/moReal-time · 500,000,000/moWebSocket streaming, futures, and 90-day history.

Compare every plan →

Questions

Before you build.

Plans, markets, books, and IDs for the MLB odds API.

Is there a free MLB odds API?
Yes. A free TheRundown key returns pre-match MLB moneylines, run lines, and totals from DraftKings, FanDuel, and BetMGM, five minutes delayed, up to 20,000 data points a day and 200,000 a month. No credit card.
Which MLB markets does the API cover?
Moneylines, run lines, and totals; alternate lines; first-five lines; 1st inning, 1st 3, and 1st 7 inning markets plus runs and result in every inning; team totals; 17 player markets, from hits to pitcher strikeouts; game props like extra innings and correct score; 35 in-game markets; and futures for the World Series, pennants, divisions, MVP, Cy Young, Rookie of the Year, and stat leaders. Free covers pre-match game lines. The rest starts on Starter ($49 a month), and futures on Ultra.
Which sportsbooks does the MLB odds API cover?
All 25 books in the API, including DraftKings, FanDuel, BetMGM, Pinnacle, Circa Sports, and BookMaker, plus Kalshi, Polymarket, Polymarket US, ProphetX, and Novig. Paid plans include all of them. Free includes three.
What is the MLB sport ID?
3 for the regular season. Spring training is 30 and the postseason is 31. The request above checks all three and pulls the next slate.
Can I show MLB odds in my app?
Starter covers internal and personal use. Showing odds to users of a commercial product starts on Pro ($149 a month).