# MLB Odds API | MLB Odds, Player Props & Results
URL: https://sockodds.com/leagues/mlb-odds-api/

> Our MLB odds API delivers MLB odds, player props and results for every game from 25 bookmakers, 21 Australian. Free tier available.

Our MLB odds API delivers Major League Baseball odds, player props, status and results for every game from 25 bookmakers, 21 of them Australian. `leagueID=MLB`. Free tier available.

Whether you're building a betting app, an odds comparison tool or a pricing model, the MLB odds API gives you structured data in the SportsGameOdds v2 shape so you can move fast.

## MLB Odds API Features

Every endpoint is filterable, so you pull exactly the markets you need. Coverage spans 30 teams and 85 events currently carried, with 85 market families.

Available MLB betting markets include:

- Head to head / moneylines (2-way and 3-way markets)
- Lines, spreads and handicaps
- Totals (over/under)
- Alternative lines
- Player props and game props
- Period-specific markets (`1h`, `1i`, `1ix3`, `1ix5`, `1ix7`, `2i`, `3i`, `4i`, `5i`, `6i`, `7i`, `8i`, `lead2i`, `lead3i`, `lead4i`, `lead5i`, `lead6i`, `lead7i`, `reg`)

All market data is pre-match, refreshed every ~2 minutes; see [pricing](https://sockodds.com/pricing/) for what each plan can see.

## MLB Player Props API

Access 36 MLB player proposition markets through the same endpoint — Points / score, RBIs, Hits, Doubles, Singles, Home runs — for every player the books price. See the [player prop odds API](https://sockodds.com/player-props-odds-api/) for the market list across every sport.

Filter by `playerID`, stat type or bookmaker to return only the props you need.

## MLB Odds API with Results

SockOdds delivers MLB odds and event data together in one response — no need to stitch data from multiple sources. Each response includes:

- Upcoming MLB events with status flags
- Home and away team data with ids
- Players with production ids where present
- Full odds coverage: lines, totals, head to head, props and alternative lines
- Results and `scoringSupported` flags where the source grades

Line movement tracking is yours to build: every bookmaker entry carries `lastUpdatedAt`, and finished events are retained.

## Quick start: your first MLB odds API call

Getting MLB odds takes a single HTTP request:

```
https://api.sockodds.com/v2/events?apiKey=YOUR_API_KEY&oddsAvailable=true&leagueID=MLB&limit=10
```

This returns all available markets — lines, totals, head to head and props — for upcoming MLB events.

To narrow to a specific market, use the `oddID` parameter, with `PLAYER_ID` standing for every player:

```
https://api.sockodds.com/v2/events?apiKey=YOUR_API_KEY&oddsAvailable=true&leagueID=MLB&oddID=points-PLAYER_ID-game-ou-over&includeOpposingOdds=true
```

OddIDs follow the format `{statID}-{statEntityID}-{periodID}-{betTypeID}-{sideID}`, where the entity is a player for props and `home`, `away` or `all` for team and game markets.

Tips to keep responses fast:

- Add `bookmakerID=sportsbet,neds` to limit to the bookmakers you care about
- Use `includeOpposingOdds=true` so you only need to specify one side of a market
- Keep your `oddID` list tight — only request markets you're actively using

### What a MLB response looks like

Every event returns an `odds` object keyed by `oddID`. Here's a real market from the feed with the bookmaker list cut to two books:

```json
{
  "eventID": "mlb_2026-09-01_arizona_diamondbacks_vs_philadelphia_phillies",
  "leagueID": "MLB",
  "odds": {
    "points-all-game-eo-odd": {
      "oddID": "points-all-game-eo-odd",
      "opposingOddID": "points-all-game-eo-even",
      "marketName": "Odd/Even Total Runs",
      "statID": "points",
      "statEntityID": "all",
      "periodID": "game",
      "betTypeID": "eo",
      "sideID": "odd",
      "fairOdds": null,
      "bookOdds": "-164",
      "byBookmaker": {
        "tab": {
          "odds": "-154",
          "decimal": 1.65,
          "available": true
        },
        "unibet": {
          "odds": "-167",
          "decimal": 1.6,
          "available": true
        }
      }
    }
  }
}
```

Two things worth noting. Odds values are strings, not numbers, so `-108` arrives as `"-108"` — that keeps the leading `+` intact on underdog prices — and every book also carries `decimal`, because Australian books quote decimal. `bookOdds` is the consensus with the vig left in; `fairOdds` is the de-vigged price on Base and above, `null` where it cannot be computed.

## MLB Odds API Technical Specifications

### API Architecture

- **REST API** — Simple HTTP endpoints with JSON responses, identical to the SportsGameOdds v2 paths
- **Polling, not push** — the feed refreshes every ~2 minutes; `/v2/stream/events` is reserved and answers 501 rather than pretending
- **Rate limits** — per-key, per-minute meters that bind under concurrency; plans sized to your usage
- **Authentication** — secure API key access via the `x-api-key` header or `apiKey` query parameter

### Data Update Speed

- **Odds updates** — every ~2 minutes across every bookmaker lane
- **Event status** — `status` flags and `info.stale` tell you exactly how current a price is

### Developer Resources

- [Interactive documentation](https://sockodds.com/docs/) — live examples, copy-paste snippets and an [AI (vibe coding)](https://sockodds.com/docs/info/ai-vibe-coding/) context
- [SDKs & libraries](https://sockodds.com/docs/sdk/) — the SportsGameOdds SDKs for TypeScript, Python, Ruby, Go and Java work unchanged with the base URL pointed here
- [Postman collection](https://sockodds.com/postman-collection/) — pre-built requests ready to run
- [Support](https://sockodds.com/docs/help/) — email support on every plan, priority on paid plans

### MLB betting market coverage in the SockOdds API, by category

| Market category | Example markets | Markets | Availability | Typical bookmakers |
| --- | --- | --- | --- | --- |
| **Full game lines** | Points / score O/U, Points / score line, Points / score 1X2, Points / score | 16 oddIDs | Pre-match | [BetFocus](https://sockodds.com/bookmakers/betfocus-odds-api/), [MintBet](https://sockodds.com/bookmakers/mintbet-odds-api/), [Dabble](https://sockodds.com/bookmakers/dabble-odds-api/), [Picklebet](https://sockodds.com/bookmakers/picklebet-odds-api/), [BetDeluxe](https://sockodds.com/bookmakers/betdeluxe-odds-api/), [BetRight](https://sockodds.com/bookmakers/betright-odds-api/) |
| **Period markets** | Points / score O/U, Points / score 1X2, Points / score line, Points / score, Points / score yes/no, Hits O/U | 170 oddIDs | Pre-match | [Sportsbet](https://sockodds.com/bookmakers/sportsbet-odds-api/), [Neds](https://sockodds.com/bookmakers/neds-odds-api/), [BetFocus](https://sockodds.com/bookmakers/betfocus-odds-api/), [BetDeluxe](https://sockodds.com/bookmakers/betdeluxe-odds-api/), [MintBet](https://sockodds.com/bookmakers/mintbet-odds-api/), [Unibet](https://sockodds.com/bookmakers/unibet-odds-api/) |
| **Score & margin specials** | First to score, Margin, Points / score, Last to score | 26 oddIDs | Pre-match | [TAB](https://sockodds.com/bookmakers/tab-odds-api/), [Sportsbet](https://sockodds.com/bookmakers/sportsbet-odds-api/), [BetRight](https://sockodds.com/bookmakers/betright-odds-api/), [Picklebet](https://sockodds.com/bookmakers/picklebet-odds-api/), [BetDeluxe](https://sockodds.com/bookmakers/betdeluxe-odds-api/), [BetFocus](https://sockodds.com/bookmakers/betfocus-odds-api/) |
| **Team & game specials** | Points / score | 22 oddIDs | Pre-match | [Neds](https://sockodds.com/bookmakers/neds-odds-api/), [TAB](https://sockodds.com/bookmakers/tab-odds-api/), [BetFocus](https://sockodds.com/bookmakers/betfocus-odds-api/), [MintBet](https://sockodds.com/bookmakers/mintbet-odds-api/), [PointsBet](https://sockodds.com/bookmakers/pointsbet-odds-api/), [BetDeluxe](https://sockodds.com/bookmakers/betdeluxe-odds-api/) |
| **Team & innings markets** | Hits O/U | 6 oddIDs | Pre-match | — |
| **Player props** | Points / score O/U, RBIs O/U, Hits O/U, Doubles O/U, Singles O/U, Home runs O/U, Total bases O/U | 36 oddIDs | Pre-match | [Dabble](https://sockodds.com/bookmakers/dabble-odds-api/), [Neds](https://sockodds.com/bookmakers/neds-odds-api/), [ProphetX](https://sockodds.com/bookmakers/prophetexchange-odds-api/), [Unibet](https://sockodds.com/bookmakers/unibet-odds-api/), [Sportsbet](https://sockodds.com/bookmakers/sportsbet-odds-api/), [PointsBet](https://sockodds.com/bookmakers/pointsbet-odds-api/) |

**See every MLB market with its exact oddID** in the [markets browser](https://sockodds.com/docs/data-types/markets/?league=MLB).

## Use Cases

- [Arbitrage](https://sockodds.com/use-cases/arbitrage-betting-api/) & [+EV tools](https://sockodds.com/use-cases/positive-ev-betting-api/) — compare MLB odds across every Australian bookmaker to uncover arbitrage opportunities and positive expected value angles.
- [Odds comparison platforms](https://sockodds.com/use-cases/odds-comparison-api/) — display MLB odds from every book side by side for comprehensive line shopping.
- **Pricing models & trading** — use MLB market data as inputs for proprietary pricing algorithms and betting strategies.
- [Sports analytics & research](https://sockodds.com/use-cases/sports-betting-machine-learning/) — examine MLB line movements and betting-market patterns, and build predictive models on retained events.
- [Betting automation](https://sockodds.com/use-cases/odds-alert-bot-api/) — build systems that monitor MLB lines across bookmakers and trigger actions when your target odds appear.
- [Sportsbook & fantasy apps](https://sockodds.com/use-cases/sports-betting-app-api/) — power your MLB product with reliable odds, status and bet-slip deeplinks.

## MLB Odds API Documentation

Our interactive documentation covers everything you need to integrate MLB odds into your project:

- Full endpoint reference with parameters and response schemas
- Live request and response examples
- Code snippets in Python, JavaScript, Ruby, Go and Java
- Authentication setup and API key management
- Rate limiting and the `notice` field
- Error handling and troubleshooting

[View documentation](https://sockodds.com/docs/)

For more on querying `/v2/events` with MLB-specific examples, see the [API documentation](https://sockodds.com/docs/basics/).

## Frequently asked questions

### What MLB betting markets does the API cover?

276 distinct markets right now: Points / score, First to score, Margin, Hits, Last to score, RBIs, Doubles, Singles and more — pre-match, across 25 bookmakers.

### Does the API cover props, status and results in one feed?

Yes, from the same request. A single `/v2/events` call returns the game lines, the props, the event status and the results the source has, so there is no separate results API to reconcile. Each market carries `scoringSupported` and the event carries `status.finalized`.

### How often is MLB odds data updated?

Every ~2 minutes across every bookmaker lane. Each bookmaker entry carries `lastUpdatedAt`.

### Can I get historical MLB odds data?

Finished events are retained, so your archive starts when you start pulling. Opening and closing lines are not snapshotted yet.

### Is there a free trial?

Yes — a free Lite key covers AFL and NRL; Base unlocks every league including MLB. [Get a key →](https://sockodds.com/signup/)

### Which bookmakers are included?

25 bookmakers price MLB, 21 of them Australian: Sportsbet, Neds, BetFocus, Dabble, MintBet, TAB, Unibet, BetDeluxe and more.

### Are live MLB odds available?

Event status is live; prices are pre-match first and refresh every ~2 minutes.

### How are markets identified in the API?

Every market uses a structured oddID in the format `{statID}-{statEntityID}-{periodID}-{betTypeID}-{sideID}` — for example `points-PLAYER_ID-game-ou-over`. The same pattern lets you construct, filter and parse markets programmatically.

### Can I compare bookmaker odds?

Yes — every market returns prices from every supporting bookmaker under one `oddID`, so lining up the best available price across Sportsbet, Neds, BetFocus, Dabble and the rest is straightforward.

## Start building today

Free plan available. Set up in 5 minutes. Scale when you're ready.
