Baseball Reference Stats Scraper
Pricing
from $19.00 / 1,000 results
Baseball Reference Stats Scraper
Scrapes MLB all-time single-season batting and pitching leaderboards from baseball-reference.com. Choose from 17 stats and get player name, year, team, and stat value in a flat row.
Pricing
from $19.00 / 1,000 results
Rating
0.0
(0)
Developer
ParseForge
Maintained by CommunityActor stats
1
Bookmarked
8
Total users
0
Monthly active users
2 days ago
Last modified
Share
Baseball Reference Stats Scraper
Scrape MLB all-time single-season batting and pitching leaders from Baseball Reference, up to a million records per run. Every row returns the player name, year, team, and the stat you selected. No API key or complex setup. Export to CSV, JSON, Excel, or XML.
Baseball Reference is the definitive source for historical MLB statistics, but manually copying leaderboards is slow and error-prone. This Actor reads the public all-time single-season leader tables directly, letting you pull the top performers for any major batting or pitching stat. Choose from home runs, ERA, strikeouts, batting average, and more, then get a clean dataset ready for analysis.
| Who uses it | What they scrape Baseball Reference for |
|---|---|
| Baseball historians | Compile definitive all-time leader lists for research or publication. |
| Fantasy baseball analysts | Identify historical single-season outliers to inform draft strategies. |
| Data journalists | Gather verified stats for articles comparing eras or player legacies. |
| MLB content creators | Pull accurate leaderboard data for videos, graphics, or social posts. |
What it does
This Actor collects MLB all-time single-season leader records from Baseball Reference for a chosen statistic and returns each player's rank, name, year, team, and stat value as a flat row.
- โพ Batting and pitching stats: Choose from 17 core metrics including HR, RBI, batting average, OPS, ERA, WHIP, and strikeouts.
- ๐ All-time single-season leaders: Retrieves the top performers for a single season, not career totals, giving you peak performance data.
- ๐ข Configurable record limit: Set the maximum number of records to collect, from a single entry up to one million rows per run.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with Baseball Reference data
๐ Build a historical leaderboard database.
A baseball researcher runs the Actor for each of the 17 stats to compile a complete all-time single-season leaderboard, then loads the CSV into a database for querying across eras.
๐ Fact-check a player comparison article.
A sports journalist scrapes the top 50 home run seasons to verify claims about a current player's place in history before publishing.
๐ Prepare a fantasy baseball draft guide.
A fantasy analyst pulls the top stolen base and OPS seasons from the past decade to highlight undervalued player profiles for an upcoming draft kit.
๐ฅ Source data for a YouTube deep-dive.
A content creator scrapes the all-time strikeout leaders to build a chart race animation comparing pitcher peaks across different decades.
Why choose this scraper
| What you get | |
|---|---|
| No API key required | Access public leaderboard data without registering an application or managing rate limits. |
| Fixed, predictable schema | Every run returns the same columns: rank, player, year, team, and the stat value, so your downstream processing never breaks. |
| Bulk historical data | Pull up to a million records in a single run for large-scale historical analysis. |
How it compares
This Actor focuses on all-time single-season leaderboards from Baseball Reference, while the MLB StatsAPI scraper pulls official current-season data from a different source.
| Feature | ParseForge | MLB StatsAPI Baseball Data Scraper |
|---|---|---|
| All-time single-season leaderboards | Yes, 17 batting and pitching stats | Not listed |
| Current season schedules and scores | Not listed | Yes |
| Player rosters and team data | Not listed | Yes |
| No API key required | Yes, reads public pages | Not listed |
| Live game data and play-by-play | Not listed | Yes |
Configure the run
Drive the Actor by selecting one statistic from the dropdown and setting a maximum number of records. The scraper reads the leaderboard table directly and returns only the rows you requested. The Input tab lists every parameter.
A first run with the defaults:
{"statType": "HR","maxItems": 10}
A larger pull:
{"statType": "HR","maxItems": 200}
Pricing
Pay-per-result: $0.021 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the Baseball Reference Stats Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to Baseball Reference through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
$claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/baseball-reference-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting fewer records than my maxItems setting?
The Actor returns only the rows that exist on the leaderboard page. If you set maxItems to 1000 but the leaderboard for that stat only has 100 entries, you will receive 100 records. Lower your maxItems or choose a stat with a longer leaderboard.
The run failed with a timeout error.
Requesting a very large number of records can take time. Increase the Actor's timeout setting in the run options, or reduce the maxItems value and run the Actor in smaller batches.
Some player names look different than I expected.
The Actor returns names exactly as they appear on Baseball Reference. This includes suffixes like 'Jr.' and accent marks. The data reflects the site's own display format.
I got an error about the website structure changing.
Baseball Reference occasionally updates its page layout. If the scraper stops working, check the Actor's page for an updated version, or contact support with the run log so the selector can be fixed.
FAQ
| Question | Answer |
|---|---|
| Does this scraper get career totals or single-season stats? | It retrieves all-time single-season leaders. Each row represents one player's performance in one specific year, not their cumulative career numbers. |
| What baseball stats can I scrape? | You can choose from 17 batting and pitching stats: HR, RBI, batting average, OPS, slugging percentage, on-base percentage, hits, runs, stolen bases, walks, batter strikeouts, wins, ERA, pitcher strikeouts, WHIP, saves, and innings pitched. |
| Do I need a Baseball Reference subscription? | No. The Actor reads the publicly available leaderboard pages on baseball-reference.com. No login, subscription, or API key is required. |
| How many records can I get in one run? | You set the limit with the 'Maximum records' input. You can request anywhere from 1 to 1,000,000 rows, though the actual number returned depends on how many entries exist on the leaderboard for that stat. |
| What format is the output data? | The Actor outputs a flat dataset you can export to CSV, JSON, Excel, or XML directly from your Apify dataset. |
| Can I filter by a specific year or team? | This Actor retrieves the all-time leaderboard as displayed on Baseball Reference. It does not filter by year or team before scraping. You can apply those filters to the exported dataset in your own analysis tool. |
| Does this cover Negro League or minor league stats? | The Actor scrapes the standard MLB all-time single-season leader tables on Baseball Reference. It does not include separate Negro League or minor league leaderboards. |
| How often is the data updated? | Baseball Reference updates its leaderboards after each day's games during the season. The Actor fetches the live page on every run, so you always get the current data. |
| Can I scrape current season stats with this? | This Actor is designed for all-time single-season leaderboards. If a current-season performance ranks among the all-time leaders, it will appear. For full current-season stats, a different scraper would be needed. |
Related actors
Browse the full ParseForge collection for more scrapers.
๐ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
โ ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Sports Reference LLC. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
