{
  "openapi": "3.0.1",
  "info": {
    "title": "MLB Stats Scraper | Game Logs, Statcast Pitches, Lineups",
    "description": "Scrape MLB stats in bulk: every player's game log, daily slates with probable pitchers, lineups, weather and umpires, pitch-by-pitch Statcast with all columns, season stats with WAR, wRC+ and splits, rosters with injured list, standings. MLB and minor leagues, back to 1901.",
    "version": "0.0",
    "x-build-id": "zeIJtgPTAUlOlrshj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zen-studio~mlb-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zen-studio-mlb-stats-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/zen-studio~mlb-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zen-studio-mlb-stats-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/zen-studio~mlb-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zen-studio-mlb-stats-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "⚾ What to collect",
            "enum": [
              "games",
              "playerGames",
              "teamGames",
              "plateAppearances",
              "pitchEvents",
              "runnerMovements",
              "inningLines",
              "playerSeasons",
              "playerSplits",
              "fieldingSeasons",
              "statcastBatting",
              "statcastPitching",
              "pitchTypes",
              "statcastFielding",
              "statcastCatching",
              "statcastRunning",
              "statcastTeams",
              "rollingForm",
              "absChallenges",
              "parkFactors",
              "gameOdds",
              "lineMovement",
              "playerProps",
              "teamBettingRecords",
              "futures",
              "injuries",
              "playoffOdds",
              "standings",
              "rosters",
              "teams",
              "players",
              "transactions",
              "draft",
              "draftProspects",
              "prospectRankings",
              "freeAgents",
              "awards",
              "milestones",
              "leaders",
              "gameHighLows",
              "staff",
              "venues",
              "homeRunDerby",
              "seasonCalendar",
              "teamHistory",
              "highlights"
            ],
            "type": "string",
            "description": "One record type per run. Date-based types (games, game logs, box scores, pitch by pitch, play by play, odds, props, transactions, highlights) use the dates below; the rest use seasons."
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First day to collect for date-based types. Leave dates and seasons empty to get today."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last day to collect. Leave empty for a single day."
          },
          "seasons": {
            "title": "Seasons",
            "type": "array",
            "description": "Years, one per line, for example <b>2026</b>. Leave empty for the current season. Dates, when set, take priority for date-based types.",
            "items": {
              "type": "string"
            }
          },
          "level": {
            "title": "Level",
            "enum": [
              "mlb",
              "aaa",
              "aa",
              "high_a",
              "single_a",
              "rookie",
              "winter",
              "other_minors",
              "college",
              "independent",
              "international",
              "negro_leagues"
            ],
            "type": "string",
            "description": "Major League Baseball, a minor-league level or another league. Leave empty for MLB."
          },
          "gameTypes": {
            "title": "Game types",
            "type": "array",
            "description": "Leave empty for regular season and postseason. Season tables use the first type selected, regular season by default.",
            "items": {
              "type": "string",
              "enum": [
                "R",
                "F",
                "D",
                "L",
                "W",
                "S",
                "E",
                "A"
              ],
              "enumTitles": [
                "Regular season",
                "Wild Card",
                "Division Series",
                "League Championship Series",
                "World Series",
                "Spring training",
                "Exhibition",
                "All-Star Game"
              ]
            }
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Keep only these teams. Names, nicknames or abbreviations: <b>Yankees</b>, <b>NYY</b>, <b>New York Yankees</b>.",
            "items": {
              "type": "string"
            }
          },
          "players": {
            "title": "Players",
            "type": "array",
            "description": "Keep only these players, by full name (<b>Aaron Judge</b>) or player id. For pitches, a player matches as pitcher or batter. Only for player-level record types: games, team lines, odds, standings and venues have no player to match, and will say so.",
            "items": {
              "type": "string"
            }
          },
          "pitchEventTypes": {
            "title": "Event types",
            "type": "array",
            "description": "Which events to return in <b>Pitch events</b> mode. Leave empty for all of them.",
            "items": {
              "type": "string",
              "enum": [
                "pitch",
                "action",
                "pickoff",
                "stepoff",
                "no_pitch"
              ],
              "enumTitles": [
                "Pitches",
                "In-game actions (substitutions, stolen bases, wild pitches)",
                "Pickoff attempts",
                "Step-offs",
                "Automatic balls and strikes"
              ]
            }
          },
          "includeStatcast": {
            "title": "Add Statcast columns to pitches",
            "type": "boolean",
            "description": "In <b>Pitch events</b> mode, add Statcast measurements (expected stats, run value, bat speed, arm angle and more) to every pitch for MLB, Triple-A and Single-A. Turn off for faster runs with the tracking and call data only."
          },
          "statGroups": {
            "title": "Stat groups",
            "type": "array",
            "description": "For player season stats and splits. Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "hitting",
                "pitching"
              ],
              "enumTitles": [
                "Hitting",
                "Pitching"
              ]
            }
          },
          "splitCodes": {
            "title": "Split codes",
            "type": "array",
            "description": "Situations for player splits, one per line. Leave empty for <b>vl</b> (vs left-handed), <b>vr</b> (vs right-handed), <b>h</b> (home), <b>a</b> (away), <b>d</b> (day), <b>n</b> (night). Others include <b>g</b> (grass), <b>t</b> (turf), <b>risp</b> (runners in scoring position) and monthly and count situations.",
            "items": {
              "type": "string"
            }
          },
          "fieldingByPosition": {
            "title": "Split fielding by position",
            "type": "boolean",
            "description": "Adds a row for each position a player fielded (C, 1B, 2B, 3B, SS, LF, CF, RF) with outs above average and fielding run value at that position, next to the season total. Takes longer."
          },
          "absLevels": {
            "title": "ABS challenge levels",
            "type": "array",
            "description": "ABS challenges mode only. Leave empty for both MLB and Triple-A.",
            "items": {
              "type": "string",
              "enum": [
                "mlb",
                "aaa"
              ],
              "enumTitles": [
                "MLB",
                "Triple-A"
              ]
            }
          },
          "absChallengeTypes": {
            "title": "ABS challenge types",
            "type": "array",
            "description": "ABS challenges mode only. Leave empty for every type.",
            "items": {
              "type": "string",
              "enum": [
                "batter",
                "batting-team",
                "catcher",
                "pitcher",
                "catching-team",
                "team-summary",
                "league"
              ],
              "enumTitles": [
                "Batters",
                "Batting teams",
                "Catchers",
                "Pitchers",
                "Catching teams",
                "Team summary",
                "League"
              ]
            }
          },
          "parkBatSides": {
            "title": "Park factor batter sides",
            "type": "array",
            "description": "Which batters the park factors cover. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "All",
                "R",
                "L"
              ],
              "enumTitles": [
                "All batters",
                "Right-handed batters",
                "Left-handed batters"
              ]
            }
          },
          "parkConditions": {
            "title": "Park factor conditions",
            "type": "array",
            "description": "Game conditions to include. Leave empty for all of them.",
            "items": {
              "type": "string",
              "enum": [
                "All",
                "Day",
                "Night",
                "Roof Closed",
                "Open Air"
              ],
              "enumTitles": [
                "All",
                "Day",
                "Night",
                "Roof Closed",
                "Open Air"
              ]
            }
          },
          "parkRollingYears": {
            "title": "Park factor rolling window",
            "type": "array",
            "description": "Seasons per park factor (1, 2 or 3 years ending in the chosen season). Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3"
              ],
              "enumTitles": [
                "1 year",
                "2 years",
                "3 years"
              ]
            }
          },
          "oddsProviders": {
            "title": "Sportsbooks",
            "type": "array",
            "description": "Keep only these sportsbooks, e.g. <code>DraftKings</code> or <code>ESPN BET</code>. A partial name matches. Leave empty for every sportsbook.",
            "items": {
              "type": "string"
            }
          },
          "propTypes": {
            "title": "Prop types",
            "type": "array",
            "description": "Keep only these prop markets, e.g. <code>Total Strikeouts</code> or <code>Home Runs</code>. A partial name matches. Leave empty for every market.",
            "items": {
              "type": "string"
            }
          },
          "standingsTypes": {
            "title": "Standings types",
            "type": "array",
            "description": "Leave empty for regular season standings.",
            "items": {
              "type": "string",
              "enum": [
                "regularSeason",
                "wildCard",
                "divisionLeaders",
                "wildCardWithLeaders",
                "firstHalf",
                "secondHalf",
                "springTraining",
                "postseason",
                "byDivision",
                "byConference",
                "byLeague",
                "byOrganization"
              ],
              "enumTitles": [
                "Regular season",
                "Wild card",
                "Division leaders",
                "Wild card with leaders",
                "First half",
                "Second half",
                "Spring training",
                "Postseason",
                "By division",
                "By conference",
                "By league",
                "By organization"
              ]
            }
          },
          "rosterType": {
            "title": "Roster type",
            "enum": [
              "40Man",
              "active",
              "fullSeason",
              "fullRoster",
              "depthChart",
              "nonRosterInvitees",
              "allTime",
              "coach"
            ],
            "type": "string",
            "description": "Leave empty for the 40-man roster."
          },
          "transactionTypes": {
            "title": "Transaction types",
            "type": "array",
            "description": "Only these types, by code or name, e.g. <code>TR</code> (Trade), <code>SFA</code> (Signed as Free Agent), <code>SC</code> (Status Change, which covers injured list moves). Leave empty for every type.",
            "items": {
              "type": "string"
            }
          },
          "prospectList": {
            "title": "Prospect list",
            "enum": [
              "top100",
              "teams",
              "draft",
              "international"
            ],
            "type": "string",
            "description": "Which MLB Pipeline ranking to return. Rankings are always the current list; the season picks the stats shown next to each prospect."
          },
          "awards": {
            "title": "Awards",
            "type": "array",
            "description": "Only awards whose name contains one of these terms, e.g. <code>MVP</code>, <code>Cy Young</code>, <code>Gold Glove</code>. Leave empty for every award.",
            "items": {
              "type": "string"
            }
          },
          "leadersLimit": {
            "title": "Leader ranks",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "For league leaders: ranks per category. Leave empty for 50. Ties can add a few rows; 150 is the most any category has."
          },
          "leadersPlayerPool": {
            "title": "Leader player pool",
            "enum": [
              "qualified",
              "all",
              "rookies"
            ],
            "type": "string",
            "description": "For league leaders. Leave empty for qualified players."
          },
          "highLowTypes": {
            "title": "Single-game high types",
            "type": "array",
            "description": "For single-game highs. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "player",
                "team",
                "game"
              ],
              "enumTitles": [
                "Player games",
                "Team games",
                "Games (both teams)"
              ]
            }
          },
          "staffTypes": {
            "title": "Staff types",
            "type": "array",
            "description": "For staff. Leave empty for all. Umpires, official scorers and datacasters are league-wide and are skipped when teams are set.",
            "items": {
              "type": "string",
              "enum": [
                "coach",
                "personnel",
                "umpire",
                "official_scorer",
                "datacaster"
              ],
              "enumTitles": [
                "Coaches",
                "Team personnel",
                "Umpires",
                "Official scorers",
                "Datacasters"
              ]
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many records. Leave empty for no limit."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}