MLB odds API

MLB prices, markets and identifiers through one REST API.

The MLB has the league key mlb in the SockOdds API. It is a baseball league based in the United States (sport key baseball). Its events have a home and an away team.

Request MLB odds

Current prices for the next MLB game, one market, from every bookmaker your plan includes:

curl -sS "https://api.sockodds.com/v1/odds?league=mlb&markets=winner&limit=1&starts_after=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
  -H "Authorization: Bearer $SOCKODDS_API_KEY"
const response = await fetch(`https://api.sockodds.com/v1/odds?league=mlb&markets=winner&limit=1&starts_after=${new Date().toISOString().slice(0, 19)}Z`, {
  headers: { Authorization: `Bearer ${process.env.SOCKODDS_API_KEY}` },
});
console.log(JSON.stringify(await response.json(), null, 2));
import json, os, urllib.request
from datetime import datetime, timezone

request = urllib.request.Request(
    f"https://api.sockodds.com/v1/odds?league=mlb&markets=winner&limit=1&starts_after={datetime.now(timezone.utc):%Y-%m-%dT%H:%M:%SZ}",
    headers={"Authorization": "Bearer " + os.environ["SOCKODDS_API_KEY"]},
)
with urllib.request.urlopen(request) as response:
    print(json.dumps(json.load(response), indent=2))

Response from a local copy of the API with invented test prices

{
  "data": [
    {
      "id": "ev_000ckk07g84c",
      "name": "Arizona Diamondbacks v Athletics",
      "league": {
        "key": "mlb",
        "name": "MLB"
      },
      "scheduled_start": "2026-10-16T15:00:00.000Z",
      "status": "scheduled",
      "participants": [
        {
          "role": "away",
          "identity": {
            "key": "athletics",
            "name": "Athletics"
          }
        },
        {
          "role": "home",
          "identity": {
            "key": "arizona_diamondbacks",
            "name": "Arizona Diamondbacks"
          }
        }
      ],
      "markets": [
        {
          "id": "mk_gwhzq5xhezbxy2c9",
          "key": "winner",
          "name": "Winner",
          "period": "full",
          "subject": null,
          "alternate": false,
          "outcomes": [
            {
              "id": "oc_xxxs7pk4pasrj24e",
              "name": "Arizona Diamondbacks",
              "side": "home",
              "line": null,
              "prices": [
                {
                  "bookmaker": "bally_bet",
                  "decimal_odds": 1.81,
                  "implied_probability": 0.552486,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "thescore_bet",
                  "decimal_odds": 1.81,
                  "implied_probability": 0.552486,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "fanduel",
                  "decimal_odds": 1.77,
                  "implied_probability": 0.564972,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "unibet",
                  "decimal_odds": 1.77,
                  "implied_probability": 0.564972,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "betrivers",
                  "decimal_odds": 1.74,
                  "implied_probability": 0.574713,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "draftkings",
                  "decimal_odds": 1.72,
                  "implied_probability": 0.581395,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "sportsbet",
                  "decimal_odds": 1.72,
                  "implied_probability": 0.581395,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "dabble",
                  "decimal_odds": 1.69,
                  "implied_probability": 0.591716,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "hard_rock_bet",
                  "decimal_odds": 1.69,
                  "implied_probability": 0.591716,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "betmgm",
                  "decimal_odds": 1.65,
                  "implied_probability": 0.606061,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                }
              ]
            },
            {
              "id": "oc_f1y2anpw86sffn86",
              "name": "Athletics",
              "side": "away",
              "line": null,
              "prices": [
                {
                  "bookmaker": "bally_bet",
                  "decimal_odds": 2.23,
                  "implied_probability": 0.44843,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "thescore_bet",
                  "decimal_odds": 2.23,
                  "implied_probability": 0.44843,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "fanduel",
                  "decimal_odds": 2.18,
                  "implied_probability": 0.458716,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "unibet",
                  "decimal_odds": 2.18,
                  "implied_probability": 0.458716,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "betrivers",
                  "decimal_odds": 2.14,
                  "implied_probability": 0.46729,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "draftkings",
                  "decimal_odds": 2.12,
                  "implied_probability": 0.471698,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "sportsbet",
                  "decimal_odds": 2.12,
                  "implied_probability": 0.471698,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "dabble",
                  "decimal_odds": 2.08,
                  "implied_probability": 0.480769,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "hard_rock_bet",
                  "decimal_odds": 2.08,
                  "implied_probability": 0.480769,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                },
                {
                  "bookmaker": "betmgm",
                  "decimal_odds": 2.04,
                  "implied_probability": 0.490196,
                  "available": true,
                  "observed_at": "2026-10-15T07:58:00.000Z"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "meta": {
    "count": 1,
    "cursor": null
  },
  "links": {
    "next": null
  }
}

Prices are decimal and exactly as each bookmaker showed them, with the time we saw them. A price older than ten minutes is withheld rather than shown as current.

Bookmakers

19 bookmakers deliver MLB prices through v1 as of 30 October 2026: Sportsbet, Unibet, Dabble, DraftKings, FanDuel, BetMGM, Kalshi, Polymarket, Bally Bet, BearBet, BetFocus, BetRivers, CashCage, Hard Rock Bet, LightningBet, Mintbet, ProphetX, TABtouch and theScore Bet.

MLB markets

19 market types are defined for the MLB. Ask for any of them with markets=; a bookmaker quotes the markets it offers for each game.

Game markets

MarketKeySidesLinePeriods
Winnerwinnerhome, away, competitor_1, competitor_2Nofull, innings_1_to_5
Result (with the draw)resulthome, draw, awayNofull, inning_1, innings_1_to_5
Handicaphandicaphome, away, competitor_1, competitor_2Yesfull, innings_1_to_5
Total runstotal_runsover, underYesfull, innings_1_to_5, inning_1

Team markets

MarketKeySidesLinePeriods
Team runs over/underteam_runs_over_underover, underYesfull, innings_1_to_5, inning_1

Player markets

MarketKeySidesLinePeriods
Player hits over/underplayer_hits_over_underover, underYesfull
To hit a home runplayer_home_runs_anytimeyes, noNofull
Player home runs over/underplayer_home_runs_over_underover, underYesfull
Player hits + runs + runs batted in over/underplayer_hits_runs_runs_batted_in_over_underover, underYesfull
Player total bases over/underplayer_total_bases_over_underover, underYesfull
Player runs batted in over/underplayer_runs_batted_in_over_underover, underYesfull
Player runs over/underplayer_runs_over_underover, underYesfull
Player strikeouts (as a batter) over/underplayer_strikeouts_over_underover, underYesfull
Pitcher strikeouts thrown over/underplayer_strikeouts_thrown_over_underover, underYesfull
Pitcher hits allowed over/underplayer_hits_allowed_over_underover, underYesfull
Pitcher earned runs allowed over/underplayer_earned_runs_allowed_over_underover, underYesfull
Pitcher outs recorded over/underplayer_outs_recorded_over_underover, underYesfull
Player stolen bases over/underplayer_stolen_bases_over_underover, underYesfull
Player batter walks over/underplayer_walks_over_underover, underYesfull

Periods

full (Full match), innings_1_to_5 (First five innings) and inning_1 (First inning).

Plans

The free Developer plan includes the MLB, with Sportsbet. Rookie and Pro include every league, and Pro adds recorded price history, from 24 March 2026 for the MLB. See pricing.

Search across the SockOdds documentation and catalogue.