Baseball Reference Scraper | MLB Stats and History avatar

Baseball Reference Scraper | MLB Stats and History

Pricing

from $19.00 / 1,000 results

Go to Apify Store
Baseball Reference Scraper | MLB Stats and History

Baseball Reference Scraper | MLB Stats and History

Extract MLB player, team, and game data from Baseball Reference including box scores, season stats, advanced metrics, standings, and historical records dating back over a century. Built for sabermetrics, fantasy baseball, betting models, and deep sports research.

Pricing

from $19.00 / 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

Categories

Share

ParseForge Banner

โšพ Baseball Reference Stats Scraper

๐Ÿš€ Export MLB all-time single-season batting and pitching leaders in seconds. No account required. Just pick a stat and run.

๐Ÿ•’ Last updated: 2026-05-22 ยท ๐Ÿ“Š 11 fields per record ยท 500+ records per stat ยท Coverage: MLB history 1871-present

The Baseball Reference Stats Scraper pulls all-time single-season leaders from baseball-reference.com - the gold standard for MLB historical data. Choose from 17 key batting and pitching statistics, from home runs to ERA, and get a clean ranked dataset with player URLs, season year, age, plate appearances, and batting hand.

All data is live, scraped in real-time from Baseball Reference's ranked leader tables. Each record links directly to the player's profile page for drill-down research.

Coverage

  • 17 statistics: HR, RBI, Batting Average, OPS, Slugging %, On-Base %, Hits, Runs, Stolen Bases, Walks, Strikeouts, Wins, ERA, Pitcher Strikeouts, WHIP, Saves, Innings Pitched
  • MLB history: All recorded seasons from 1871 to present
  • 500+ ranked records per statistic
  • 11 data fields per record including player URL and age

Target Audience / Use Cases

Who Uses ThisWhat For
Fantasy baseball playersResearch historical player performance trends
Sports analystsBuild statistical models on offensive/pitching records
Journalists and bloggersFact-check records and all-time rankings
Baseball historiansTrack how records have evolved over eras
Data scientistsML training data for baseball performance models
DevelopersPopulate apps with real MLB historical stats

๐Ÿ“‹ What the Baseball Reference Stats Scraper does

  • Fetches all-time single-season ranked leaders for any of 17 MLB statistics
  • Returns rank, player name, player profile URL, season year, age, plate appearances, batting hand, and stat value
  • Supports both batting stats (HR, RBI, AVG, OPS, H, R, SB, BB, SO) and pitching stats (W, ERA, SO, WHIP, SV, IP)
  • Respects free/paid tier limits automatically
  • Delivers clean, typed records with no null fields

๐Ÿ’ก Why it matters: Baseball Reference is the definitive source for MLB history. This actor gives you programmatic access to its ranked leader tables - hundreds of records per stat - for research, analysis, or app development, without any scraping setup.

๐ŸŽฌ Full Demo

๐Ÿšง Coming soon

โš™๏ธ Input

FieldTypeDescriptionDefault
statTypeselectThe statistic to retrieve leaders forHR
maxItemsintegerMaximum records to return10

Available stat types:

CodeLabelCategory
HRHome RunsBatting
RBIRuns Batted InBatting
batting_avgBatting AverageBatting
onbase_plus_sluggingOPSBatting
slugging_percSlugging PercentageBatting
onbase_percOn-Base PercentageBatting
HHitsBatting
RRuns ScoredBatting
SBStolen BasesBatting
BBWalksBatting
SOStrikeouts by BatterBatting
WWinsPitching
ERAEarned Run AveragePitching
SO_pitcherPitcher StrikeoutsPitching
WHIPWHIPPitching
SVSavesPitching
IPInnings PitchedPitching

Example input - top 10 HR seasons:

{
"statType": "HR",
"maxItems": 10
}

Example input - top ERA seasons:

{
"statType": "ERA",
"maxItems": 25
}

โš ๏ธ Good to Know: Free plan users are automatically limited to 10 records per run. Upgrade to a paid plan to retrieve up to 1,000,000 records. Create a free account w/ $5 credit

๐Ÿ“Š Output

FieldTypeDescription
๐Ÿ”ข rankintegerAll-time rank for this statistic
๐Ÿ‘ค playerNamestringPlayer full name
๐Ÿ”— playerUrlstringURL to player page on baseball-reference.com
๐Ÿ“… seasonintegerSeason year when the record was set
๐ŸŽ‚ ageintegerPlayer age during that season
๐ŸŸ๏ธ plateAppearancesintegerPlate appearances in that season
๐Ÿ–๏ธ batsstringBatting hand (L/R/S)
๐Ÿ“Š valuestringStat value achieved
๐Ÿท๏ธ statTypestringStat type code (e.g. HR, ERA)
๐Ÿ“ statLabelstringHuman-readable stat label
๐Ÿ•’ scrapedAtstringISO timestamp when record was scraped
โŒ errorstringError message if scraping failed

Sample records:

[
{
"rank": 1,
"playerName": "Barry Bonds",
"playerUrl": "https://www.baseball-reference.com/players/b/bondsba01.shtml",
"season": 2001,
"age": 36,
"plateAppearances": 664,
"bats": "L",
"value": "73",
"statType": "HR",
"statLabel": "Home Runs",
"scrapedAt": "2026-05-22T01:56:49.081Z",
"error": null
},
{
"rank": 2,
"playerName": "Mark McGwire",
"playerUrl": "https://www.baseball-reference.com/players/m/mcgwima01.shtml",
"season": 1998,
"age": 34,
"plateAppearances": 681,
"bats": "R",
"value": "70",
"statType": "HR",
"statLabel": "Home Runs",
"scrapedAt": "2026-05-22T01:56:49.081Z",
"error": null
}
]

โœจ Why choose this Actor

FeatureBenefit
๐Ÿ† Real Baseball Reference dataThe gold standard MLB historical source
17 stat typesBatting and pitching leaders in one actor
500+ records per statFull all-time leaderboard access
Player profile URLsDirect links for drill-down research
Age and handednessRich contextual player data
Stealth browserWorks reliably without blocks
Instant resultsNo pagination needed - single-page tables

๐Ÿ“ˆ How it compares to alternatives

ApproachData freshnessEffortRecords
Baseball Reference Scraper (this)Real-timeZero setup500+ per stat
Manual copy-pasteStatic snapshotHighLimited
MLB Stats APILive gamesAPI setupSeasonal
Custom scraperReal-timeDev timeVariable

๐Ÿš€ How to use

  1. Create a free Apify account
  2. Open the Baseball Reference Stats Scraper actor
  3. Select a statType from the dropdown (e.g. HR for home runs)
  4. Set maxItems to the number of ranked records you want
  5. Click Start and wait ~15 seconds
  6. Download your dataset as CSV, JSON, Excel, or XML

๐Ÿ’ผ Business use cases

Fantasy Baseball Research

Analyze which players had the most productive seasons historically. Cross-reference peak seasons with player ages to identify performance windows. Build historical comps for current players.

Sports Journalism and Content

Verify record claims instantly. Generate fact-checked stat tables for articles. Find the answer to "Who had the most HR seasons in a career?" in seconds.

Analytics and Machine Learning

Build regression models using historical stat rankings. Train predictive models on seasonal performance data. Correlate batting hand with slugging percentage across eras.

Baseball Apps and Tools

Populate leaderboard displays in fan apps. Build era-comparison tools. Power trivia games with verified historical records.

๐Ÿ”Œ Automating Baseball Reference Scraper

Connect the actor to thousands of apps via Make, Zapier, or the Apify API:

  • Make (Integromat): Schedule weekly stat pulls and push to Google Sheets
  • Zapier: Trigger stat collection and email results to your team
  • Slack: Post updated leaderboards to your baseball channel
  • Google Sheets: Maintain a live MLB stats spreadsheet
  • Airtable: Build a searchable baseball history database
  • REST API: Integrate directly into your application via the Apify API

๐ŸŒŸ Beyond business use cases

Research and Academia

Sports economists studying the economics of player contracts vs. historical performance. Sociologists analyzing demographic trends in MLB leadership across decades.

Creative Projects

Writers building baseball fiction with accurate historical context. Game designers creating authentic baseball simulation mechanics.

Non-profit and Community

Youth baseball coaches using historical data to teach game fundamentals. Baseball Hall of Fame researchers validating historical records.

Experimentation

Test hypotheses about baseball eras - Deadball Era vs. Steroid Era stat distributions. Explore correlations between team stats and championship years.

๐Ÿค– Ask an AI assistant about this scraper

You can ask an AI assistant (ChatGPT, Claude, Gemini) questions like:

  • "What does the Baseball Reference Stats Scraper output for ERA leaders?"
  • "How do I get the top 50 stolen base seasons using the Apify actor?"
  • "Which stat type should I use to find the best pitching seasons?"

โ“ Frequently Asked Questions

โ“ Is this scraper free to use? Free Apify accounts can retrieve up to 10 records per run. Create a free account to get started, and upgrade for unlimited records.

โ“ How many records are available per stat? Each leaderboard contains 500+ ranked records covering the full history of MLB.

โ“ Does this include minor league stats? No - Baseball Reference's leader tables cover MLB (major league) records only.

โ“ How current is the data? Baseball Reference updates their leader tables regularly during the season. The scraper fetches live data each run.

โ“ Can I get stats for a specific player? This actor focuses on leaderboard rankings. Use the playerUrl field in each record to link to individual player pages for full career stats.

โ“ What's the difference between SO and SO_pitcher? SO are strikeouts by batters (a batting stat). SO_pitcher are strikeouts recorded by pitchers (a pitching stat).

โ“ Why does ERA leaderboard show very low values? ERA (Earned Run Average) is a pitching quality stat - lower is better. The leaderboard ranks the best (lowest) ERA seasons in MLB history.

โ“ Can I get team stats instead of individual player stats? This actor scrapes individual player leader tables. Baseball Reference has separate team stats pages that may be covered in future actors.

โ“ How long does a run take? Typically 10-20 seconds per run, including browser startup, page load, and parsing.

โ“ Is baseball-reference.com free to access? Baseball Reference is publicly accessible without login for leader table data. This actor uses that public access.

โ“ Will this break if Baseball Reference changes their layout? The actor targets stable table IDs in the Baseball Reference HTML. If the site structure changes, ParseForge will update the actor promptly.

๐Ÿ”Œ Integrate with any app

Connect the Baseball Reference Stats Scraper to your workflow:

Productivity: Google Sheets, Airtable, Notion, Coda Communication: Slack, Discord, Microsoft Teams, Email Automation: Make (Integromat), Zapier, n8n, Pipedream Development: REST API, Webhooks, Python, JavaScript, R Data: BigQuery, Snowflake, PostgreSQL, MongoDB, S3 Visualization: Tableau, Power BI, Google Data Studio, Metabase

ActorDescription
Basketball Reference ScraperNBA player stats from basketball-reference.com
OurAirports ScraperGlobal airport database with 80,000+ airports
Lichess ScraperChess game data and player stats from Lichess

๐Ÿ’ก Pro Tip: Browse the complete ParseForge collection for 100+ specialized data extractors across sports, finance, real estate, and more.


๐Ÿ†˜ Need Help? Open our contact form

โš ๏ธ Disclaimer: This actor is an independent tool, not affiliated with, endorsed by, or sponsored by Baseball Reference. It accesses only publicly available information from baseball-reference.com for personal research, analysis, and legitimate business use. Please respect Baseball Reference's terms of service and rate limits.