MLB v3 Play-by-Play icon

MLB v3 Play-by-Play

MLB play-by-play API

COMMUNITYAPI KEY0 INSTALLS
OpenAPI Specificationv3.0
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "http://azure-api.sportsdata.io/v3/mlb/pbp"
    },
    {
      "url": "https://azure-api.sportsdata.io/v3/mlb/pbp"
    }
  ],
  "info": {
    "contact": {
      "x-twitter": "nfldata"
    },
    "description": "MLB play-by-play API.",
    "title": "MLB v3 Play-by-Play",
    "version": "1.0",
    "x-apisguru-categories": [
      "entertainment"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_nfldata_profile_image.jpeg"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://fantasydata.com/downloads/swagger/mlb-v3-play-by-play.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "sportsdata.io",
    "x-serviceName": "mlb-v3-play-by-play"
  },
  "security": [
    {
      "apiKeyHeader": []
    },
    {
      "apiKeyQuery": []
    }
  ],
  "tags": [],
  "paths": {
    "/{format}/PlayByPlay/{gameid}": {
      "get": {
        "operationId": "PlayByPlay",
        "parameters": [
          {
            "description": "Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>.",
            "in": "path",
            "name": "format",
            "required": true,
            "schema": {
              "default": "XML",
              "enum": [
                "XML",
                "JSON"
              ],
              "type": "string"
            }
          },
          {
            "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>",
            "in": "path",
            "name": "gameid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayByPlay"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Play By Play"
      }
    },
    "/{format}/PlayByPlayDelta/{date}/{minutes}": {
      "get": {
        "operationId": "PlayByPlayDelta",
        "parameters": [
          {
            "description": "Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>.",
            "in": "path",
            "name": "format",
            "required": true,
            "schema": {
              "default": "XML",
              "enum": [
                "XML",
                "JSON"
              ],
              "type": "string"
            }
          },
          {
            "description": "The date of the game(s).\n<br>Examples: <code>2017-JUL-31</code>, <code>2017-SEP-01</code>.",
            "in": "path",
            "name": "date",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only returns plays that have changed in the last X minutes.  You specify how many minutes in time to go back.  Valid entries are:\n<code>1</code>, <code>2</code> ... <code>all</code>.",
            "in": "path",
            "name": "minutes",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PlayByPlay"
                  },
                  "type": "array"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Play By Play Delta"
      }
    }
  },
  "components": {
    "schemas": {
      "Game": {
        "properties": {
          "Attendance": {
            "nullable": true,
            "type": "integer"
          },
          "AwayRotationNumber": {
            "nullable": true,
            "type": "integer"
          },
          "AwayTeam": {
            "nullable": true,
            "type": "string"
          },
          "AwayTeamErrors": {
            "nullable": true,
            "type": "integer"
          },
          "AwayTeamHits": {
            "nullable": true,
            "type": "integer"
          },
          "AwayTeamID": {
            "nullable": false,
            "type": "integer"
          },
          "AwayTeamMoneyLine": {
            "nullable": true,
            "type": "integer"
          },
          "AwayTeamProbablePitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "AwayTeamRuns": {
            "nullable": true,
            "type": "integer"
          },
          "AwayTeamStartingPitcher": {
            "nullable": true,
            "type": "string"
          },
          "AwayTeamStartingPitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "Balls": {
            "nullable": true,
            "type": "integer"
          },
          "Channel": {
            "nullable": true,
            "type": "string"
          },
          "CurrentHitter": {
            "nullable": true,
            "type": "string"
          },
          "CurrentHitterID": {
            "nullable": true,
            "type": "integer"
          },
          "CurrentHittingTeamID": {
            "nullable": true,
            "type": "integer"
          },
          "CurrentPitcher": {
            "nullable": true,
            "type": "string"
          },
          "CurrentPitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "CurrentPitchingTeamID": {
            "nullable": true,
            "type": "integer"
          },
          "DateTime": {
            "nullable": true,
            "type": "string"
          },
          "DateTimeUTC": {
            "nullable": true,
            "type": "string"
          },
          "Day": {
            "nullable": true,
            "type": "string"
          },
          "DueUpHitterID1": {
            "nullable": true,
            "type": "integer"
          },
          "DueUpHitterID2": {
            "nullable": true,
            "type": "integer"
          },
          "DueUpHitterID3": {
            "nullable": true,
            "type": "integer"
          },
          "ForecastDescription": {
            "nullable": true,
            "type": "string"
          },
          "ForecastTempHigh": {
            "nullable": true,
            "type": "integer"
          },
          "ForecastTempLow": {
            "nullable": true,
            "type": "integer"
          },
          "ForecastWindChill": {
            "nullable": true,
            "type": "integer"
          },
          "ForecastWindDirection": {
            "nullable": true,
            "type": "integer"
          },
          "ForecastWindSpeed": {
            "nullable": true,
            "type": "integer"
          },
          "GameEndDateTime": {
            "nullable": true,
            "type": "string"
          },
          "GameID": {
            "nullable": false,
            "type": "integer"
          },
          "GlobalAwayTeamID": {
            "nullable": false,
            "type": "integer"
          },
          "GlobalGameID": {
            "nullable": false,
            "type": "integer"
          },
          "GlobalHomeTeamID": {
            "nullable": false,
            "type": "integer"
          },
          "HomeRotationNumber": {
            "nullable": true,
            "type": "integer"
          },
          "HomeTeam": {
            "nullable": true,
            "type": "string"
          },
          "HomeTeamErrors": {
            "nullable": true,
            "type": "integer"
          },
          "HomeTeamHits": {
            "nullable": true,
            "type": "integer"
          },
          "HomeTeamID": {
            "nullable": false,
            "type": "integer"
          },
          "HomeTeamMoneyLine": {
            "nullable": true,
            "type": "integer"
          },
          "HomeTeamProbablePitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "HomeTeamRuns": {
            "nullable": true,
            "type": "integer"
          },
          "HomeTeamStartingPitcher": {
            "nullable": true,
            "type": "string"
          },
          "HomeTeamStartingPitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "Inning": {
            "nullable": true,
            "type": "integer"
          },
          "InningDescription": {
            "nullable": true,
            "type": "string"
          },
          "InningHalf": {
            "nullable": true,
            "type": "string"
          },
          "Innings": {
            "items": {
              "$ref": "#/components/schemas/Inning"
            },
            "type": "array"
          },
          "IsClosed": {
            "nullable": false,
            "type": "boolean"
          },
          "LastPlay": {
            "nullable": true,
            "type": "string"
          },
          "LosingPitcher": {
            "nullable": true,
            "type": "string"
          },
          "LosingPitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "NeutralVenue": {
            "nullable": true,
            "type": "boolean"
          },
          "Outs": {
            "nullable": true,
            "type": "integer"
          },
          "OverPayout": {
            "nullable": true,
            "type": "integer"
          },
          "OverUnder": {
            "nullable": true,
            "type": "number"
          },
          "PointSpread": {
            "nullable": true,
            "type": "number"
          },
          "PointSpreadAwayTeamMoneyLine": {
            "nullable": true,
            "type": "integer"
          },
          "PointSpreadHomeTeamMoneyLine": {
            "nullable": true,
            "type": "integer"
          },
          "RescheduledFromGameID": {
            "nullable": true,
            "type": "integer"
          },
          "RescheduledGameID": {
            "nullable": true,
            "type": "integer"
          },
          "RunnerOnFirst": {
            "nullable": true,
            "type": "boolean"
          },
          "RunnerOnSecond": {
            "nullable": true,
            "type": "boolean"
          },
          "RunnerOnThird": {
            "nullable": true,
            "type": "boolean"
          },
          "SavingPitcher": {
            "nullable": true,
            "type": "string"
          },
          "SavingPitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "Season": {
            "nullable": false,
            "type": "integer"
          },
          "SeasonType": {
            "nullable": false,
            "type": "integer"
          },
          "SeriesInfo": {
            "$ref": "#/components/schemas/Series"
          },
          "StadiumID": {
            "nullable": true,
            "type": "integer"
          },
          "Status": {
            "nullable": true,
            "type": "string"
          },
          "Strikes": {
            "nullable": true,
            "type": "integer"
          },
          "UnderPayout": {
            "nullable": true,
            "type": "integer"
          },
          "Updated": {
            "nullable": true,
            "type": "string"
          },
          "WinningPitcher": {
            "nullable": true,
            "type": "string"
          },
          "WinningPitcherID": {
            "nullable": true,
            "type": "integer"
          }
        }
      },
      "Inning": {
        "properties": {
          "AwayTeamRuns": {
            "nullable": true,
            "type": "integer"
          },
          "GameID": {
            "nullable": false,
            "type": "integer"
          },
          "HomeTeamRuns": {
            "nullable": true,
            "type": "integer"
          },
          "InningID": {
            "nullable": false,
            "type": "integer"
          },
          "InningNumber": {
            "nullable": false,
            "type": "integer"
          }
        }
      },
      "Pitch": {
        "properties": {
          "Ball": {
            "nullable": true,
            "type": "boolean"
          },
          "BallsBeforePitch": {
            "nullable": true,
            "type": "integer"
          },
          "Foul": {
            "nullable": true,
            "type": "boolean"
          },
          "HitterID": {
            "nullable": true,
            "type": "integer"
          },
          "Looking": {
            "nullable": true,
            "type": "boolean"
          },
          "Outs": {
            "nullable": true,
            "type": "integer"
          },
          "PitchID": {
            "nullable": false,
            "type": "integer"
          },
          "PitchNumberThisAtBat": {
            "nullable": true,
            "type": "integer"
          },
          "PitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "PlayID": {
            "nullable": false,
            "type": "integer"
          },
          "Strike": {
            "nullable": true,
            "type": "boolean"
          },
          "StrikesBeforePitch": {
            "nullable": true,
            "type": "integer"
          },
          "Swinging": {
            "nullable": true,
            "type": "boolean"
          }
        }
      },
      "Play": {
        "properties": {
          "AtBat": {
            "nullable": true,
            "type": "boolean"
          },
          "AwayTeamRuns": {
            "nullable": true,
            "type": "integer"
          },
          "Balls": {
            "nullable": true,
            "type": "integer"
          },
          "Description": {
            "nullable": true,
            "type": "string"
          },
          "Error": {
            "nullable": true,
            "type": "boolean"
          },
          "Hit": {
            "nullable": true,
            "type": "boolean"
          },
          "HitterBatHand": {
            "nullable": true,
            "type": "string"
          },
          "HitterID": {
            "nullable": true,
            "type": "integer"
          },
          "HitterName": {
            "nullable": true,
            "type": "string"
          },
          "HitterPosition": {
            "nullable": true,
            "type": "string"
          },
          "HitterTeamID": {
            "nullable": true,
            "type": "integer"
          },
          "HomeTeamRuns": {
            "nullable": true,
            "type": "integer"
          },
          "InningBatterNumber": {
            "nullable": true,
            "type": "integer"
          },
          "InningHalf": {
            "nullable": true,
            "type": "string"
          },
          "InningID": {
            "nullable": false,
            "type": "integer"
          },
          "InningNumber": {
            "nullable": true,
            "type": "integer"
          },
          "NumberOfOutsOnPlay": {
            "nullable": true,
            "type": "integer"
          },
          "Out": {
            "nullable": true,
            "type": "boolean"
          },
          "Outs": {
            "nullable": true,
            "type": "integer"
          },
          "PitchNumberThisAtBat": {
            "nullable": true,
            "type": "integer"
          },
          "PitcherID": {
            "nullable": true,
            "type": "integer"
          },
          "PitcherName": {
            "nullable": true,
            "type": "string"
          },
          "PitcherTeamID": {
            "nullable": true,
            "type": "integer"
          },
          "PitcherThrowHand": {
            "nullable": true,
            "type": "string"
          },
          "Pitches": {
            "items": {
              "$ref": "#/components/schemas/Pitch"
            },
            "type": "array"
          },
          "PlayID": {
            "nullable": false,
            "type": "integer"
          },
          "PlayNumber": {
            "nullable": true,
            "type": "integer"
          },
          "Result": {
            "nullable": true,
            "type": "string"
          },
          "Runner1ID": {
            "nullable": true,
            "type": "integer"
          },
          "Runner2ID": {
            "nullable": true,
            "type": "integer"
          },
          "Runner3ID": {
            "nullable": true,
            "type": "integer"
          },
          "RunsBattedIn": {
            "nullable": true,
            "type": "integer"
          },
          "Sacrifice": {
            "nullable": true,
            "type": "boolean"
          },
          "Strikeout": {
            "nullable": true,
            "type": "boolean"
          },
          "Strikes": {
            "nullable": true,
            "type": "integer"
          },
          "Updated": {
            "nullable": true,
            "type": "string"
          },
          "Walk": {
            "nullable": true,
            "type": "boolean"
          }
        }
      },
      "PlayByPlay": {
        "properties": {
          "Game": {
            "$ref": "#/components/schemas/Game"
          },
          "Plays": {
            "items": {
              "$ref": "#/components/schemas/Play"
            },
            "type": "array"
          }
        }
      },
      "Series": {
        "properties": {
          "AwayTeamWins": {
            "nullable": false,
            "type": "integer"
          },
          "GameNumber": {
            "nullable": false,
            "type": "integer"
          },
          "HomeTeamWins": {
            "nullable": false,
            "type": "integer"
          },
          "MaxLength": {
            "nullable": false,
            "type": "integer"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyHeader": {
        "in": "header",
        "name": "Ocp-Apim-Subscription-Key",
        "type": "apiKey"
      },
      "apiKeyQuery": {
        "in": "query",
        "name": "key",
        "type": "apiKey"
      }
    }
  }
}