A Guide to getting MLB Odds from our odds API

November 13, 2025

A Guide to getting MLB Odds from our odds API

A Guide to getting MLB Odds from our odds API

If you’re building a baseball or multi-sport betting app, the MLB odds data in the SportsGameOdds API gives you fast access to moneylines, totals, player props, alt-lines, and more—all through a single unified endpoint. This quick MLB Odds API guide walks you through the most common MLB queries using the /v2/events endpoint, including how to fetch player props, filter for specific markets, and pull odds for individual players.

All examples below use real query patterns you can copy-paste directly into your project. For full field definitions and optional parameters, refer to the official documentation here: /docs/reference#tag/events/GET/events/

MLB Odds API Guide: Fetch MLB player props and odds

If you want to fetch events with game odds and player props, the easiest way would be this:

https://api.sportsgameodds.com/v2/events?apiKey=API_KEY_HERE&oddsAvailable=true&leagueID=MLB&limit=10

This provides you with player props in addition to all the other odds markets. It only gives you MLB games and only games where there are at least some odds open/available for betting. The limit is 10, but you can change this to the number you require. But it is advisable to use it to keep your call queries faster.

Remember, we are generous with our limits: 1 object = 1 event, not 1 event-market. For example 10 MLB games = 10 objects regardless of how many odds were returned across those 10 games. Most events return hundreds of odds markets but you’re only charged once per event.

Fetch MLB odds for a specific prop market

If you want to get more fine-grained with the specific player props you want you can do something like this:

https://api.sportsgameodds.com/v2/events?apiKey=API_KEY_HERE&oddsAvailable=true&leagueID=MLB&oddIDs=batting_hits-PLAYER_ID-game-ou-over,batting_hits-PLAYER_ID-game-ou-under

That will give you the over-unders on MLB player hits for all players.

We have a wide range of MLB props and markets you can query. The full list is in our documentation here: /docs/data-types/markets/baseball

Here is an example of a few.

  • Player total runs – full game (Over/Under)
  • points-ANY_PLAYER_ID-game-ou-over,points-ANY_PLAYER_ID-game-ou-under
  • Player total runs – full game (Even/Odd) points-ANY_PLAYER_ID-game-eo-even,points-ANY_PLAYER_ID-game-eo-odd
  • Player to score any run – full game (Yes/No) points-ANY_PLAYER_ID-game-yn-yes,points-ANY_PLAYER_ID-game-yn-no
  • Player total runs – 1st half (Over/Under) points-ANY_PLAYER_ID-1h-ou-over,points-ANY_PLAYER_ID-1h-ou-under
  • Player to score any run – 1st half (Yes/No) points-ANY_PLAYER_ID-1h-yn-yes,points-ANY_PLAYER_ID-1h-yn-no
  • Player total runs – 2nd half (Over/Under) points-ANY_PLAYER_ID-2h-ou-over,points-ANY_PLAYER_ID-2h-ou-under
  • Player to score any run – 2nd half (Yes/No) points-ANY_PLAYER_ID-2h-yn-yes,points-ANY_PLAYER_ID-2h-yn-no
  • Player total runs – 1st inning (Over/Under) points-ANY_PLAYER_ID-1i-ou-over,points-ANY_PLAYER_ID-1i-ou-under
  • Player to score any run – 1st inning (Yes/No) points-ANY_PLAYER_ID-1i-yn-yes,points-ANY_PLAYER_ID-1i-yn-no
  • Player total runs – 5th inning (Over/Under) points-ANY_PLAYER_ID-5i-ou-over,points-ANY_PLAYER_ID-5i-ou-under

Fetch MLB odds for a specific player

Note that the “PLAYER_ID” value is a special value which means “any playerID”, but if you swap PLAYER_ID with a specific player’s playerID then you’ll get odds for only that player like so: https://api.sportsgameodds.com/v2/events?apiKey=API_KEY_HERE&oddsAvailable=true&leagueID=MLB&oddIDs=batting_hits-SHOHEI_OHTANI_1_MLB-game-ou-over,batting_hits-SHOHEI_OHTANI_1_MLB-game-ou-under

As you can see in those examples, you’re able to provide a comma separated list of any oddID values. The oddID values are basically a bet and they take the following format: {statID}-{statEntityID}-{periodID}-{betTypeID}-{sideID}

Here’s a guide from our docs which lists our all of the supported markets: /docs/data-types/markets#baseball

A few extra notes:

  • We highly recommend trimming down the list of oddIDs to only include the ones you’re actually interested in.
  • We also recommend you include a bookmakerID param (ex: bookmakerID=fanduel,draftkings,prizepicks,underdog)
  • The above two params will greatly speed up your response time
  • By having the param includeOpposingOdds=true you make it so you only need to list the odds for the over sideID and it will automatically include the under odds too.
  • You can also add includeAltLines=true to get the alt lines for each market but be careful about doing so as it can slow response times and increase response size.

To sum it up this MLB Odds API guide: once you’re comfortable with leagueID=MLB, oddIDs, and a few key params like bookmakerID, includeOpposingOdds and includeAltLines, you can shape the MLB feed to match almost any betting or modeling use case—without wasting objects on unwanted markets. From here, the best next step is to plug these example URLs into your app or Postman collection, then explore the full baseball markets list in the docs to discover everything else that’s available.

If you’d like to dive deeper, here are some helpful links:

SportsGameOdds provides a leading baseball odds api.

Read More: Read More: NFL Odds API Guide

Ready to get started?

Join thousands of developers building the next generation of sports and betting applications.