# Baseball Odds API
URL: https://sockodds.com/sports/baseball-odds-api/

> Access baseball betting odds from every Australian bookmaker through the SockOdds API. Baseball odds for MLB including head to head, lines, totals, player props and more.

Access baseball betting odds from 25 bookmakers through the SockOdds API. Get baseball odds for every game including head to head, lines, totals, player props and more — `sportID=BASEBALL`.

## Baseball Odds API Features

Our baseball odds API is fully filterable, so you pull exactly the data you want — games, player props, teams or specific markets. Curate the feed to your needs with the same parameters SportsGameOdds developers already know.

276 distinct markets are priced across 1 league right now:

- 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 (innings and first-five)

## Baseball leagues

| League | leagueID | Events | Markets | Bookmakers |
| --- | --- | --- | --- | --- |
| [MLB](https://sockodds.com/leagues/mlb-odds-api/) | `MLB` | 85 | 276 | 20 |

## Baseball Player Props

Access 36 baseball player proposition markets — hits, home runs, RBIs, total bases, strikeouts, outs recorded and walks — pre-match across every game the Australian books price. See the [player prop odds API](https://sockodds.com/player-props-odds-api/) for the full market list by sport and how to filter props in a single request.

## Baseball API Odds with Results

SockOdds delivers baseball odds and event data in one configuration:

- Upcoming games with status flags
- Home and away teams with ids
- Players with production ids where the source carries them
- Baseball odds including lines, totals, head to head, player props and more
- Results and grading flags where the source has them

## Quick start: your first Baseball odds API call

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

Or one league at a time, which is faster:

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

## Stats priced in baseball

| statID | Name | Markets | Levels |
| --- | --- | --- | --- |
| `points` | Points / score | 19,138 | all, team, player |
| `batting_hits` | Hits | 4,992 | all, team, player |
| `batting_homeRuns` | Home runs | 3,140 | player |
| `batting_RBI` | RBIs | 3,026 | player |
| `batting_totalBases` | Total bases | 3,008 | player |
| `batting_doubles` | Doubles | 2,926 | player |
| `batting_singles` | Singles | 2,730 | player |
| `batting_triples` | Triples | 1,362 | player |
| `batting_hits+runs+rbi` | Hits + runs + RBIs | 966 | player |
| `batting_strikeouts` | Batter strikeouts | 888 | player |
| `margin` | Margin | 850 | team |
| `batting_stolenBases` | Stolen bases | 766 | player |
| `batting_basesOnBalls` | Walks | 690 | player |
| `pitching_strikeouts` | Pitcher strikeouts | 318 | player |
| `pitching_outs` | Outs recorded | 262 | player |
| `lastToScore` | Last to score | 170 | team |
| `firstToScore` | First to score | 170 | team |
| `pitching_hits` | Hits allowed | 108 | player |
| `pitching_basesOnBalls` | Walks allowed | 76 | player |
| `pitching_win` | Pitcher win | 52 | player |
| `pitching_earnedRuns` | Earned runs | 10 | player |

## Baseball 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

### Baseball market coverage 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/) |

## Use Cases for Baseball API Data

- [Arbitrage](https://sockodds.com/use-cases/arbitrage-betting-api/) & [+EV tools](https://sockodds.com/use-cases/positive-ev-betting-api/) — compare baseball 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 baseball odds from every book side by side for comprehensive line shopping.
- **Pricing models & trading** — use baseball market data as inputs for proprietary pricing algorithms and betting strategies.
- [Sports analytics & research](https://sockodds.com/use-cases/sports-betting-machine-learning/) — examine baseball 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 baseball 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 baseball product with reliable odds, status and bet-slip deeplinks.

## Baseball Odds API Documentation

Our interactive documentation covers everything you need to integrate Baseball 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/)

## Start building today

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