Skip to content

MLB Stats Scraper

Try for free

Scrape MLB standings, schedules and scores, season player stats, box scores, rosters with bios, league leaders and teams from the official MLB Stats API. Multi-season, back to 1876. No login needed.

⚾ MLB Stats Scraper

Get Major League Baseball data straight from the official MLB Stats API: division standings, schedules and final scores, season hitting, pitching and fielding lines, box scores per team or per player, rosters with player bios, league leaderboards and all 30 clubs. Every row is flat and ready for Excel, Google Sheets or a database. No login, no API key, and small runs usually finish in 5 to 7 seconds.

✨ Why use MLB Stats Scraper?

  • 🧰 Seven datasets in one actor: standings, schedule and scores, player stats, box scores, rosters, leaders and teams.
  • 📅 Many seasons in one run: ask for 2026, 2020-2026 or any season back to 1876, and every row is tagged with its season.
  • 🧾 Richer rows: winning, losing and save pitchers, probable starters, inning-by-inning line scores, TV networks, home, away and last-10 records, expected W-L and per-player box score lines.
  • 🔎 Teams by name: type Yankees, NYY or 147. All three work.
  • 📊 Sorted stats: sort player stats by any stat (home runs, OPS, ERA...) and keep only qualified players.
  • 💸 Cheap: $3.50 per 1,000 rows and no start fee.

🎯 Use cases

  • 🏆 Fantasy baseball: nightly player stat pulls, box score lines and probable pitchers for lineup decisions.
  • 📈 Betting and modelling: multi-season game results, run differentials and expected records for backtesting.
  • 📰 Sports media and newsletters: standings tables, leaderboards and final scores without manual entry.
  • 🧪 Data science: consistent, flat training sets across seasons and teams.
  • 📱 Apps and dashboards: a feed for schedule widgets, team pages and player cards.

🚀 How to use

  1. Pick What to scrape: standings, schedule, player stats, box scores, players, leaders or teams.
  2. Enter one or more Seasons (empty means the current season). For schedule and box scores you can set a date or a date range instead.
  3. Optionally limit the run to some Teams, players or games, and set the filters (game type, league, roster type).
  4. Set Maximum results (0 means everything) and click Start.
  5. Download the results as JSON, CSV, Excel or HTML, or read them through the API.

📥 Input

FieldWhat it does
modestandings, schedule, playerStats, gameDetails (box scores), players, leaders or teams
seasonsSeasons such as ["2026"] or ["2020-2026"]; empty means the current season
teamIdsTeam ids, abbreviations or names, e.g. ["147", "LAD", "Red Sox"]; empty means all teams
playerIdsPlayer stats for these players only (person id or mlb.com player URL)
gamePksSchedule or box scores for these games only (gamePk or mlb.com gameday URL)
date, fromDate, toDateOne day or a date range (YYYY-MM-DD) for schedule and box scores
gameTypeRegular season, postseason, spring training, a playoff round, All-Star or any
leagueIdBoth leagues, AL or NL
statGroupHitting, pitching or fielding (player stats and leaders)
sortBy, sortOrder, qualifiedOnlySort player stats by a stat, highest or lowest first, qualified players only
leaderCategories, leadersPerCategoryLeaderboards to pull (homeRuns, battingAverage, ERA, saves...) and how many ranks each
boxScoreLevelTwo team-total rows per game, or one row per player
rosterTypeActive roster, 40-man roster, everyone who played that season, or the full roster
maxItemsMaximum rows to save and pay for (default 30; 0 = no limit)
{
  "mode": "playerStats",
  "seasons": ["2026"],
  "teamIds": ["Dodgers"],
  "statGroup": "hitting",
  "sortBy": "homeRuns",
  "maxItems": 20
}

📤 Output

Every row has a recordType (standing, game, playerStats, gameDetails, playerGameStats, player, leader or team), a season and a url to the matching mlb.com page.

ModeOne row perMain fields
StandingsTeamwins, losses, winningPercentage, gamesBack, wildCardGamesBack, divisionRank, runDifferential, streak, lastTen, homeRecord, awayRecord, expectedRecord, clinched, magicNumber
ScheduleGamegamePk, officialDate, status, teams and scores, records, winning, losing and save pitchers, probable pitchers, innings, venue, tvBroadcasts, seriesResult
Player statsPlayer season lineplayerId, fullName, team, position, gamesPlayed and the full hitting, pitching or fielding stat block (avg, homeRuns, rbi, ops, era, whip, strikeOuts...)
Box scores (team)Team in a gameruns, hits, homeRuns, rbi, walks, strikeouts, errors, inningsPitched, earnedRuns, pitchesThrown, pitchersUsed, opponent, won
Box scores (players)Player in a gamebattingSummary, atBats, hits, homeRuns, rbi, pitchingSummary, inningsPitched, earnedRuns, strikeOutsPitching
PlayersRoster entryjerseyNumber, position, status, birthDate, age, birthplace, height, weight, bats, throws, mlbDebutDate, draftYear
LeadersRanked playercategory, rank, value, fullName, team, league
TeamsClubteamId, name, abbreviation, league, division, venue, firstYearOfPlay

Standings row from a test run (trimmed):

{
  "recordType": "standing",
  "season": 2026,
  "teamId": 139,
  "team": "Tampa Bay Rays",
  "league": "American League",
  "division": "American League East",
  "wins": 98,
  "losses": 64,
  "winningPercentage": ".605",
  "gamesBack": "-",
  "divisionRank": 1,
  "runDifferential": 86,
  "streak": "L1",
  "homeRecord": "55-26",
  "awayRecord": "43-38",
  "lastTen": "5-5",
  "expectedRecord": "90-72",
  "clinched": true,
  "url": "https://www.mlb.com/rays"
}

Box score team row from a test run (trimmed):

{
  "recordType": "gameDetails",
  "gamePk": 823431,
  "officialDate": "2026-08-03",
  "side": "away",
  "team": "Washington Nationals",
  "opponent": "Philadelphia Phillies",
  "won": false,
  "runs": 3,
  "hits": 6,
  "homeRuns": 2,
  "strikeOutsBatting": 10,
  "errors": 0,
  "inningsPitched": "8.0",
  "pitchesThrown": 116,
  "pitchersUsed": 4,
  "url": "https://www.mlb.com/gameday/823431"
}

💰 Pricing

You pay $3.50 per 1,000 rows ($0.0035 per row), with no start fee. Examples:

  • Full standings of one season (30 teams): about $0.11
  • 1,000 rows: $3.50
  • A full regular season of games (about 2,430): about $8.50

Platform usage (compute and proxy traffic) is billed on top. It is small because the actor only calls a JSON API: a typical small run uses well under one cent.

❓ FAQ

Is it legal to scrape MLB stats? The actor reads public data that MLB serves without a login. MLB's terms apply to how you reuse it, especially commercially, so check them before you republish the data.

Do I need a login, an API key or a proxy? No login and no key. The default datacenter proxy works well for this public API.

How many results can I get? As many as the source has: a full season of games is about 2,430 rows, and seasons go back to 1876. Set Maximum results to 0 for no limit.

How do I find team, player or game ids? You often don't need them: teams also work by abbreviation or name. Run Teams, Players or Schedule once to see every id, or paste mlb.com player and gameday URLs.

Why is a field empty? The source leaves some fields out, for example scores of games not played yet, probable pitchers not announced yet, or stat categories that were not tracked in early seasons.

Can I schedule it or use the API? Yes. Schedule a daily run for standings or yesterday's box scores, or start runs and read results through the API.

⚠️ Limits

  • Major League Baseball only: no minor leagues, college or international leagues.
  • No pitch-by-pitch or play-by-play data, and no Statcast metrics.
  • Leaderboards rank about the top 100 players per category, as the source does.
  • Very old seasons have fewer stat categories, because the source does.
  • Not affiliated with or endorsed by Major League Baseball.

Related actors

G2
4.7/5
Excellent
Trustpilot

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes. The advantage lasts forever.

No credit card. No setup calls.