MLB Stats Scraper avatar

MLB Stats Scraper

Pricing

from $25.50 / 1,000 results

Go to Apify Store
MLB Stats Scraper

MLB Stats Scraper

Scrape Major League Baseball data from the official MLB Stats API - schedules, teams, rosters, player stats, and live game feeds. No API key required.

Pricing

from $25.50 / 1,000 results

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

ParseForge Banner

โšพ MLB Stats Scraper

๐Ÿš€ Export official Major League Baseball data in seconds. Pull schedules by date, all 30 MLB teams, full rosters, season player stats, and live game feeds from the official MLB feed. No sign-up, no manual scraping, no setup.

๐Ÿ•’ Last updated: 2026-05-15 ยท ๐Ÿ“Š 25+ fields per record ยท โšพ All 30 MLB teams ยท ๐Ÿ“… Schedules + rosters + stats ยท ๐Ÿ”ด Live game feed

The MLB Stats Scraper exports official Major League Baseball data and returns up to 25+ structured fields per record, including game primary key (gamePk), official date, gameType, season + season display, status, both teams (with score, league record, winner flag), venue, day/night designation, double-header indicator, scheduled innings, and a public deep-link to MLB.com Gameday.

The Actor covers all 30 MLB teams, every regular and postseason game, complete 40-man and active rosters, season-by-season player stats, and the live game feed (linescore, decisions, full game data). One run gives you the dataset you need for fan-engagement, fantasy, betting analytics, content automation, or research.

๐ŸŽฏ Target Audience๐Ÿ’ก Primary Use Cases
Sports media, fantasy-baseball apps, betting analytics teams, fan-engagement platforms, indie sports devs, baseball researchersLive scoreboards, fixture feeds, roster lookups, player season-stat dashboards, postseason brackets, content automation

๐Ÿ“‹ What the MLB Stats Scraper does

Five lookup modes in a single run:

  • ๐Ÿ“… Schedule. Games on a chosen date (defaults to today). Filter by gameType (Regular, Wild Card, Division Series, League Championship, World Series, All-Star) or by seasonType shortcut (regular / post).
  • ๐ŸŸ๏ธ Teams. All 30 MLB teams with abbreviations, codes, league + division, venue, first-year-of-play, and short name.
  • ๐Ÿ“‹ Roster. Active roster for one team (by teamId) or batch up to 100 teams in one run.
  • ๐Ÿ“Š Player Stats. Season stats for one or many players, with bio (height, weight, birth date, country, bats/throws), position, and current team.
  • ๐Ÿ”ด Game Detail. Live feed for any game by gamePk, including game data, linescore, and pitching/winning decisions.

Each schedule record includes the canonical MLB identifiers, official date, season + season display, gamedayType, series description with game number, both teams (ID, name, score, league record, winner flag), venue, day/night, double-header type, scheduled innings, and a direct link to mlb.com/gameday.

๐Ÿ’ก Why it matters: baseball moves fast, and accurate game and player data underpin every scoreboard, fantasy product, and analytics dashboard. Building your own pipeline means juggling MLB's data feed, normalising IDs across season types, and refreshing for every game day.


๐ŸŽฌ Full Demo

๐Ÿšง Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset.


โš™๏ธ Input

InputTypeDefaultBehavior
modestring"schedule"One of schedule, teams, roster, playerStats, gameDetail.
datestringtodayYYYY-MM-DD. Used in schedule mode.
teamIdintegernoneMLB team ID for roster mode (e.g. 147 = Yankees, 119 = Dodgers).
teamIdsarray[]Batch roster lookup. Takes precedence over teamId.
playerIdstring""MLB player ID for playerStats mode (e.g. 660271 = Shohei Ohtani).
playerIdsarray[]Batch playerStats lookup. Takes precedence over playerId.
gameTypestring""R/F/D/L/W/A. Filter schedule by game type.
seasonTypestring""regular or post shortcut.
gamePkintegernoneGame primary key for gameDetail mode.
seasonintegercurrentSeason year (e.g. 2024).
maxItemsinteger10Free plan caps at 10, paid plan at 1,000,000.

Example: today's schedule, regular season only.

{
"mode": "schedule",
"seasonType": "regular",
"maxItems": 30
}

Example: Shohei Ohtani's 2024 season stats.

{
"mode": "playerStats",
"playerId": "660271",
"season": 2024
}

โš ๏ธ Good to Know: seasonType is a convenience shortcut. If you supply gameType directly (e.g. W for World Series), it overrides seasonType. The Actor is smart enough to map the right combination for postseason rounds.


๐Ÿ“Š Output

Each schedule record contains 25+ fields. Download the dataset as CSV, Excel, JSON, or XML.

๐Ÿงพ Schema (schedule mode)

FieldTypeExample
๐Ÿ†” gamePknumber746345
๐Ÿ”— gameGuidstring"abcd-1234..."
๐Ÿ“… gameDateISO 8601"2026-05-15T18:05:00Z"
๐Ÿ“… officialDatestring"2026-05-15"
๐Ÿท๏ธ gameTypestring"R"
๐Ÿ—“๏ธ seasonstring"2026"
๐Ÿ“บ gamedayTypestring"P"
๐Ÿ† seriesDescriptionstring"Regular Season"
๐Ÿ”ข seriesGameNumbernumber1
๐Ÿšฆ statusobject{"detailedState": "Scheduled"}
๐Ÿ“Š awayScorenumber | null5
๐Ÿ“Š homeScorenumber | null3
๐Ÿ  teams.homeobject{"id": 147, "name": "New York Yankees", ...}
๐Ÿ›ซ teams.awayobject{"id": 111, "name": "Boston Red Sox", ...}
๐ŸŸ๏ธ venueobject{"id": 3313, "name": "Yankee Stadium"}
๐ŸŒ— dayNightstring"night"
๐Ÿ” doubleHeaderstring"N"
๐Ÿ“ scheduledInningsnumber9
๐Ÿ”— urlstring"https://www.mlb.com/gameday/746345"
๐Ÿ•’ scrapedAtISO 8601"2026-05-15T00:00:00.000Z"

๐Ÿ“ฆ Sample record


โœจ Why choose this Actor

Capability
โšพFull league. All 30 MLB teams across both leagues, with active rosters and season stats.
๐Ÿ“…Daily schedule. Every game on any date, filtered by season type or game type.
๐Ÿ†Postseason support. Wild Card, Division Series, League Championship, World Series, and All-Star coded out of the box.
๐Ÿ“ŠPlayer stats. Season hitting and pitching splits joined with player bio and current team.
๐Ÿ”ดLive feed. Linescore, decisions, and full game data for any in-progress matchup.
๐Ÿ”Always fresh. Each run pulls live data, so scores and lineups reflect the current state.
๐ŸšซNo sign-up. Works against the official MLB live feed. No login or token required.

๐Ÿ“Š Reliable MLB data is the foundation of every fantasy product, betting model, and fan-facing scoreboard.


๐Ÿ“ˆ How it compares to alternatives

ApproachCostCoverageRefreshFiltersSetup
โญ MLB Stats Scraper (this Actor)$5 free credit, then pay-per-use30 teams, 5 modes, live + seasonLive per runmode, date, gameType, seasonโšก 2 min
Commercial sports data vendors$$$$/monthFull + extrasStreamingManyโณ Weeks
Manual stats-page scrapingFreeInconsistentOn demandNone๐Ÿข Days
Free baseball widgetsFreeDisplay-onlyLiveLimited๐Ÿ•’ No raw data

Pick this Actor when you want structured records, all 30 teams, and zero pipeline maintenance.


๐Ÿš€ How to use

  1. ๐Ÿ“ Sign up. Create a free account w/ $5 credit (takes 2 minutes).
  2. ๐ŸŒ Open the Actor. Go to the MLB Stats Scraper page on the Apify Store.
  3. ๐ŸŽฏ Set input. Pick a mode, fill the relevant inputs (date, team ID, player ID, or gamePk), and set maxItems.
  4. ๐Ÿš€ Run it. Click Start and let the Actor collect your data.
  5. ๐Ÿ“ฅ Download. Grab your results in the Dataset tab as CSV, Excel, JSON, or XML.

โฑ๏ธ Total time from signup to downloaded dataset: 3-5 minutes. No coding required.


๐Ÿ’ผ Business use cases

๐Ÿ“บ Sports Media & Publishing

  • Daily MLB scoreboard rendering on news sites
  • Auto-write game previews with rosters and venues
  • Postseason bracket dashboards with live scores
  • Push breaking news on walk-offs and no-hitters

๐ŸŽฒ Fantasy & Betting Analytics

  • Pre-game lineup and roster checks
  • Live in-play model inputs from the linescore feed
  • Backtest strategies against historical schedules
  • Postseason-only filters for derivatives markets

๐ŸŸ๏ธ Fan-Engagement Apps

  • "My team" alerts and push notifications
  • Game-day stadium guides with venue + day/night
  • Player stat cards in fan apps and Discord bots
  • Season-long leaderboard widgets

๐Ÿ“Š Analytics & Research

  • Build sabermetrics dashboards with raw splits
  • Train models on schedule + outcome metadata
  • Cross-reference player IDs across multiple feeds
  • Time-series studies on day vs night performance

๐Ÿ”Œ Automating MLB Stats Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

  • ๐ŸŸข Node.js. Install the apify-client NPM package.
  • ๐Ÿ Python. Use the apify-client PyPI package.
  • ๐Ÿ“š See the Apify documentation for full details.

The Apify Schedules feature lets you trigger this Actor on any cron interval. Refresh today's scoreboard every minute, daily roster snapshots, or weekly stats pulls are all one click.


๐ŸŒŸ Beyond business use cases

Baseball data powers more than commercial products. The same records support research, education, civic projects, and personal initiatives.

๐ŸŽ“ Research and academia

  • Sabermetrics coursework with real season data
  • Statistical studies on home advantage, day vs night, and travel
  • Sport-history dissertations grounded in live records
  • Reproducible research pulls with cited timestamps

๐ŸŽจ Personal and creative

  • Hobbyist team tracker dashboards
  • Discord bots for fan communities
  • Trading-card generators with current rosters
  • Side projects and fan portfolios

๐Ÿค Non-profit and civic

  • Youth-baseball league dashboards
  • Sport-journalism for local newsrooms
  • Inclusion analyses across rosters and birth countries
  • Open-data hackathons on America's pastime

๐Ÿงช Experimentation

  • Train win-probability ML models with live linescores
  • Prototype agent pipelines that resolve player IDs
  • Validate fan-product hypotheses with real fixture data
  • Test live-stream UX concepts with real game feeds

๐Ÿค– Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:


โ“ Frequently Asked Questions

๐Ÿงฉ How does it work?

Pick a mode (schedule, teams, roster, playerStats, or gameDetail), supply the relevant inputs, and click Start. The Actor pulls fresh records from the official MLB live data feed and emits a clean structured row per game, team, player, or live feed entry.

โšพ Which teams are supported?

All 30 Major League Baseball teams across both the American League and National League.

๐Ÿ“… Can I get postseason games only?

Yes. Set seasonType to post (or use gameType like W for World Series specifically) and the Actor restricts the schedule to playoff games.

๐Ÿ“Š How do I look up player season stats?

Set mode to playerStats and supply playerId (e.g. 660271 for Shohei Ohtani). Optionally set season to a year (defaults to current). Use playerIds for batch lookups (up to 100 per call).

๐Ÿ”ด Can I pull a live game feed?

Yes. Set mode to gameDetail and supply gamePk for the game you want. The Actor returns live game data, current linescore, and pitching/winning decisions if the game is final.

๐ŸŸ๏ธ Do I get venue and day/night info?

Yes. The schedule mode returns the full venue object plus dayNight and doubleHeader flags so you can build accurate game-day dashboards.

โฐ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor every minute, hourly, or daily. The dataset always reflects the current state of the live feed.

Only publicly available scoreboard data is collected. Review MLB's terms of use for your specific use case, particularly if you redistribute or commercialise the content.

๐Ÿ’ณ Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit and unlocks scheduling and higher concurrency.

๐Ÿ” What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. If a run still fails, you can inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.

๐Ÿ†˜ What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.


๐Ÿ”Œ Integrate with any app

MLB Stats Scraper connects to any cloud service via Apify integrations:

  • Make - Automate multi-step workflows
  • Zapier - Connect with 5,000+ apps
  • Slack - Get score updates in your channels
  • n8n - Self-hosted workflow automation
  • Pipedream - Event-driven serverless workflows
  • Airbyte - Pipe baseball data into your warehouse
  • GitHub - Trigger runs from commits
  • Google Drive - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh schedules into your product backend, or alert your fans in Slack when a walk-off happens.


๐Ÿ’ก Pro Tip: browse the complete ParseForge collection for more reference-data scrapers.


๐Ÿ†˜ Need Help? Open our contact form to request a new scraper, propose a custom data project, or report an issue.


โš ๏ธ Disclaimer: this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Major League Baseball or any of its clubs. All trademarks mentioned are the property of their respective owners. Only publicly available scoreboard data is collected.