{
  "data": {
    "id": "cCMwmOrwZkNoObEE3",
    "actId": "rg2FBxNB1s8X13GRi",
    "userId": "zq8lKbpLzTjGDayPC",
    "startedAt": "2026-10-25T11:59:22.899Z",
    "finishedAt": "2026-10-25T11:59:28.366Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CLI"
    },
    "stats": {
      "durationMillis": 5396,
      "runTimeSecs": 5.396,
      "computeUnits": 0.005995555555555555,
      "imageSizeBytes": 318679040
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "GK9YjZRyQZVzOdoH5",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"Official MLB Team, Schedule & Stat Line Scraper Input\",\n  \"description\": \"Fetch official MLB data from statsapi.mlb.com — teams, rosters, schedules, standings, stat lines, box scores, leaders, and reference data.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"What to fetch. Nine modes cover teams, players/rosters, player stats, game logs, schedules, standings, box scores, leaders, and reference data.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"getTeams\",\n        \"getPlayers\",\n        \"getPlayerStats\",\n        \"getGameLog\",\n        \"getSchedule\",\n        \"getStandings\",\n        \"getBoxscore\",\n        \"getLeaders\",\n        \"getReference\"\n      ],\n      \"enumTitles\": [\n        \"Teams\",\n        \"Players and rosters\",\n        \"Player stats (season, career, splits)\",\n        \"Player game-by-game log\",\n        \"Schedule and scores\",\n        \"Standings\",\n        \"Box score stat lines\",\n        \"League leaders\",\n        \"Reference data (venues, leagues, divisions, seasons)\"\n      ],\n      \"default\": \"getPlayerStats\",\n      \"prefill\": \"getPlayers\"\n    },\n    \"seasons\": {\n      \"title\": \"Seasons\",\n      \"type\": \"array\",\n      \"description\": \"Season years, e.g. 2024 or 2025. Leave empty for the current season. Stats cover 1876 onward; schedules cover 1901 onward. Multiple seasons can be fetched in one run (mode=getTeams, getPlayers, getPlayerStats, getSchedule, getStandings, getLeaders, getReference).\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"teamIds\": {\n      \"title\": \"Teams\",\n      \"type\": \"array\",\n      \"description\": \"Filter by MLB team IDs (147 = Yankees), team names (Yankees), abbreviations (NYY), or team URLs (https://www.mlb.com/yankees). Leave empty for all teams. Used by teams, players, player stats, schedule, standings, box score, and leaders modes.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"playerIds\": {\n      \"title\": \"Player IDs\",\n      \"type\": \"array\",\n      \"description\": \"MLB player IDs, e.g. 660271 for Shohei Ohtani. Used by players, player stats, and game log modes. Use Search query to find a player ID by name.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"gamePks\": {\n      \"title\": \"Game IDs\",\n      \"type\": \"array\",\n      \"description\": \"MLB game IDs (gamePk), e.g. 822974. Used by mode=getBoxscore. Leave empty to derive games from seasons, dates, or teams.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"startDate\": {\n      \"title\": \"Start date\",\n      \"type\": \"string\",\n      \"description\": \"Start date in YYYY-MM-DD format. Used by schedule, box score, and player stats (statType=byDateRange). A single date can be set in either date field.\",\n      \"editor\": \"textfield\"\n    },\n    \"endDate\": {\n      \"title\": \"End date\",\n      \"type\": \"string\",\n      \"description\": \"End date in YYYY-MM-DD format. Used by schedule, box score, and player stats (statType=byDateRange).\",\n      \"editor\": \"textfield\"\n    },\n    \"statGroup\": {\n      \"title\": \"Stat group\",\n      \"type\": \"string\",\n      \"description\": \"Which stat category to return for players, player stats, game logs, box scores, and leaders.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"hitting\",\n        \"pitching\",\n        \"fielding\"\n      ],\n      \"enumTitles\": [\n        \"Hitting\",\n        \"Pitching\",\n        \"Fielding\"\n      ],\n      \"default\": \"hitting\",\n      \"prefill\": \"hitting\"\n    },\n    \"statType\": {\n      \"title\": \"Stat type\",\n      \"type\": \"string\",\n      \"description\": \"Scope for mode=getPlayerStats. Season, career, and date-range stats work for the whole player pool; season-by-season, month, day-of-week, and home/away splits require playerIds or teamIds.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"season\",\n        \"career\",\n        \"yearByYear\",\n        \"byMonth\",\n        \"byDayOfWeek\",\n        \"homeAndAway\",\n        \"byDateRange\"\n      ],\n      \"enumTitles\": [\n        \"Season totals\",\n        \"Career totals\",\n        \"Season by season\",\n        \"By month\",\n        \"By day of week\",\n        \"Home and away\",\n        \"Date range\"\n      ],\n      \"default\": \"season\",\n      \"prefill\": \"season\"\n    },\n    \"rosterType\": {\n      \"title\": \"Roster type\",\n      \"type\": \"string\",\n      \"description\": \"Which roster to return for mode=getPlayers when teamIds is set.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"active\",\n        \"40Man\",\n        \"fullSeason\",\n        \"depthChart\",\n        \"coach\"\n      ],\n      \"enumTitles\": [\n        \"Active roster\",\n        \"40-man roster\",\n        \"Full-season roster\",\n        \"Depth chart\",\n        \"Coaching staff\"\n      ],\n      \"default\": \"active\",\n      \"prefill\": \"active\"\n    },\n    \"searchQuery\": {\n      \"title\": \"Search query\",\n      \"type\": \"string\",\n      \"description\": \"Find players by name for mode=getPlayers, e.g. Ohtani or Aaron Judge. Returns up to 50 matching players.\",\n      \"editor\": \"textfield\"\n    },\n    \"leagueId\": {\n      \"title\": \"League\",\n      \"type\": \"string\",\n      \"description\": \"Filter standings and leaders to the American League, National League, or both.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"both\",\n        \"AL\",\n        \"NL\"\n      ],\n      \"enumTitles\": [\n        \"Both leagues\",\n        \"American League\",\n        \"National League\"\n      ],\n      \"default\": \"both\",\n      \"prefill\": \"both\"\n    },\n    \"gameType\": {\n      \"title\": \"Game type\",\n      \"type\": \"string\",\n      \"description\": \"Filter games and stats by game type. Regular season is R; other codes include spring training (S), wild card (F), division series (D), league championship (L), World Series (W), and All-Star (A).\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"S\",\n        \"R\",\n        \"F\",\n        \"D\",\n        \"L\",\n        \"W\",\n        \"C\",\n        \"P\",\n        \"A\",\n        \"I\",\n        \"E\"\n      ],\n      \"enumTitles\": [\n        \"Spring Training\",\n        \"Regular Season\",\n        \"Wild Card\",\n        \"Division Series\",\n        \"League Championship Series\",\n        \"World Series\",\n        \"Championship\",\n        \"Postseason\",\n        \"All-Star Game\",\n        \"Intrasquad\",\n        \"Exhibition\"\n      ],\n      \"default\": \"R\",\n      \"prefill\": \"R\"\n    },\n    \"leaderCategory\": {\n      \"title\": \"Leader category\",\n      \"type\": \"string\",\n      \"description\": \"Stat category for mode=getLeaders. Choose a category that belongs to the selected stat group, e.g. homeRuns, battingAverage, or runsBattedIn for hitting; earnedRunAverage, strikeouts, or saves for pitching; fieldingPercentage or errors for fielding.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"homeRuns\",\n        \"battingAverage\",\n        \"runsBattedIn\",\n        \"hits\",\n        \"runs\",\n        \"stolenBases\",\n        \"doubles\",\n        \"triples\",\n        \"walks\",\n        \"onBasePlusSlugging\",\n        \"strikeouts\",\n        \"hitByPitch\",\n        \"caughtStealing\",\n        \"intentionalWalks\",\n        \"totalBases\",\n        \"plateAppearances\",\n        \"gamesPlayed\",\n        \"atBats\",\n        \"sacrificeFlies\",\n        \"groundIntoDoublePlay\",\n        \"earnedRunAverage\",\n        \"wins\",\n        \"saves\",\n        \"whip\",\n        \"inningsPitched\",\n        \"losses\",\n        \"gamesStarted\",\n        \"completeGames\",\n        \"shutouts\",\n        \"holds\",\n        \"blownSaves\",\n        \"walksPer9Inn\",\n        \"strikeoutsPer9Inn\",\n        \"hitsPer9Inn\",\n        \"winPercentage\",\n        \"strikeoutWalkRatio\",\n        \"battersFaced\",\n        \"numberOfPitches\",\n        \"wildPitches\",\n        \"balks\",\n        \"fieldingPercentage\",\n        \"errors\",\n        \"assists\",\n        \"putOuts\",\n        \"chances\",\n        \"doublePlays\",\n        \"rangeFactorPerGame\",\n        \"innings\"\n      ],\n      \"enumTitles\": [\n        \"Home runs\",\n        \"Batting average\",\n        \"Runs batted in\",\n        \"Hits\",\n        \"Runs\",\n        \"Stolen bases\",\n        \"Doubles\",\n        \"Triples\",\n        \"Walks\",\n        \"On-base plus slugging\",\n        \"Strikeouts\",\n        \"Hit by pitch\",\n        \"Caught stealing\",\n        \"Intentional walks\",\n        \"Total bases\",\n        \"Plate appearances\",\n        \"Games played\",\n        \"At bats\",\n        \"Sacrifice flies\",\n        \"Grounded into double play\",\n        \"Earned run average\",\n        \"Wins\",\n        \"Saves\",\n        \"WHIP\",\n        \"Innings pitched\",\n        \"Losses\",\n        \"Games started\",\n        \"Complete games\",\n        \"Shutouts\",\n        \"Holds\",\n        \"Blown saves\",\n        \"Walks per 9 innings\",\n        \"Strikeouts per 9 innings\",\n        \"Hits per 9 innings\",\n        \"Win percentage\",\n        \"Strikeout-to-walk ratio\",\n        \"Batters faced\",\n        \"Number of pitches\",\n        \"Wild pitches\",\n        \"Balks\",\n        \"Fielding percentage\",\n        \"Errors\",\n        \"Assists\",\n        \"Putouts\",\n        \"Chances\",\n        \"Double plays\",\n        \"Range factor per game\",\n        \"Innings\"\n      ],\n      \"default\": \"homeRuns\",\n      \"prefill\": \"homeRuns\"\n    },\n    \"referenceType\": {\n      \"title\": \"Reference data\",\n      \"type\": \"string\",\n      \"description\": \"Which reference dataset to return for mode=getReference.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"venues\",\n        \"leagues\",\n        \"divisions\",\n        \"seasons\"\n      ],\n      \"enumTitles\": [\n        \"Ballparks and venues\",\n        \"Leagues\",\n        \"Divisions\",\n        \"Season calendar\"\n      ],\n      \"default\": \"venues\",\n      \"prefill\": \"venues\"\n    },\n    \"includeStats\": {\n      \"title\": \"Include season stats\",\n      \"type\": \"boolean\",\n      \"description\": \"For mode=getPlayers, attach each player's season stats for the selected stat group.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"includeTeamTotals\": {\n      \"title\": \"Include team totals and line score\",\n      \"type\": \"boolean\",\n      \"description\": \"For mode=getBoxscore, add one team-total record per side per game, including the inning-by-inning line score.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"maxItems\": {\n      \"title\": \"Maximum records\",\n      \"type\": \"integer\",\n      \"description\": \"Hard cap on the number of records returned (1–10,000).\",\n      \"minimum\": 1,\n      \"maximum\": 10000,\n      \"default\": 50,\n      \"prefill\": 3\n    }\n  },\n  \"required\": [\n    \"mode\"\n  ]\n}",
    "readme": "# Official MLB Team, Schedule & Stat Line Scraper\n\nPull Major League Baseball data straight from MLB's public Stats API. Get all 30 clubs, player bios and rosters, schedules with probable pitchers and final scores, division standings, season and career stat lines, player game logs, per-player box scores, league leaderboards, and ballpark reference data. Nine modes, one dataset, no API key, no login, and no proxy setup.\n\n## What this actor does\n\n- **Nine modes in one actor** — teams, players/rosters, player stats, game logs, schedule, standings, box scores, leaders, and reference data.\n- **Complete player pool** — season stats include every player the source returns, not only qualified hitters or pitchers.\n- **Historical coverage** — stats reach back to 1876 and schedules to 1901; request one season or several in the same run.\n- **Game-level detail** — schedules include probable pitchers, weather, decisions, attendance, umpires, and inning line scores; box scores return per-player batting, pitching, or fielding lines.\n- **Clean, flat records** — every record carries a `recordType` and `scrapedAt`; fields the source does not have for a record are omitted rather than sent as null.\n\n## Modes\n\n| Mode | One record per | Highlights |\n|---|---|---|\n| `getTeams` | Club | League, division, venue, franchise, logo, team URL |\n| `getPlayers` | Player | Bio, position, bats/throws, debut, headshot, team; rosters and name search; optional season stats |\n| `getPlayerStats` | Player stat split | Season, career, season-by-season, month, day-of-week, home/away, or date-range lines |\n| `getGameLog` | Player per game | One row per game with the full stat line, opponent, and game ID |\n| `getSchedule` | Game | Scores, status, probable pitchers, weather, decisions, attendance, umpires, line score |\n| `getStandings` | Team season record | Wins, losses, pct, ranks, games back, streaks, splits, clinch and elimination numbers |\n| `getBoxscore` | Player per game | Batting, pitching, or fielding line plus game context; optional team totals and line score |\n| `getLeaders` | Ranked player | Category, rank, value, player, team, league |\n| `getReference` | Venue / league / division / season | Ballpark capacity, surface, roof, coordinates, league and division metadata, season calendar |\n\n## Output per record type\n\n### Team (`getTeams`)\n\n`recordType`, `teamId`, `name`, `abbreviation`, `teamName`, `shortName`, `locationName`, `clubName`, `franchiseName`, `firstYearOfPlay`, `teamCode`, `fileCode`, `leagueName`, `leagueId`, `divisionName`, `divisionId`, `venueName`, `venueId`, `sportName`, `springLeagueName`, `allStarStatus`, `active`, `season`, `logoUrl`, `mlbUrl`, `scrapedAt`.\n\n### Player (`getPlayers`)\n\n`recordType`, `playerId`, `fullName`, `firstName`, `lastName`, `middleName`, `useName`, `primaryNumber`, `birthDate`, `currentAge`, `birthCity`, `birthStateProvince`, `birthCountry`, `height`, `weight`, `active`, `primaryPosition`, `primaryPositionCode`, `primaryPositionType`, `batSide`, `pitchHand`, `mlbDebutDate`, `draftYear`, `nickName`, `nameSlug`, `boxscoreName`, `currentTeam`, `currentTeamId`, `leagueName`, `divisionName`, `headshotUrl`, `mlbUrl`, `season`. Roster rows also include `jerseyNumber`, `rosterStatus`, `parentTeamId`, `rosterPosition`, and `rosterPositionAbbreviation`. With `includeStats`, a `stats` object holds the selected stat group.\n\n### Player stats (`getPlayerStats`)\n\n`recordType`, `playerId`, `playerName`, `fullName`, `firstName`, `lastName`, `teamId`, `teamName`, `position`, `positionAbbreviation`, `leagueName`, `sportId`, `season`, `statType`, `statGroup`, `splitKey`, `splitValue`, `month`, `monthName`, `dayOfWeek`, `dayOfWeekName`, `isHome`, `situationCode`, `startDate`, `endDate`, `mlbUrl`. Every non-empty stat field returned by MLB is included, for example: `gamesPlayed`, `atBats`, `runs`, `hits`, `doubles`, `triples`, `homeRuns`, `rbi`, `baseOnBalls`, `walks`, `strikeOuts`, `strikeouts`, `stolenBases`, `caughtStealing`, `avg`, `battingAverage`, `obp`, `onBasePercentage`, `slg`, `sluggingPct`, `ops`, `babip`, `wins`, `losses`, `saves`, `holds`, `blownSaves`, `inningsPitched`, `earnedRuns`, `era`, `whip`, `battersFaced`, `numberOfPitches`, `completeGames`, `shutouts`, `strikeoutsPer9Inn`, `walksPer9Inn`, `fieldingPercentage`, `chances`, `putOuts`, `assists`, `errors`, `doublePlays`.\n\n### Game log (`getGameLog`)\n\n`recordType`, `playerId`, `playerName`, `fullName`, `teamId`, `teamName`, `opponentId`, `opponentName`, `isHome`, `gamePk`, `officialDate`, `date`, `season`, `gameType`, `statGroup`, `mlbUrl`, plus every non-empty stat field for that game.\n\n### Game (`getSchedule`)\n\n`recordType`, `gamePk`, `gameGuid`, `season`, `gameDate`, `officialDate`, `gameType`, `gameNumber`, `doubleHeader`, `dayNight`, `seriesDescription`, `seriesGameNumber`, `gamesInSeries`, `scheduledInnings`, `isTie`, `recordSource`, `publicFacing`, `status`, `abstractGameState`, `codedGameState`, `statusCode`, `homeTeam`, `homeTeamId`, `homeTeamAbbreviation`, `awayTeam`, `awayTeamId`, `awayTeamAbbreviation`, `homeScore`, `awayScore`, `homeWinner`, `awayWinner`, `venue`, `venueId`, `awayProbablePitcher`, `awayProbablePitcherId`, `homeProbablePitcher`, `homeProbablePitcherId`, `weatherCondition`, `weatherTemp`, `weatherWind`, `awayRuns`, `homeRuns`, `awayHits`, `homeHits`, `awayErrors`, `homeErrors`, `innings`, `winningPitcher`, `winningPitcherId`, `losingPitcher`, `losingPitcherId`, `savePitcher`, `savePitcherId`, `attendance`, `firstPitch`, `gameDurationMinutes`, `delayDurationMinutes`, `officials`, `noHitter`, `perfectGame`, `mlbUrl`, `scrapedAt`.\n\n### Standing (`getStandings`)\n\n`recordType`, `teamName`, `teamId`, `leagueName`, `leagueId`, `divisionName`, `divisionId`, `season`, `wins`, `losses`, `gamesPlayed`, `pct`, `divisionRank`, `leagueRank`, `sportRank`, `wildCardRank`, `gamesBack`, `wildCardGamesBack`, `leagueGamesBack`, `sportGamesBack`, `divisionGamesBack`, `streakCode`, `streakType`, `streakNumber`, `runsScored`, `runsAllowed`, `runDifferential`, `clinched`, `divisionChamp`, `divisionLeader`, `hasWildcard`, `clinchIndicator`, `magicNumber`, `eliminationNumber`, `wildCardEliminationNumber`, `homeRecord`, `awayRecord`, `lastTenRecord`, `overallRecord`, `leagueRecord`, `divisionRecord`, `mlbUrl`, `scrapedAt`.\n\n### Box score (`getBoxscore`)\n\n`recordType` (`battingLine`, `pitchingLine`, `fieldingLine`), `statGroup`, `gamePk`, `season`, `gameDate`, `officialDate`, `gameType`, `status`, `homeTeam`, `homeTeamId`, `awayTeam`, `awayTeamId`, `homeScore`, `awayScore`, `venue`, `attendance`, `weatherCondition`, `weatherWind`, `firstPitch`, `gameDurationMinutes`, `winningPitcher`, `losingPitcher`, `savePitcher`, `isHome`, `teamName`, `teamId`, `playerId`, `playerName`, `fullName`, `jerseyNumber`, `position`, `battingOrder`, `summary`, `decision`, `mlbUrl`, and every non-empty stat field for the selected group. When games come from `gamePks`, only fields the boxscore payload carries are present (for example `officialDate`, not `gameDate`, `gameType`, or `status`). `seasonBattingAverage`, `seasonOnBasePercentage`, `seasonSluggingPct`, `seasonOps`, `seasonEra`, and `seasonWhip` add season context. With `includeTeamTotals`, `teamGame` records add `teamStats` and `lineScore`.\n\n### Leader (`getLeaders`)\n\n`recordType`, `leaderCategory`, `statGroup`, `season`, `gameType`, `gameTypeDescription`, `rank`, `value`, `playerId`, `playerName`, `teamId`, `teamName`, `leagueName`, `sportId`, `mlbUrl`, `scrapedAt`.\n\n### Reference (`getReference`)\n\n- Venue: `recordType`, `venueId`, `name`, `active`, `season`, `city`, `state`, `stateAbbrev`, `postalCode`, `country`, `address`, `phone`, `latitude`, `longitude`, `azimuthAngle`, `elevation`, `capacity`, `turfType`, `roofType`, outfield distances (`leftLine`, `left`, `leftCenter`, `center`, `rightCenter`, `right`, `rightLine`).\n- League: `recordType`, `leagueId`, `name`, `abbreviation`, `nameShort`, `seasonState`, `hasWildCard`, `hasSplitSeason`, `numGames`, `numTeams`, `numWildcardTeams`, and season calendar dates.\n- Division: `recordType`, `divisionId`, `name`, `nameShort`, `abbreviation`, `leagueId`, `leagueName`, `sportId`, `hasWildcard`, `active`, `sortOrder`, `numPlayoffTeams`.\n- Season: `recordType`, `seasonId`, `hasWildcard`, and the full MLB season calendar (`regularSeasonStartDate`, `regularSeasonEndDate`, `postSeasonStartDate`, `postSeasonEndDate`, and related dates).\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | string | `getPlayerStats` | `getTeams`, `getPlayers`, `getPlayerStats`, `getGameLog`, `getSchedule`, `getStandings`, `getBoxscore`, `getLeaders`, `getReference` |\n| `seasons` | array | – | Season years, e.g. `2026`; multiple seasons allowed |\n| `teamIds` | array | all teams | MLB team IDs, names, abbreviations, or team URLs (e.g. `147`, `Yankees`, `NYY`) |\n| `playerIds` | array | – | MLB player IDs, e.g. `660271` |\n| `gamePks` | array | – | MLB game IDs for `getBoxscore` |\n| `startDate` | string | – | `YYYY-MM-DD` for schedules, box scores, or date-range stats |\n| `endDate` | string | – | `YYYY-MM-DD` for schedules, box scores, or date-range stats |\n| `statGroup` | string | `hitting` | `hitting`, `pitching`, or `fielding` |\n| `statType` | string | `season` | `season`, `career`, `yearByYear`, `byMonth`, `byDayOfWeek`, `homeAndAway`, `byDateRange` |\n| `rosterType` | string | `active` | `active`, `40Man`, `fullSeason`, `depthChart`, `coach` |\n| `searchQuery` | string | – | Player name search for `getPlayers`, e.g. `Ohtani` |\n| `leagueId` | string | `both` | `both`, `AL`, or `NL` for standings and leaders |\n| `gameType` | string | `R` | `S`, `R`, `F`, `D`, `L`, `W`, `C`, `P`, `A`, `I`, `E` |\n| `leaderCategory` | string | `homeRuns` | Category for `getLeaders`, e.g. `homeRuns`, `battingAverage`, `earnedRunAverage`, `saves` |\n| `referenceType` | string | `venues` | `venues`, `leagues`, `divisions`, or `seasons` |\n| `includeStats` | boolean | `false` | Add season stats to `getPlayers` rows |\n| `includeTeamTotals` | boolean | `false` | Add team totals and line score to `getBoxscore` |\n| `maxItems` | integer | `50` | Hard cap on records (1–10,000) |\n\n## Examples\n\n### A team's roster with season stats\n\n```json\n{\n  \"mode\": \"getPlayers\",\n  \"seasons\": [\"2026\"],\n  \"teamIds\": [\"Yankees\"],\n  \"rosterType\": \"active\",\n  \"includeStats\": true,\n  \"maxItems\": 40\n}\n```\n\n### A week of games with probable pitchers and decisions\n\n```json\n{\n  \"mode\": \"getSchedule\",\n  \"startDate\": \"2026-06-01\",\n  \"endDate\": \"2026-06-07\",\n  \"gameType\": \"R\",\n  \"maxItems\": 100\n}\n```\n\n### Season pitching stats for two players\n\n```json\n{\n  \"mode\": \"getPlayerStats\",\n  \"seasons\": [\"2024\", \"2025\"],\n  \"playerIds\": [\"660271\", \"592450\"],\n  \"statGroup\": \"pitching\",\n  \"statType\": \"season\",\n  \"maxItems\": 20\n}\n```\n\n### A box score with per-player lines and team totals\n\n```json\n{\n  \"mode\": \"getBoxscore\",\n  \"gamePks\": [\"822974\"],\n  \"statGroup\": \"hitting\",\n  \"includeTeamTotals\": true,\n  \"maxItems\": 50\n}\n```\n\n## Use cases\n\n- **Fantasy baseball** — pull rosters, season lines, and per-game logs for lineup decisions.\n- **Betting and prediction models** — backtest with schedules, scores, probable pitchers, and box scores.\n- **Sports apps and dashboards** — power scoreboards, standings tables, and player pages.\n- **Analytics and research** — join stable MLB IDs across seasons, teams, and games.\n- **Media and newsletters** — generate recaps, leaderboards, and matchup previews.\n- **Data engineering** — build clean historical datasets with one record type per row.\n\n## FAQ\n\n### Is this an official MLB product?\n\nNo. This is an independent, third-party actor that reads MLB's public Stats API. It is not affiliated with, endorsed by, or sponsored by Major League Baseball or any club.\n\n### Do I need an API key, login, or proxy?\n\nNo. The public Stats API needs no key or account, and the actor does not require a proxy.\n\n### How far back does the data go?\n\nPlayer stats go back to 1876 and schedules to 1901 in the source. Early seasons have fewer recorded fields; those fields are omitted when the source does not have them.\n\n### What is the difference between `getPlayerStats`, `getGameLog`, and `getBoxscore`?\n\n`getPlayerStats` returns season, career, or split totals. `getGameLog` returns one row per player per game. `getBoxscore` returns every player's batting, pitching, or fielding line from one game, plus game context.\n\n### Why are some fields missing from a record?\n\nThe API does not publish every field for every player, game, or season. Empty fields are omitted rather than filled with placeholders.\n\n### Why is there no save pitcher on some games?\n\nA save only exists when the game situation creates one. Games without a save omit `savePitcher`.\n\n### Can I request several seasons or teams at once?\n\nYes. Put multiple years in `seasons` and multiple IDs, names, or team URLs in `teamIds`. Duplicate rows are removed by MLB IDs.\n\n### Which seasons need player or team IDs for splits?\n\nSeason, career, and date-range stats work for the full player pool. Date-range stats take their seasons from `startDate`/`endDate`, so the dates and `seasons` do not disagree. Season-by-season, month, day-of-week, and home/away splits require `playerIds` or `teamIds` because they are per-player views in the source.\n\n### Will my existing tasks keep working?\n\nYes. Existing modes and output fields are preserved. Older tasks that send `season` or `teamId` are still accepted and mapped to the new fields.\n\n### Are doubleheaders handled?\n\nYes. Games are de-duplicated by `gamePk`, so both games of a doubleheader are kept.\n\n## Data source\n\nThe actor reads `statsapi.mlb.com`, the public JSON feed behind MLB.com and the MLB app. It is an undocumented public API; endpoint behavior and field availability can change. Use the data in accordance with MLB's terms and any applicable law.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "official-mlb-team-schedule-and-stat-line-scraper",
      "title": "Official MLB Team, Schedule & Stat Line Scraper",
      "description": "Pull official MLB data from statsapi.mlb.com: teams, rosters, schedules with probable pitchers, standings, season and game-log stats, per-player box scores, league leaders, and venue reference data. No key, login, or proxy.",
      "version": "1.1",
      "buildTag": "latest",
      "defaultMemoryMbytes": 1024,
      "dockerfile": "./Dockerfile",
      "readme": "# Official MLB Team, Schedule & Stat Line Scraper\n\nPull Major League Baseball data straight from MLB's public Stats API. Get all 30 clubs, player bios and rosters, schedules with probable pitchers and final scores, division standings, season and career stat lines, player game logs, per-player box scores, league leaderboards, and ballpark reference data. Nine modes, one dataset, no API key, no login, and no proxy setup.\n\n## What this actor does\n\n- **Nine modes in one actor** — teams, players/rosters, player stats, game logs, schedule, standings, box scores, leaders, and reference data.\n- **Complete player pool** — season stats include every player the source returns, not only qualified hitters or pitchers.\n- **Historical coverage** — stats reach back to 1876 and schedules to 1901; request one season or several in the same run.\n- **Game-level detail** — schedules include probable pitchers, weather, decisions, attendance, umpires, and inning line scores; box scores return per-player batting, pitching, or fielding lines.\n- **Clean, flat records** — every record carries a `recordType` and `scrapedAt`; fields the source does not have for a record are omitted rather than sent as null.\n\n## Modes\n\n| Mode | One record per | Highlights |\n|---|---|---|\n| `getTeams` | Club | League, division, venue, franchise, logo, team URL |\n| `getPlayers` | Player | Bio, position, bats/throws, debut, headshot, team; rosters and name search; optional season stats |\n| `getPlayerStats` | Player stat split | Season, career, season-by-season, month, day-of-week, home/away, or date-range lines |\n| `getGameLog` | Player per game | One row per game with the full stat line, opponent, and game ID |\n| `getSchedule` | Game | Scores, status, probable pitchers, weather, decisions, attendance, umpires, line score |\n| `getStandings` | Team season record | Wins, losses, pct, ranks, games back, streaks, splits, clinch and elimination numbers |\n| `getBoxscore` | Player per game | Batting, pitching, or fielding line plus game context; optional team totals and line score |\n| `getLeaders` | Ranked player | Category, rank, value, player, team, league |\n| `getReference` | Venue / league / division / season | Ballpark capacity, surface, roof, coordinates, league and division metadata, season calendar |\n\n## Output per record type\n\n### Team (`getTeams`)\n\n`recordType`, `teamId`, `name`, `abbreviation`, `teamName`, `shortName`, `locationName`, `clubName`, `franchiseName`, `firstYearOfPlay`, `teamCode`, `fileCode`, `leagueName`, `leagueId`, `divisionName`, `divisionId`, `venueName`, `venueId`, `sportName`, `springLeagueName`, `allStarStatus`, `active`, `season`, `logoUrl`, `mlbUrl`, `scrapedAt`.\n\n### Player (`getPlayers`)\n\n`recordType`, `playerId`, `fullName`, `firstName`, `lastName`, `middleName`, `useName`, `primaryNumber`, `birthDate`, `currentAge`, `birthCity`, `birthStateProvince`, `birthCountry`, `height`, `weight`, `active`, `primaryPosition`, `primaryPositionCode`, `primaryPositionType`, `batSide`, `pitchHand`, `mlbDebutDate`, `draftYear`, `nickName`, `nameSlug`, `boxscoreName`, `currentTeam`, `currentTeamId`, `leagueName`, `divisionName`, `headshotUrl`, `mlbUrl`, `season`. Roster rows also include `jerseyNumber`, `rosterStatus`, `parentTeamId`, `rosterPosition`, and `rosterPositionAbbreviation`. With `includeStats`, a `stats` object holds the selected stat group.\n\n### Player stats (`getPlayerStats`)\n\n`recordType`, `playerId`, `playerName`, `fullName`, `firstName`, `lastName`, `teamId`, `teamName`, `position`, `positionAbbreviation`, `leagueName`, `sportId`, `season`, `statType`, `statGroup`, `splitKey`, `splitValue`, `month`, `monthName`, `dayOfWeek`, `dayOfWeekName`, `isHome`, `situationCode`, `startDate`, `endDate`, `mlbUrl`. Every non-empty stat field returned by MLB is included, for example: `gamesPlayed`, `atBats`, `runs`, `hits`, `doubles`, `triples`, `homeRuns`, `rbi`, `baseOnBalls`, `walks`, `strikeOuts`, `strikeouts`, `stolenBases`, `caughtStealing`, `avg`, `battingAverage`, `obp`, `onBasePercentage`, `slg`, `sluggingPct`, `ops`, `babip`, `wins`, `losses`, `saves`, `holds`, `blownSaves`, `inningsPitched`, `earnedRuns`, `era`, `whip`, `battersFaced`, `numberOfPitches`, `completeGames`, `shutouts`, `strikeoutsPer9Inn`, `walksPer9Inn`, `fieldingPercentage`, `chances`, `putOuts`, `assists`, `errors`, `doublePlays`.\n\n### Game log (`getGameLog`)\n\n`recordType`, `playerId`, `playerName`, `fullName`, `teamId`, `teamName`, `opponentId`, `opponentName`, `isHome`, `gamePk`, `officialDate`, `date`, `season`, `gameType`, `statGroup`, `mlbUrl`, plus every non-empty stat field for that game.\n\n### Game (`getSchedule`)\n\n`recordType`, `gamePk`, `gameGuid`, `season`, `gameDate`, `officialDate`, `gameType`, `gameNumber`, `doubleHeader`, `dayNight`, `seriesDescription`, `seriesGameNumber`, `gamesInSeries`, `scheduledInnings`, `isTie`, `recordSource`, `publicFacing`, `status`, `abstractGameState`, `codedGameState`, `statusCode`, `homeTeam`, `homeTeamId`, `homeTeamAbbreviation`, `awayTeam`, `awayTeamId`, `awayTeamAbbreviation`, `homeScore`, `awayScore`, `homeWinner`, `awayWinner`, `venue`, `venueId`, `awayProbablePitcher`, `awayProbablePitcherId`, `homeProbablePitcher`, `homeProbablePitcherId`, `weatherCondition`, `weatherTemp`, `weatherWind`, `awayRuns`, `homeRuns`, `awayHits`, `homeHits`, `awayErrors`, `homeErrors`, `innings`, `winningPitcher`, `winningPitcherId`, `losingPitcher`, `losingPitcherId`, `savePitcher`, `savePitcherId`, `attendance`, `firstPitch`, `gameDurationMinutes`, `delayDurationMinutes`, `officials`, `noHitter`, `perfectGame`, `mlbUrl`, `scrapedAt`.\n\n### Standing (`getStandings`)\n\n`recordType`, `teamName`, `teamId`, `leagueName`, `leagueId`, `divisionName`, `divisionId`, `season`, `wins`, `losses`, `gamesPlayed`, `pct`, `divisionRank`, `leagueRank`, `sportRank`, `wildCardRank`, `gamesBack`, `wildCardGamesBack`, `leagueGamesBack`, `sportGamesBack`, `divisionGamesBack`, `streakCode`, `streakType`, `streakNumber`, `runsScored`, `runsAllowed`, `runDifferential`, `clinched`, `divisionChamp`, `divisionLeader`, `hasWildcard`, `clinchIndicator`, `magicNumber`, `eliminationNumber`, `wildCardEliminationNumber`, `homeRecord`, `awayRecord`, `lastTenRecord`, `overallRecord`, `leagueRecord`, `divisionRecord`, `mlbUrl`, `scrapedAt`.\n\n### Box score (`getBoxscore`)\n\n`recordType` (`battingLine`, `pitchingLine`, `fieldingLine`), `statGroup`, `gamePk`, `season`, `gameDate`, `officialDate`, `gameType`, `status`, `homeTeam`, `homeTeamId`, `awayTeam`, `awayTeamId`, `homeScore`, `awayScore`, `venue`, `attendance`, `weatherCondition`, `weatherWind`, `firstPitch`, `gameDurationMinutes`, `winningPitcher`, `losingPitcher`, `savePitcher`, `isHome`, `teamName`, `teamId`, `playerId`, `playerName`, `fullName`, `jerseyNumber`, `position`, `battingOrder`, `summary`, `decision`, `mlbUrl`, and every non-empty stat field for the selected group. When games come from `gamePks`, only fields the boxscore payload carries are present (for example `officialDate`, not `gameDate`, `gameType`, or `status`). `seasonBattingAverage`, `seasonOnBasePercentage`, `seasonSluggingPct`, `seasonOps`, `seasonEra`, and `seasonWhip` add season context. With `includeTeamTotals`, `teamGame` records add `teamStats` and `lineScore`.\n\n### Leader (`getLeaders`)\n\n`recordType`, `leaderCategory`, `statGroup`, `season`, `gameType`, `gameTypeDescription`, `rank`, `value`, `playerId`, `playerName`, `teamId`, `teamName`, `leagueName`, `sportId`, `mlbUrl`, `scrapedAt`.\n\n### Reference (`getReference`)\n\n- Venue: `recordType`, `venueId`, `name`, `active`, `season`, `city`, `state`, `stateAbbrev`, `postalCode`, `country`, `address`, `phone`, `latitude`, `longitude`, `azimuthAngle`, `elevation`, `capacity`, `turfType`, `roofType`, outfield distances (`leftLine`, `left`, `leftCenter`, `center`, `rightCenter`, `right`, `rightLine`).\n- League: `recordType`, `leagueId`, `name`, `abbreviation`, `nameShort`, `seasonState`, `hasWildCard`, `hasSplitSeason`, `numGames`, `numTeams`, `numWildcardTeams`, and season calendar dates.\n- Division: `recordType`, `divisionId`, `name`, `nameShort`, `abbreviation`, `leagueId`, `leagueName`, `sportId`, `hasWildcard`, `active`, `sortOrder`, `numPlayoffTeams`.\n- Season: `recordType`, `seasonId`, `hasWildcard`, and the full MLB season calendar (`regularSeasonStartDate`, `regularSeasonEndDate`, `postSeasonStartDate`, `postSeasonEndDate`, and related dates).\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | string | `getPlayerStats` | `getTeams`, `getPlayers`, `getPlayerStats`, `getGameLog`, `getSchedule`, `getStandings`, `getBoxscore`, `getLeaders`, `getReference` |\n| `seasons` | array | – | Season years, e.g. `2026`; multiple seasons allowed |\n| `teamIds` | array | all teams | MLB team IDs, names, abbreviations, or team URLs (e.g. `147`, `Yankees`, `NYY`) |\n| `playerIds` | array | – | MLB player IDs, e.g. `660271` |\n| `gamePks` | array | – | MLB game IDs for `getBoxscore` |\n| `startDate` | string | – | `YYYY-MM-DD` for schedules, box scores, or date-range stats |\n| `endDate` | string | – | `YYYY-MM-DD` for schedules, box scores, or date-range stats |\n| `statGroup` | string | `hitting` | `hitting`, `pitching`, or `fielding` |\n| `statType` | string | `season` | `season`, `career`, `yearByYear`, `byMonth`, `byDayOfWeek`, `homeAndAway`, `byDateRange` |\n| `rosterType` | string | `active` | `active`, `40Man`, `fullSeason`, `depthChart`, `coach` |\n| `searchQuery` | string | – | Player name search for `getPlayers`, e.g. `Ohtani` |\n| `leagueId` | string | `both` | `both`, `AL`, or `NL` for standings and leaders |\n| `gameType` | string | `R` | `S`, `R`, `F`, `D`, `L`, `W`, `C`, `P`, `A`, `I`, `E` |\n| `leaderCategory` | string | `homeRuns` | Category for `getLeaders`, e.g. `homeRuns`, `battingAverage`, `earnedRunAverage`, `saves` |\n| `referenceType` | string | `venues` | `venues`, `leagues`, `divisions`, or `seasons` |\n| `includeStats` | boolean | `false` | Add season stats to `getPlayers` rows |\n| `includeTeamTotals` | boolean | `false` | Add team totals and line score to `getBoxscore` |\n| `maxItems` | integer | `50` | Hard cap on records (1–10,000) |\n\n## Examples\n\n### A team's roster with season stats\n\n```json\n{\n  \"mode\": \"getPlayers\",\n  \"seasons\": [\"2026\"],\n  \"teamIds\": [\"Yankees\"],\n  \"rosterType\": \"active\",\n  \"includeStats\": true,\n  \"maxItems\": 40\n}\n```\n\n### A week of games with probable pitchers and decisions\n\n```json\n{\n  \"mode\": \"getSchedule\",\n  \"startDate\": \"2026-06-01\",\n  \"endDate\": \"2026-06-07\",\n  \"gameType\": \"R\",\n  \"maxItems\": 100\n}\n```\n\n### Season pitching stats for two players\n\n```json\n{\n  \"mode\": \"getPlayerStats\",\n  \"seasons\": [\"2024\", \"2025\"],\n  \"playerIds\": [\"660271\", \"592450\"],\n  \"statGroup\": \"pitching\",\n  \"statType\": \"season\",\n  \"maxItems\": 20\n}\n```\n\n### A box score with per-player lines and team totals\n\n```json\n{\n  \"mode\": \"getBoxscore\",\n  \"gamePks\": [\"822974\"],\n  \"statGroup\": \"hitting\",\n  \"includeTeamTotals\": true,\n  \"maxItems\": 50\n}\n```\n\n## Use cases\n\n- **Fantasy baseball** — pull rosters, season lines, and per-game logs for lineup decisions.\n- **Betting and prediction models** — backtest with schedules, scores, probable pitchers, and box scores.\n- **Sports apps and dashboards** — power scoreboards, standings tables, and player pages.\n- **Analytics and research** — join stable MLB IDs across seasons, teams, and games.\n- **Media and newsletters** — generate recaps, leaderboards, and matchup previews.\n- **Data engineering** — build clean historical datasets with one record type per row.\n\n## FAQ\n\n### Is this an official MLB product?\n\nNo. This is an independent, third-party actor that reads MLB's public Stats API. It is not affiliated with, endorsed by, or sponsored by Major League Baseball or any club.\n\n### Do I need an API key, login, or proxy?\n\nNo. The public Stats API needs no key or account, and the actor does not require a proxy.\n\n### How far back does the data go?\n\nPlayer stats go back to 1876 and schedules to 1901 in the source. Early seasons have fewer recorded fields; those fields are omitted when the source does not have them.\n\n### What is the difference between `getPlayerStats`, `getGameLog`, and `getBoxscore`?\n\n`getPlayerStats` returns season, career, or split totals. `getGameLog` returns one row per player per game. `getBoxscore` returns every player's batting, pitching, or fielding line from one game, plus game context.\n\n### Why are some fields missing from a record?\n\nThe API does not publish every field for every player, game, or season. Empty fields are omitted rather than filled with placeholders.\n\n### Why is there no save pitcher on some games?\n\nA save only exists when the game situation creates one. Games without a save omit `savePitcher`.\n\n### Can I request several seasons or teams at once?\n\nYes. Put multiple years in `seasons` and multiple IDs, names, or team URLs in `teamIds`. Duplicate rows are removed by MLB IDs.\n\n### Which seasons need player or team IDs for splits?\n\nSeason, career, and date-range stats work for the full player pool. Date-range stats take their seasons from `startDate`/`endDate`, so the dates and `seasons` do not disagree. Season-by-season, month, day-of-week, and home/away splits require `playerIds` or `teamIds` because they are per-player views in the source.\n\n### Will my existing tasks keep working?\n\nYes. Existing modes and output fields are preserved. Older tasks that send `season` or `teamId` are still accepted and mapped to the new fields.\n\n### Are doubleheaders handled?\n\nYes. Games are de-duplicated by `gamePk`, so both games of a doubleheader are kept.\n\n## Data source\n\nThe actor reads `statsapi.mlb.com`, the public JSON feed behind MLB.com and the MLB app. It is an undocumented public API; endpoint behavior and field availability can change. Use the data in accordance with MLB's terms and any applicable law.\n",
      "input": {
        "title": "Official MLB Team, Schedule & Stat Line Scraper Input",
        "description": "Fetch official MLB data from statsapi.mlb.com — teams, rosters, schedules, standings, stat lines, box scores, leaders, and reference data.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "What to fetch. Nine modes cover teams, players/rosters, player stats, game logs, schedules, standings, box scores, leaders, and reference data.",
            "editor": "select",
            "enum": [
              "getTeams",
              "getPlayers",
              "getPlayerStats",
              "getGameLog",
              "getSchedule",
              "getStandings",
              "getBoxscore",
              "getLeaders",
              "getReference"
            ],
            "enumTitles": [
              "Teams",
              "Players and rosters",
              "Player stats (season, career, splits)",
              "Player game-by-game log",
              "Schedule and scores",
              "Standings",
              "Box score stat lines",
              "League leaders",
              "Reference data (venues, leagues, divisions, seasons)"
            ],
            "default": "getPlayerStats",
            "prefill": "getPlayers"
          },
          "seasons": {
            "title": "Seasons",
            "type": "array",
            "description": "Season years, e.g. 2024 or 2025. Leave empty for the current season. Stats cover 1876 onward; schedules cover 1901 onward. Multiple seasons can be fetched in one run (mode=getTeams, getPlayers, getPlayerStats, getSchedule, getStandings, getLeaders, getReference).",
            "editor": "stringList",
            "items": {
              "type": "string"
            },
            "default": [],
            "prefill": []
          },
          "teamIds": {
            "title": "Teams",
            "type": "array",
            "description": "Filter by MLB team IDs (147 = Yankees), team names (Yankees), abbreviations (NYY), or team URLs (https://www.mlb.com/yankees). Leave empty for all teams. Used by teams, players, player stats, schedule, standings, box score, and leaders modes.",
            "editor": "stringList",
            "items": {
              "type": "string"
            },
            "default": [],
            "prefill": []
          },
          "playerIds": {
            "title": "Player IDs",
            "type": "array",
            "description": "MLB player IDs, e.g. 660271 for Shohei Ohtani. Used by players, player stats, and game log modes. Use Search query to find a player ID by name.",
            "editor": "stringList",
            "items": {
              "type": "string"
            },
            "default": [],
            "prefill": []
          },
          "gamePks": {
            "title": "Game IDs",
            "type": "array",
            "description": "MLB game IDs (gamePk), e.g. 822974. Used by mode=getBoxscore. Leave empty to derive games from seasons, dates, or teams.",
            "editor": "stringList",
            "items": {
              "type": "string"
            },
            "default": [],
            "prefill": []
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Start date in YYYY-MM-DD format. Used by schedule, box score, and player stats (statType=byDateRange). A single date can be set in either date field.",
            "editor": "textfield"
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "End date in YYYY-MM-DD format. Used by schedule, box score, and player stats (statType=byDateRange).",
            "editor": "textfield"
          },
          "statGroup": {
            "title": "Stat group",
            "type": "string",
            "description": "Which stat category to return for players, player stats, game logs, box scores, and leaders.",
            "editor": "select",
            "enum": [
              "hitting",
              "pitching",
              "fielding"
            ],
            "enumTitles": [
              "Hitting",
              "Pitching",
              "Fielding"
            ],
            "default": "hitting",
            "prefill": "hitting"
          },
          "statType": {
            "title": "Stat type",
            "type": "string",
            "description": "Scope for mode=getPlayerStats. Season, career, and date-range stats work for the whole player pool; season-by-season, month, day-of-week, and home/away splits require playerIds or teamIds.",
            "editor": "select",
            "enum": [
              "season",
              "career",
              "yearByYear",
              "byMonth",
              "byDayOfWeek",
              "homeAndAway",
              "byDateRange"
            ],
            "enumTitles": [
              "Season totals",
              "Career totals",
              "Season by season",
              "By month",
              "By day of week",
              "Home and away",
              "Date range"
            ],
            "default": "season",
            "prefill": "season"
          },
          "rosterType": {
            "title": "Roster type",
            "type": "string",
            "description": "Which roster to return for mode=getPlayers when teamIds is set.",
            "editor": "select",
            "enum": [
              "active",
              "40Man",
              "fullSeason",
              "depthChart",
              "coach"
            ],
            "enumTitles": [
              "Active roster",
              "40-man roster",
              "Full-season roster",
              "Depth chart",
              "Coaching staff"
            ],
            "default": "active",
            "prefill": "active"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Find players by name for mode=getPlayers, e.g. Ohtani or Aaron Judge. Returns up to 50 matching players.",
            "editor": "textfield"
          },
          "leagueId": {
            "title": "League",
            "type": "string",
            "description": "Filter standings and leaders to the American League, National League, or both.",
            "editor": "select",
            "enum": [
              "both",
              "AL",
              "NL"
            ],
            "enumTitles": [
              "Both leagues",
              "American League",
              "National League"
            ],
            "default": "both",
            "prefill": "both"
          },
          "gameType": {
            "title": "Game type",
            "type": "string",
            "description": "Filter games and stats by game type. Regular season is R; other codes include spring training (S), wild card (F), division series (D), league championship (L), World Series (W), and All-Star (A).",
            "editor": "select",
            "enum": [
              "S",
              "R",
              "F",
              "D",
              "L",
              "W",
              "C",
              "P",
              "A",
              "I",
              "E"
            ],
            "enumTitles": [
              "Spring Training",
              "Regular Season",
              "Wild Card",
              "Division Series",
              "League Championship Series",
              "World Series",
              "Championship",
              "Postseason",
              "All-Star Game",
              "Intrasquad",
              "Exhibition"
            ],
            "default": "R",
            "prefill": "R"
          },
          "leaderCategory": {
            "title": "Leader category",
            "type": "string",
            "description": "Stat category for mode=getLeaders. Choose a category that belongs to the selected stat group, e.g. homeRuns, battingAverage, or runsBattedIn for hitting; earnedRunAverage, strikeouts, or saves for pitching; fieldingPercentage or errors for fielding.",
            "editor": "select",
            "enum": [
              "homeRuns",
              "battingAverage",
              "runsBattedIn",
              "hits",
              "runs",
              "stolenBases",
              "doubles",
              "triples",
              "walks",
              "onBasePlusSlugging",
              "strikeouts",
              "hitByPitch",
              "caughtStealing",
              "intentionalWalks",
              "totalBases",
              "plateAppearances",
              "gamesPlayed",
              "atBats",
              "sacrificeFlies",
              "groundIntoDoublePlay",
              "earnedRunAverage",
              "wins",
              "saves",
              "whip",
              "inningsPitched",
              "losses",
              "gamesStarted",
              "completeGames",
              "shutouts",
              "holds",
              "blownSaves",
              "walksPer9Inn",
              "strikeoutsPer9Inn",
              "hitsPer9Inn",
              "winPercentage",
              "strikeoutWalkRatio",
              "battersFaced",
              "numberOfPitches",
              "wildPitches",
              "balks",
              "fieldingPercentage",
              "errors",
              "assists",
              "putOuts",
              "chances",
              "doublePlays",
              "rangeFactorPerGame",
              "innings"
            ],
            "enumTitles": [
              "Home runs",
              "Batting average",
              "Runs batted in",
              "Hits",
              "Runs",
              "Stolen bases",
              "Doubles",
              "Triples",
              "Walks",
              "On-base plus slugging",
              "Strikeouts",
              "Hit by pitch",
              "Caught stealing",
              "Intentional walks",
              "Total bases",
              "Plate appearances",
              "Games played",
              "At bats",
              "Sacrifice flies",
              "Grounded into double play",
              "Earned run average",
              "Wins",
              "Saves",
              "WHIP",
              "Innings pitched",
              "Losses",
              "Games started",
              "Complete games",
              "Shutouts",
              "Holds",
              "Blown saves",
              "Walks per 9 innings",
              "Strikeouts per 9 innings",
              "Hits per 9 innings",
              "Win percentage",
              "Strikeout-to-walk ratio",
              "Batters faced",
              "Number of pitches",
              "Wild pitches",
              "Balks",
              "Fielding percentage",
              "Errors",
              "Assists",
              "Putouts",
              "Chances",
              "Double plays",
              "Range factor per game",
              "Innings"
            ],
            "default": "homeRuns",
            "prefill": "homeRuns"
          },
          "referenceType": {
            "title": "Reference data",
            "type": "string",
            "description": "Which reference dataset to return for mode=getReference.",
            "editor": "select",
            "enum": [
              "venues",
              "leagues",
              "divisions",
              "seasons"
            ],
            "enumTitles": [
              "Ballparks and venues",
              "Leagues",
              "Divisions",
              "Season calendar"
            ],
            "default": "venues",
            "prefill": "venues"
          },
          "includeStats": {
            "title": "Include season stats",
            "type": "boolean",
            "description": "For mode=getPlayers, attach each player's season stats for the selected stat group.",
            "default": false,
            "prefill": false
          },
          "includeTeamTotals": {
            "title": "Include team totals and line score",
            "type": "boolean",
            "description": "For mode=getBoxscore, add one team-total record per side per game, including the inning-by-inning line score.",
            "default": false,
            "prefill": false
          },
          "maxItems": {
            "title": "Maximum records",
            "type": "integer",
            "description": "Hard cap on the number of records returned (1–10,000).",
            "minimum": 1,
            "maximum": 10000,
            "default": 50,
            "prefill": 3
          }
        },
        "required": [
          "mode"
        ]
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "Official MLB Team, Schedule & Stat Line Scraper Output",
        "description": "One record per MLB team, player, stat line, game, standing, leader, box-score line, venue, league, division, or season calendar row, sourced from the official MLB Stats API.",
        "properties": {
          "mlbData": {
            "type": "string",
            "title": "MLB data records",
            "description": "Dataset containing the requested MLB records, tagged by recordType.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "views": {
            "overview": {
              "title": "MLB data",
              "transformation": {
                "fields": [
                  "recordType",
                  "playerName",
                  "teamName",
                  "gamePk",
                  "officialDate",
                  "statGroup",
                  "leaderCategory",
                  "rank",
                  "value",
                  "homeRuns",
                  "battingAverage",
                  "era"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            }
          }
        }
      },
      "environmentVariables": {}
    },
    "buildNumber": "1.1.2",
    "imageDigest": "4bfa1f97cbda097e85544f96c2dc8994e8d53cb0a6e0b1422c355758027a8c29",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "1.1"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.005995555555555555
    }
  }
}