MLB Stats Scraper — Teams, Players, Games, Standings & Leaders
Pricing
from $4.00 / 1,000 results
MLB Stats Scraper — Teams, Players, Games, Standings & Leaders
MLB scraper on the official Stats API — teams, full rosters with player bios, schedules and results, live standings, season hitting/pitching/fielding stats, game box scores and league leaders. Multi-season in one run, flat rows for CSV. No key, no proxies, from $0.004 per row.
Pricing
from $4.00 / 1,000 results
Rating
0.0
(0)
Developer
Muhamed Didovic
Maintained by CommunityActor stats
0
Bookmarked
12
Total users
11
Monthly active users
4 days ago
Last modified
Categories
Share
Pull Major League Baseball data straight from the official MLB Stats API — all 30 teams, full rosters with player bios, schedules and final scores, live division standings, season hitting/pitching/fielding lines, game box scores, and league leaderboards. Seven modes, one actor. No API key, no login, no proxies. Rows come out flat, so the same record reads cleanly as JSON or as a CSV column set.
Why use this scraper?
- Seven datasets in one actor — teams, players, schedule, standings, player stats, game details, leaders. No juggling separate scrapers per endpoint.
- Several seasons in a single run — ask for
[2024, 2025, 2026]and get all three in one dataset, tagged by season. Historical data reaches back to 1876. - Player bios included — roster rows are hydrated with birth date, age, birthplace, height, weight, bats/throws and MLB debut, not just a name and a jersey number.
- Flat rows, not nested blobs — the API buries values four levels deep (
teams.home.team.name); every row here is one level, so Excel and CSV work without post-processing. - League leaderboards — home runs, batting average, ERA, strikeouts, saves and any other category the API exposes, ranked with player, team and value.
- Official source — data comes from MLB's own statsapi.mlb.com, updated live during the season.
- No proxies, no keys — the endpoints are public, which keeps runs fast and cheap.
Supported modes
| Mode | One row per | Key fields |
|---|---|---|
teams | Club | id, name, abbreviation, league, division, venue, first year of play |
players | Player on a roster | name, jersey, position, status, birth date, age, birthplace, height, weight, bats/throws, debut |
schedule | Game | gamePk, date, status, both teams, both scores, winner, venue, records, series info |
standings | Team season record | wins, losses, pct, games back, division/league rank, streak, run differential, magic number |
playerStats | Player season line | full hitting/pitching/fielding stat block (40+ metrics), team, games played |
gameDetails | Team in a game | runs, hits, doubles, triples, HR, RBI, walks, strikeouts, errors, innings pitched, ERA inputs |
leaders | Ranked player | category, rank, value, player, team, league |
Use cases
| Audience | What they use it for |
|---|---|
| Fantasy baseball tools | Nightly stat pulls for scoring, projections and waiver-wire ranking |
| Sports betting & modelling | Historical results, run differentials and box scores for backtesting |
| Sports media & newsletters | Standings tables, leaderboards and game recaps without manual entry |
| Data science / ML | Multi-season training sets with consistent schemas |
| Apps & dashboards | A dependable feed for schedule widgets, team pages and player cards |
How it works
- Pick a mode — teams, players, schedule, standings, player stats, game details or leaders.
- Set the scope — seasons, and optionally team ids, player ids, game ids, a date or a date range.
- The actor calls the official API — requests run in a bounded pool with retry and backoff, so a transient error never fails the run.
- Rows are flattened — nested API objects become one-level records with domain-correct names.
- Emit — one clean row per entity to your dataset, exportable as JSON, CSV or Excel.
Input configuration
| Field | Type | Default | Notes |
|---|---|---|---|
mode | select | teams | Which dataset to pull (see the table above) |
seasons | array | current year | One or more seasons, e.g. ["2026"] or ["2024","2025"] |
teamIds | array | all 30 | MLB team ids, e.g. 119 Dodgers, 147 Yankees. Run teams once to collect them |
playerIds | array | rosters | Player-stats mode: specific players by person id |
gamePks | array | schedule | Game-details mode: specific games by gamePk |
date / fromDate / toDate | string | — | YYYY-MM-DD; a single day or a range for schedule and game details |
leagueId | select | both | Standings: American, National or both |
statGroup | select | hitting | Player stats and leaders: hitting, pitching or fielding |
gameType | select | R | Regular season, spring training, postseason, World Series, LCS or All-Star |
leaderCategories | array | homeRuns | Leaders: e.g. battingAverage, earnedRunAverage, strikeouts, saves |
maxItems | integer | 1000 | Hard cap on rows returned and charged |
Example input
{"mode": "playerStats","seasons": ["2026"],"teamIds": ["119"],"statGroup": "hitting","maxItems": 40}
Output samples
Standings row
{"recordType": "standing","season": 2026,"teamId": 139,"team": "Rays","league": "American League","division": "American League East","wins": 66,"losses": 46,"winningPercentage": ".589","gamesBack": "-","divisionRank": 1,"streak": "W1","runDifferential": 88,"magicNumber": "E"}
Game row
{"recordType": "game","gamePk": 823431,"officialDate": "2026-08-03","status": "Final","awayTeam": "Washington Nationals","awayScore": 3,"homeTeam": "Philadelphia Phillies","homeScore": 6,"winningTeam": "Philadelphia Phillies","venueName": "Citizens Bank Park","url": "https://www.mlb.com/gameday/823431"}
Key output fields
| Field | Meaning |
|---|---|
recordType | Which mode produced the row — handy when you merge several runs |
teamId / playerId / gamePk | Official MLB ids, stable across seasons and joins |
season | The season the row belongs to, so multi-season runs stay separable |
url | Deep link to the team, player or gameday page on mlb.com |
winningTeam | Computed from the final score, null while a game is unfinished |
statGroup | Hitting, pitching or fielding — set on stat and leader rows |
FAQ
What does a run cost? $0.004 per row plus a $0.005 run start. All 30 teams is about $0.13; a full league leaderboard costs a few cents.
Do I need an API key or proxies? No. The MLB Stats API is public, so runs need no key, no login and no proxy spend.
How far back does the data go? To 1876 for most modes. Coverage of individual stat categories thins out for the earliest seasons — that's the source data, not the actor.
How do I find a team or player id? Run teams once for every club id, or players for a roster with person ids. Then pass them into the other modes.
Can I pull a whole season of games? Yes — choose schedule, set the season, and leave the date fields empty. Raise maxItems since a full season is about 2,430 games.
Is this affiliated with MLB? No. It reads a public endpoint that MLB operates. See the disclaimer below.
Support
- Found a bug or need another field? Open a ticket on the Issues tab of this actor.
- Author's website: muhamed-didovic.github.io
- Email: muhamed.didovic@gmail.com
- More scrapers: apify.com/memo23
Additional Services
- Request customization or a whole dataset: muhamed.didovic@gmail.com
- For API access to this scraper (no Apify fee, usage fee only), get in touch at the same address.
Explore More Scrapers
Other data feeds from the same author: Gumroad, Etsy, OfferUp, Clutch.co, ZipRecruiter, Instagram Transcript — full catalog at apify.com/memo23.
⚠️ Disclaimer
This actor reads publicly available data from MLB's own statsapi.mlb.com endpoints. It is not affiliated with, endorsed by, or sponsored by Major League Baseball or any MLB club. All trademarks belong to their respective owners. MLB data is provided for informational purposes; check MLB's terms before redistributing it commercially, and use the extracted data in compliance with applicable law.
SEO Keywords
MLB scraper, MLB Stats API, baseball data scraper, MLB standings scraper, MLB schedule scraper, baseball statistics API, MLB player stats, MLB box score scraper, league leaders baseball, fantasy baseball data, sports data scraper, MLB roster scraper, baseball analytics dataset, MLB game results, sabermetrics data