openapi: 3.1.0
info:
title: MLB MLB v3 Headshots MLB v3 Odds API
version: '1.0'
description: MLB API - OpenAPI 3.1 Specification
servers:
- url: https://api.sportsdata.io
description: Production server
security:
- apiKeyHeader: []
- apiKeyQuery: []
tags:
- name: MLB v3 Odds
paths:
/v3/mlb/odds/{format}/GameOddsByDate/{date}:
get:
description: Returns full game odds (spread, moneyline, total) for games on a given date. Only returns the most recently seen odds, not inclusive of line movement.
operationId: mlb_v3_odds_pre_game_odds___by_date
summary: Pre-Game Odds - by Date
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: date
in: path
description: 'The date of the game(s). <br>Examples: <code>2018-06-20</code>, <code>2018-06-23</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GameInfo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/GameOddsLineMovement/{gameid}:
get:
description: Returns the non-full-game odds (spread, moneyline, total) for games in a given week and season. Non-full-game means 1st-half or 1st-quarter, for example, rather than full game. Returns the full line movement for the given game. This endpoint has a longer cache as it is meant for historical data/line movement rather than the most up to the second line.
operationId: mlb_v3_odds_pre_game_odds_line_movement
summary: Pre-Game Odds Line Movement
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: gameid
in: path
description: The GameID of an MLB game. GameIDs can be found in the Games API. Valid entries are <code>51735</code> or <code>51745</code>
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GameInfo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/LiveGameOddsByDate/{date}:
get:
description: Returns in-play game odds (spread, moneyline, total) for games on a given date. Only returns the most recently seen odds, not inclusive of line movement. As this is in-game, it will only return results while the game is in progress.
operationId: mlb_v3_odds_in_game_odds___by_date
summary: In-Game Odds - by Date
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: date
in: path
description: 'The date of the game(s). <br>Examples: <code>2018-06-20</code>, <code>2018-06-23</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GameInfo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/LiveGameOddsLineMovement/{gameid}:
get:
description: Returns in-play game odds (spread, moneyline, total) for games on a given date. Returns the full line movement for the given game. This endpoint has a longer cache as it is meant for historical data/line movement rather than the most up to the second line.
operationId: mlb_v3_odds_in_game_odds_line_movement
summary: In-Game Odds Line Movement
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: gameid
in: path
description: The GameID of an MLB game. GameIDs can be found in the Games API. Valid entries are <code>51735</code> or <code>51745</code>
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GameInfo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/AlternateMarketGameOddsByDate/{date}:
get:
description: Returns the non-full-game odds (spread, moneyline, total) for games on a given date. Non-full-game means first five innings, for example, rather than full game. Only returns the most recently seen odds, not inclusive of line movement.
operationId: mlb_v3_odds_period_game_odds___by_date
summary: Period Game Odds - by Date
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: date
in: path
description: 'The date of the game(s). <br>Examples: <code>2018-06-20</code>, <code>2018-06-23</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GameInfo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/AlternateMarketGameOddsLineMovement/{gameid}:
get:
description: Returns the non-full-game odds (spread, moneyline, total) for games on a given date. Non-full-game means first five innings, for example, rather than full game. Returns the full line movement for the given game. This endpoint has a longer cache as it is meant for historical data/line movement rather than the most up to the second line.
operationId: mlb_v3_odds_period_game_odds_line_movement
summary: Period Game Odds Line Movement
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: gameid
in: path
description: The GameID of an MLB game. GameIDs can be found in the Games API. Valid entries are <code>51735</code> or <code>51745</code>
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GameInfo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/TeamTrends/{team}:
get:
description: Describes recent team trends and performance against betting data in recent sets of games.
operationId: mlb_v3_odds_betting_trends___by_team
summary: Betting Trends - by Team
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: team
in: path
description: 'The abbreviation of the requested team. <br> Examples: <code>PHI</code>, <code>MIN</code>, <code>DET</code>, etc.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/TeamTrends'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/MatchupTrends/{team}/{opponent}:
get:
description: Returns trends data for a given pairing of teams. Will return data even if the teams are not set to play this season. Intended for use on a specific game, though it will work for other comparisons if applicable.
operationId: mlb_v3_odds_betting_trends___by_matchup
summary: Betting Trends - by Matchup
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: team
in: path
description: 'The abbreviation of the requested team. <br> Examples: <code>PHI</code>, <code>MIN</code>, <code>DET</code>, etc.'
required: true
schema:
type: string
- name: opponent
in: path
description: 'The abbreviation of the requested opponent. <br> Examples: <code>PHI</code>, <code>MIN</code>, <code>DET</code>, etc.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/MatchupTrends'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingEventsByDate/{date}:
get:
description: The list of current BettingEvents for the given date, from which Betting Market data can be gathered via the Betting Markets by Event endpoint, for all available Betting Market types (e.g. Player Props, Team Props.)
operationId: mlb_v3_odds_betting_events___by_date
summary: Betting Events - by Date
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: date
in: path
description: 'The date of the game(s). <br>Examples: <code>2020-08-20</code>, <code>2020-08-23</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BettingEvent'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingEvents/{season}:
get:
description: The list of current BettingEvents for the given season, from which Betting Market data can be gathered via the Betting Markets by Event endpoint, for all available Betting Market types (e.g. Player Props, Team Props.)
operationId: mlb_v3_odds_betting_events___by_season
summary: Betting Events - by Season
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: season
in: path
description: 'Year of the season (with optional season type).<br>Examples: <code>2020</code>, <code>2020PRE</code>, <code>2020POST</code>, <code>2020STAR</code>, <code>2021</code>, etc.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BettingEvent'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingFuturesBySeason/{season}:
get:
description: Returns available Futures markets for the given season. Does not include line movement.
operationId: mlb_v3_odds_betting_futures___by_season
summary: Betting Futures - by Season
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: season
in: path
description: 'Year of the season (with optional season type).<br>Examples: <code>2020</code>, <code>2020PRE</code>, <code>2020POST</code>, <code>2020STAR</code>, <code>2021</code>, etc.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BettingEvent'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingMarkets/{eventId}:
get:
description: Returns the markets of all available types (e.g. Player Props, Team Props) and available outcomes for a given BettingEventID.
operationId: mlb_v3_odds_betting_markets___by_event
summary: Betting Markets - by Event
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: eventId
in: path
description: The EventId of the desired event/game for which to pull all betting markets (includes outcomes/bets).
required: true
schema:
type: string
- name: include
in: query
description: 'This parameter indicates which <code>BettingOutcome</code> records to return in the payload. By default, this endpoint only returns available outcomes, excluding the unlisted bets. <br><br><b>Important Note:</b> the default parameter of <code>available</code> is much faster and provides the best performance. Passing unlisted will return unlisted odds, but these are cached for much longer and may be several minutes old. For best performance, the default parameter is highly recommended. <br><br>Possible values include: <br><br><code>available</code> - excludes any betting outcomes that have been removed/unlisted by the respective sportsbook. This is more lightweight and delivers odds much faster than using unlisted. <br><br><code>unlisted</code> - includes the most recently available betting outcome per sportsbook, for each listed market, even those outcomes are expired/unlisted or otherwise unavailable from the respective sportsbook. This is a far heavier payload, and it''s cached for much longer than available. <br><br>'
schema:
type: string
enum:
- available
- unlisted
default: available
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BettingMarket'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingMarket/{marketId}:
get:
description: Returns full line movement for a given BettingMarket. Due to the sheer size of the output and the level of detail, it is intended for historical data purposes and not for the most up-to-the-second lines.
operationId: mlb_v3_odds_betting_market
summary: Betting Market
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: marketId
in: path
description: The MarketId of the desired market for which to pull all outcomes/bets.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BettingMarket'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingMarketsByMarketType/{eventId}/{marketTypeID}:
get:
description: Returns Markets and available outcomes for a given event and market type requested. A lighter call than by BettingEventID as it only includes markets tagged with the specific MarketType, a full list of which is available for each sport in its Betting Metadata endpoint.
operationId: mlb_v3_odds_betting_markets___by_market_type
summary: Betting Markets - by Market Type
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: eventId
in: path
description: The EventId of the desired event/game for which to pull all betting markets (includes outcomes/bets).
required: true
schema:
type: string
- name: marketTypeID
in: path
description: 'The Market Type ID of the desired MarketTypes to pull. Some common types include: <code>1</code> for Game Lines, <code>2</code> for Player Props, <code>3</code> for Team Props, <code>6</code> for Game Props'
required: true
schema:
type: string
- name: include
in: query
description: 'This parameter indicates which <code>BettingOutcome</code> records to return in the payload. By default, this endpoint only returns available outcomes, excluding the unlisted bets. <br><br><b>Important Note:</b> the default parameter of <code>available</code> is much faster and provides the best performance. Passing unlisted will return unlisted odds, but these are cached for much longer and may be several minutes old. For best performance, the default parameter is highly recommended. <br><br>Possible values include: <br><br><code>available</code> - excludes any betting outcomes that have been removed/unlisted by the respective sportsbook. This is more lightweight and delivers odds much faster than using unlisted. <br><br><code>unlisted</code> - includes the most recently available betting outcome per sportsbook, for each listed market, even those outcomes are expired/unlisted or otherwise unavailable from the respective sportsbook. This is a far heavier payload, and it''s cached for much longer than available. <br><br>'
schema:
type: string
enum:
- available
- unlisted
default: available
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BettingMarket'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingMarketsByGameID/{gameID}:
get:
description: Returns the markets of all available types (e.g. Player Props, Team Props) and available outcomes for a given GameID.
operationId: mlb_v3_odds_betting_markets___by_game
summary: Betting Markets - by Game
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: gameID
in: path
description: The GameID of the desired game for which to pull all betting markets (includes outcomes/bets).
required: true
schema:
type: string
- name: include
in: query
description: 'This parameter indicates which <code>BettingOutcome</code> records to return in the payload. By default, this endpoint only returns available outcomes, excluding the unlisted bets. <br><br><b>Important Note:</b> the default parameter of <code>available</code> is much faster and provides the best performance. Passing unlisted will return unlisted odds, but these are cached for much longer and may be several minutes old. For best performance, the default parameter is highly recommended. <br><br>Possible values include: <br><br><code>available</code> - excludes any betting outcomes that have been removed/unlisted by the respective sportsbook. This is more lightweight and delivers odds much faster than using unlisted. <br><br><code>unlisted</code> - includes the most recently available betting outcome per sportsbook, for each listed market, even those outcomes are expired/unlisted or otherwise unavailable from the respective sportsbook. This is a far heavier payload, and it''s cached for much longer than available. <br><br>'
schema:
type: string
enum:
- available
- unlisted
default: available
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BettingMarket'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingMetadata:
get:
description: Returns the list of MarketTypes, BetTypes, PeriodTypes, OutcomeTypes, and ResultTypes to map the IDs to descriptive names. Also includes a list of the MarketType, BetType & PeriodType combinations which we will have resulting for.
operationId: mlb_v3_odds_betting_metadata
summary: Betting Metadata
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BettingEntityMetadataCollection'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/ActiveSportsbooks:
get:
description: A list of all available sportsbooks with their associated unique IDs.
operationId: mlb_v3_odds_sportsbooks___by_active
summary: Sportsbooks - by Active
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Sportsbook'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingMarketResults/{marketId}:
get:
description: Returns all outcomes under this market which have a result type associated. Will return empty list if resulting has not yet processed for the given game. Resulting processes shortly after game closing.
operationId: mlb_v3_odds_betting_results___by_market
summary: Betting Results - by Market
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: marketId
in: path
description: The MarketId of the desired market for which to pull all outcomes/bets. Valid IDs include <code>837872</code>, <code>841068</code>
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BettingMarketResult'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingSplitsByMarketId/{marketId}:
get:
description: List of Money and Bet Percentage splits for each outcome type available in this market. This specific endpoint will return the movement from this market as well as the most recent.
operationId: mlb_v3_odds_betting_splits_by___betting_market
summary: Betting Splits by - Betting Market
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: marketId
in: path
description: The MarketId of the desired market for which to pull splits.. Valid IDs include <code>837872</code>
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BettingMarketSplit'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingSplitsByGameId/{gameId}:
get:
description: List of Money and Bet Percentage splits for each market and their respective outcome types available in this game. This specific endpoint will return current splits for each available market and no line movement.
operationId: mlb_v3_odds_betting_splits___by_game
summary: Betting Splits - by Game
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: gameId
in: path
description: The ID of the game for which you want to receive splits for. Example <code>63266</code>.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GameBettingSplit'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Odds
/v3/mlb/odds/{format}/BettingPlayerPropsByGameID/{gameId}:
get:
description: This works in the same way as Betting Markets by Market Type but is prefiltered to the Player Props type only. Ideal if your application will only ever require Player Props, but if you also want Team Props etc. it is recommended to use the by Market Type endpoint.
operationId: mlb_v3_odds_betting_player_props___by_game
summary: Betting Player Props - by Game
parameters:
- name: format
in: path
description: Desired response format. Valid entries are <code>JSON</code> or <code>XML</code>.
required: true
schema:
type: string
enum:
- JSON
- XML
default: JSON
- name: gameId
in: path
description: The unique GameID of the game in question.
required: true
schema:
type: string
- name: include
in: query
description: 'This parameter indicates which <code>BettingOutcome</code> records to return in the payload. By default, this endpoint only returns available outcomes, excluding the unlisted bets. <br><br><b>Important Note:</b> the default parameter of <code>available</code> is much faster and provides the best performance. Passing unlisted will return unlisted odds, but these are cached for much longer and may be several minutes old. For best performance, the default parameter is highly recommended. <br><br>Possible values include: <br><br><code>available</code> - excludes any betting outcomes that have been removed/unlisted by the respective sportsbook. This is more lightweight and delivers odds much faster than using unlisted. <br><br><code>unlisted</code> - inclu
# --- truncated at 32 KB (122 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sportsdataio/refs/heads/main/openapi/sportsdataio-mlb-v3-odds-api-openapi.yml