Baseball Reference Scraper | MLB Stats and History
Pricing
from $19.00 / 1,000 results
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Share

โพ 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 This | What For |
|---|---|
| Fantasy baseball players | Research historical player performance trends |
| Sports analysts | Build statistical models on offensive/pitching records |
| Journalists and bloggers | Fact-check records and all-time rankings |
| Baseball historians | Track how records have evolved over eras |
| Data scientists | ML training data for baseball performance models |
| Developers | Populate 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
| Field | Type | Description | Default |
|---|---|---|---|
statType | select | The statistic to retrieve leaders for | HR |
maxItems | integer | Maximum records to return | 10 |
Available stat types:
| Code | Label | Category |
|---|---|---|
HR | Home Runs | Batting |
RBI | Runs Batted In | Batting |
batting_avg | Batting Average | Batting |
onbase_plus_slugging | OPS | Batting |
slugging_perc | Slugging Percentage | Batting |
onbase_perc | On-Base Percentage | Batting |
H | Hits | Batting |
R | Runs Scored | Batting |
SB | Stolen Bases | Batting |
BB | Walks | Batting |
SO | Strikeouts by Batter | Batting |
W | Wins | Pitching |
ERA | Earned Run Average | Pitching |
SO_pitcher | Pitcher Strikeouts | Pitching |
WHIP | WHIP | Pitching |
SV | Saves | Pitching |
IP | Innings Pitched | Pitching |
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
| Field | Type | Description |
|---|---|---|
๐ข rank | integer | All-time rank for this statistic |
๐ค playerName | string | Player full name |
๐ playerUrl | string | URL to player page on baseball-reference.com |
๐
season | integer | Season year when the record was set |
๐ age | integer | Player age during that season |
๐๏ธ plateAppearances | integer | Plate appearances in that season |
๐๏ธ bats | string | Batting hand (L/R/S) |
๐ value | string | Stat value achieved |
๐ท๏ธ statType | string | Stat type code (e.g. HR, ERA) |
๐ statLabel | string | Human-readable stat label |
๐ scrapedAt | string | ISO timestamp when record was scraped |
โ error | string | Error 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
| Feature | Benefit |
|---|---|
| ๐ Real Baseball Reference data | The gold standard MLB historical source |
| 17 stat types | Batting and pitching leaders in one actor |
| 500+ records per stat | Full all-time leaderboard access |
| Player profile URLs | Direct links for drill-down research |
| Age and handedness | Rich contextual player data |
| Stealth browser | Works reliably without blocks |
| Instant results | No pagination needed - single-page tables |
๐ How it compares to alternatives
| Approach | Data freshness | Effort | Records |
|---|---|---|---|
| Baseball Reference Scraper (this) | Real-time | Zero setup | 500+ per stat |
| Manual copy-paste | Static snapshot | High | Limited |
| MLB Stats API | Live games | API setup | Seasonal |
| Custom scraper | Real-time | Dev time | Variable |
๐ How to use
- Create a free Apify account
- Open the Baseball Reference Stats Scraper actor
- Select a
statTypefrom the dropdown (e.g.HRfor home runs) - Set
maxItemsto the number of ranked records you want - Click Start and wait ~15 seconds
- 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
๐ Recommended Actors
| Actor | Description |
|---|---|
| Basketball Reference Scraper | NBA player stats from basketball-reference.com |
| OurAirports Scraper | Global airport database with 80,000+ airports |
| Lichess Scraper | Chess 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.