Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/sportsdataio-mlb-v3-stats-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: MLB MLB v3 Headshots MLB v3 Stats 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 Stats
paths:
/v3/mlb/stats/{format}/PlayerGameStatsByDate/{date}:
get:
description: Returns the box score statistical record for all involved players across a given date, updated live as the game takes place.
operationId: mlb_v3_stats_player_game_stats___by_date__live___final
summary: Player Game Stats - by Date [Live & Final]
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>2017-JUL-31</code>, <code>2017-SEP-01</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerGame'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/PlayerSeasonStats/{season}:
get:
description: Returns all season-long stats (i.e. the season total, not each individual game record) for all players for a given season.
operationId: mlb_v3_stats_player_season_stats
summary: Player Season Stats
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.
<br>Examples: <code>2017</code>, <code>2018</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerSeason'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/PlayerSeasonStatsByTeam/{season}/{team}:
get:
description: Returns all season-long stats (i.e. the season total, not each individual game record) for a given team's players in a given season.
operationId: mlb_v3_stats_player_season_stats___by_team
summary: Player Season Stats - 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: season
in: path
description: 'Year of the season.
<br>Examples: <code>2017</code>, <code>2018</code>.
'
required: true
schema:
type: string
- name: team
in: path
description: 'The abbreviation of the requested team.
<br>Examples: <code>SF</code>, <code>NYY</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerSeason'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/BoxScores/{date}:
get:
description: Full statistical information for a specified game, down to the team and player stat level, delivered live during the game, called for all games on a given date.
operationId: mlb_v3_stats_box_scores___by_date__live___final
summary: Box Scores - by Date [Live & Final]
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>2017-JUL-31</code>, <code>2017-SEP-01</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BoxScore'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/BoxScore/{gameid}:
get:
description: Full statistical information for a specified game, down to the team and player stat level, delivered live during the game, called per individual game.
operationId: mlb_v3_stats_box_score__live___final
summary: Box Score [Live & Final]
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>14620</code> or <code>16905</code>
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BoxScore'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/BoxScoresDelta/{date}/{minutes}:
get:
description: This method returns all box scores for a given date, but only returns player stats that have changed in the last X minutes as specified in your API call. By definition this is a live endpoint, not final.
operationId: mlb_v3_stats_box_scores_delta___by_date
summary: Box Scores Delta - 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>2017-JUL-31</code>, <code>2017-SEP-01</code>.'
required: true
schema:
type: string
- name: minutes
in: path
description: 'Only returns player statistics that have changed in the last X minutes. You specify how many minutes in time to go back. Valid entries are:
<code>1</code>, <code>2</code> ... <code>all</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BoxScore'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/PlayerSeasonSplitStats/{season}/{split}:
get:
description: All players' split stats for the season. Split stats are available for left, right, and switch-handed pitchers and hitters.
operationId: mlb_v3_stats_player_season_split_stats
summary: Player Season Split Stats
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.
<br>Examples: <code>2017</code>, <code>2018</code>.'
required: true
schema:
type: string
- name: split
in: path
description: 'The desired split of stats. Currently, we support vs. Left/Right/Switch handed pitchers/hitters. Possible values are: <code>L</code>, <code>R</code> and <code>S</code>'
required: true
schema:
type: string
enum:
- L
- R
- S
default: L
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerSeason'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/HitterVsPitcher/{hitterid}/{pitcherid}:
get:
description: Stat records for a given hitter and a given pitcher, called by PlayerId in both cases.
operationId: mlb_v3_stats_batter_vs__pitcher_stats
summary: Batter vs. Pitcher Stats
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: hitterid
in: path
description: 'Unique FantasyData Player ID.
Example:<code>10000031</code>.'
required: true
schema:
type: string
- name: pitcherid
in: path
description: 'Unique FantasyData Player ID.
Example:<code>10000618</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerSeason'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/PlayerSeasonStatsSplitByTeam/{season}:
get:
description: All a given team's players' split stats for the season. Split stats are available for left, right, and switch-handed pitchers and hitters.
operationId: mlb_v3_stats_player_season_stats_split___by_team
summary: Player Season Stats Split - 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: season
in: path
description: 'Year of the season.
<br>Examples: <code>2017</code>, <code>2018</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerSeason'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/PlayerSeasonHomeStats/{season}:
get:
description: All players' stats for the season taken only from their home games.
operationId: mlb_v3_stats_player_season_stats___by_home
summary: Player Season Stats - by Home
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.
<br>Examples: <code>2017</code>, <code>2018</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerSeason'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/PlayerSeasonAwayStats/{season}:
get:
description: All players' stats for the season taken only from their road games.
operationId: mlb_v3_stats_player_season_stats___by_away
summary: Player Season Stats - by Away
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.
<br>Examples: <code>2017</code>, <code>2018</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerSeason'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/TeamHittersVsPitcher/{gameid}/{team}:
get:
description: For a given game, returns a team's hitting record versus the projected or confirmed starting pitcher for the game in question.
operationId: mlb_v3_stats_team_hitting_vs__starting_pitcher
summary: Team Hitting vs. Starting Pitcher
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>14620</code> or <code>16905</code>
required: true
schema:
type: string
- name: team
in: path
description: 'The abbreviation of the requested team.
<br>Examples: <code>SF</code>, <code>NYY</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerSeason'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/PlayerGameStatsBySeason/{season}/{playerid}/{numberofgames}:
get:
description: Specify a season, a player, and number of games (either an integer or <code>all</code>) to see all of their box score logs. Refreshed after their most recent game is complete.
operationId: mlb_v3_stats_player_game_logs___by_season
summary: Player Game Logs - 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: Season to get games from. Example <code>2019POST</code>, <code>2020</code>
required: true
schema:
type: string
- name: playerid
in: path
description: 'Unique SportsDataIO Player ID.
Example:<code>10001365</code>.'
required: true
schema:
type: string
- name: numberofgames
in: path
description: How many games to return. Example <code>all</code>, <code>10</code>, <code>25</code>
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerGame'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/PlayerGameStatsByDateFinal/{date}:
get:
description: Returns the box score statistical record for all involved players across all teams' games on a given date after each game has concluded.
operationId: mlb_v3_stats_player_game_stats___by_date__final
summary: Player Game Stats - by Date [Final]
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>2017-JUL-31</code>, <code>2017-SEP-01</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PlayerGame'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/BoxScoreFinal/{gameid}:
get:
description: Full statistical information for a specified game, down to the team and player stat level, delivered after the game is complete.
operationId: mlb_v3_stats_box_score__final
summary: Box Score [Final]
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>14620</code> or <code>16905</code>
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BoxScore'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/BoxScoresFinal/{date}:
get:
description: Full statistical information for a specified date for each game that took place, down to the team and player stat level, delivered after the game is complete.
operationId: mlb_v3_stats_box_scores___by_date__final
summary: Box Scores - by Date [Final]
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>2017-JUL-31</code>, <code>2017-SEP-01</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BoxScore'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
/v3/mlb/stats/{format}/FantasyGameStatsByDate/{date}:
get:
description: Returns a simple list of fantasy points and stats for each player for a given date.
operationId: mlb_v3_stats_fantasy_points___by_date
summary: Fantasy Points - 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>2017-JUL-31</code>, <code>2017-SEP-01</code>.'
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/FantasyGame'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
tags:
- MLB v3 Stats
components:
schemas:
TeamGame:
properties:
StatID:
type: integer
description: The unique ID of the stat
TeamID:
type:
- integer
- 'null'
description: The team's unique TeamID as assigned by SportsDataIO
SeasonType:
type:
- integer
- 'null'
description: The type of season that this record corresponds to (1=Regular Season, 2=Preseason, 3=Postseason, 4=Offseason, 5=AllStar)
Season:
type:
- integer
- 'null'
description: The MLB season of the game
Name:
type:
- string
- 'null'
description: Team's full name (city and mascot)
Team:
type:
- string
- 'null'
description: The abbreviation [Key] of the team
GlobalTeamID:
type:
- integer
- 'null'
description: A globally unique ID for this team. This value is guaranteed to be unique across all sports/leagues
GameID:
type:
- integer
- 'null'
description: The unique ID of this game
OpponentID:
type:
- integer
- 'null'
description: The unique ID of the team's opponent
Opponent:
type:
- string
- 'null'
description: The name of the opponent
Day:
type:
- string
- 'null'
description: The day of the game
DateTime:
type:
- string
- 'null'
description: The date and time of the game
HomeOrAway:
type:
- string
- 'null'
description: Whether the team is home or away
IsGameOver:
type: boolean
description: Whether the game is over (true/false)
GlobalGameID:
type:
- integer
- 'null'
description: A globally unique ID for this game. This value is guaranteed to be unique across all sports/leagues.
GlobalOpponentID:
type:
- integer
- 'null'
description: A globally unique ID for this opponent. This value is guaranteed to be unique across all sports/leagues.
Updated:
type:
- string
- 'null'
description: The timestamp of when the record was last updated (US Eastern Time).
Games:
type:
- integer
- 'null'
description: The number of games played.
FantasyPoints:
type:
- number
- 'null'
description: Total fantasy points
AtBats:
type:
- number
- 'null'
description: At bats while hitting
Runs:
type:
- number
- 'null'
description: Total runs scored.
Hits:
type:
- number
- 'null'
description: Total hits
Singles:
type:
- number
- 'null'
description: Total singles
Doubles:
type:
- number
- 'null'
description: Total doubles
Triples:
type:
- number
- 'null'
description: Total triples
HomeRuns:
type:
- number
- 'null'
description: Total home runs
RunsBattedIn:
type:
- number
- 'null'
description: Total runs batted in
BattingAverage:
type:
- number
- 'null'
description: Total batting average
Outs:
type:
- number
- 'null'
description: Total outs
Strikeouts:
type:
- number
- 'null'
description: Total strikeouts
Walks:
type:
- number
- 'null'
description: Total walks
HitByPitch:
type:
- number
- 'null'
description: Total times hit by pitch
Sacrifices:
type:
- number
- 'null'
description: Total sacrifices
SacrificeFlies:
type:
- number
- 'null'
description: Total sacrifice flies
GroundIntoDoublePlay:
type:
- number
- 'null'
description: Total times grounded into double play
StolenBases:
type:
- number
- 'null'
description: Total stolen bases
CaughtStealing:
type:
- number
- 'null'
description: Total caught stealing
PitchesSeen:
type:
- number
- 'null'
description: Total pitches seen
OnBasePercentage:
type:
- number
- 'null'
description: Total on base percentage
SluggingPercentage:
type:
- number
- 'null'
description: Total slugging percentage
OnBasePlusSlugging:
type:
- number
- 'null'
description: Total on base plus percentage
Errors:
type:
- number
- 'null'
description: Total errors
Wins:
type:
- number
- 'null'
description: Total wins by the team/player
Losses:
type:
- number
- 'null'
description: Total losses by the team/player
Saves:
type:
- number
- 'null'
description: Total saves by team/player
InningsPitchedDecimal:
type:
- number
- 'null'
description: Decimal representation of total innings pitched (e.g. 1.33, 7.66, etc)
TotalOutsPitched:
type:
- number
- 'null'
description: Total outs pitched by team/player
InningsPitchedFull:
type:
- number
- 'null'
description: Total full innings pitched (e.g. 6, 71, 89, etc)
InningsPitchedOuts:
type:
- number
- 'null'
description: 'Outs pitched beyond InningsPitchedFull (possible values: 0, 1, 2)'
EarnedRunAverage:
type:
- number
- 'null'
description: Total earned run average by team/player
PitchingHits:
type:
- number
- 'null'
description: Hits allowed while pitching
PitchingRuns:
type:
- number
- 'null'
description: Runs allowed while pitching
PitchingEarnedRuns:
type:
- number
- 'null'
description: Earned runs allowed while pitching
PitchingWalks:
type:
- number
- 'null'
description: Walks allowed while pitching
PitchingStrikeouts:
type:
- number
- 'null'
description: Strikeouts allowed while pitching
PitchingHomeRuns:
type:
- number
- 'null'
description: Home runs allowed while pitching
PitchesThrown:
type:
- number
- 'null'
description: Total pitches thrown while pitching
PitchesThrownStrikes:
type:
- number
- 'null'
description: Total pitches thrown for strikes while pitching
WalksHitsPerInningsPitched:
type:
- number
- 'null'
description: Walks plus hits per innings pitched (WHIP) while pitching
PitchingBattingAverageAgainst:
type:
- number
- 'null'
description: Total batting average against (BAA) while pitching
GrandSlams:
type:
- number
- 'null'
description: Total grand slams
FantasyPointsFanDuel:
type:
- number
- 'null'
description: Total FanDuel fantasy points
FantasyPointsDraftKings:
type:
- number
- 'null'
description: Total DraftKings fantasy points
FantasyPointsYahoo:
type:
- number
- 'null'
description: Total Yahoo fantasy points
PlateAppearances:
type:
- number
- 'null'
description: Total plate appearances
TotalBases:
type:
- number
- 'null'
description: Number of total bases
FlyOuts:
type:
- number
- 'null'
description:
# --- truncated at 32 KB (97 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sportsdataio/refs/heads/main/openapi/sportsdataio-mlb-v3-stats-api-openapi.yml