Baseball Reference Stats Scraper
Pricing
from $16.00 / 1,000 player profile scrapeds
Baseball Reference Stats Scraper
Extract authorized Baseball Reference player batting, pitching, fielding, WAR, team, season, and career-total statistics for sports research and analytics.
Pricing
from $16.00 / 1,000 player profile scrapeds
Rating
0.0
(0)
Developer
Muhammad Afzal
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 hours ago
Last modified
Categories
Share
Extract authorized Baseball Reference player batting, pitching, and fielding statistics into analysis-ready JSON, CSV, Excel, or API records. Each dataset item represents one player-season table row and includes both normalized headline fields and every source data-stat value.
Authorization required: Sports Reference states that tools based on scraped site data require permission. Use this Actor only under your written permission or data license and follow the request limits attached to that authorization.
Current status (2026-10-27): blocked. Baseball Reference answers this Actor's requests with a managed bot check. In all three cloud test runs on 2026-10-27 and in most runs on 2026-10-26, every player page was challenged, so those runs ended as failed with outcome BLOCKED, no rows and no player charges; only the start fee applies. The Actor does not try to defeat the check. The rest of this page describes what a run returns when the page is served.
What it extracts
| Field group | Examples |
|---|---|
| Player | playerId, playerName, position, bats, throws |
| Row identity | statType, tableId, rowType, season, team, league, age |
| Batting | games, plateAppearances, atBats, hits, homeRuns, runsBattedIn, stolenBases, battingAverage, onBasePercentage, sluggingPercentage, onBasePlusSlugging, war |
| Pitching | wins, losses, earnedRunAverage, inningsPitched, strikeouts, war |
| Complete row | stats, keyed by Baseball Reference's stable data-stat attributes |
| Provenance | sourceUrl, scrapedAt |
Use it for authorized sports research, historical player analysis, fantasy-baseball pipelines, and spreadsheet exports. It accepts public Baseball Reference player pages only. It does not scrape Stathead, search results, team pages, league registers, game logs, splits, projections, or authenticated content.
The Actor handles network access itself through a US residential route; no proxy setting is needed in run input.
Input
| Input | Purpose | Default |
|---|---|---|
playerIds | Baseball Reference IDs such as troutmi01 | none (Console example troutmi01; used only when no player or URL is given) |
startUrls | Full https://www.baseball-reference.com/players/... URLs | none |
statTypes | batting, pitching, and/or fielding | all three |
seasons | Optional four-digit season allowlist | every season |
includeCareerTotals | Include aggregate rows such as 14 Yrs | false |
maxPlayers | Unique player-page cap | 5 |
maxRows | Dataset-row cap | 500 |
Example:
{"playerIds": ["troutmi01", "ohtansh01"],"statTypes": ["batting", "pitching"],"seasons": [2023, 2024],"includeCareerTotals": false,"maxPlayers": 2,"maxRows": 100}
API call:
curl -X POST "https://api.apify.com/v2/acts/muhammadafzal~baseball-reference-stats-scraper/runs?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"playerIds":["troutmi01"],"statTypes":["batting"],"maxPlayers":1}'
Output
{"playerId": "troutmi01","playerName": "Mike Trout","statType": "batting","tableId": "players_standard_batting","rowType": "season","season": 2024,"age": 32,"team": "LAA","league": "AL","games": 29,"plateAppearances": 126,"atBats": 109,"hits": 24,"homeRuns": 10,"runsBattedIn": 14,"stolenBases": 6,"battingAverage": 0.22,"onBasePercentage": 0.325,"sluggingPercentage": 0.541,"onBasePlusSlugging": 0.866,"war": 0.9,"stats": {"year_ID": 2024,"team_name_abbr": "LAA","HR": 10,"batting_avg": 0.22},"sourceUrl": "https://www.baseball-reference.com/players/t/troutmi01.shtml","scrapedAt": "2026-08-29T12:00:00.000Z"}
The OUTPUT key-value-store record distinguishes SUCCEEDED, SUCCEEDED_WITH_WARNINGS, EMPTY, BLOCKED, INVALID_INPUT, and FAILED. Diagnostics never appear as fake player rows.
Pricing
This Actor uses pay-per-event pricing. These are the current Apify Store event prices:
| Event | Price (USD) | When it is charged |
|---|---|---|
player-scraped | FREE: $0.02; BRONZE: $0.02; SILVER: $0.02; GOLD: $0.016; PLATINUM: $0.016; DIAMOND: $0.016 | Player profile scraped — One player page successfully parsed and delivered as season-stat rows. |
apify-actor-start | $0.005 | Actor Start — charged per started GB of allocated memory (one event at the default 1 GB). |
Apify platform usage for this Actor run is included alongside the event prices above; no separate per-run platform-usage fee is passed to users. Example on the FREE tier: one player is USD 0.02 + USD 0.005 = USD 0.025; a blocked run costs only the USD 0.005 start fee.
Reliability and limits
The scraper uses one consistent browser session, no more than eight page requests per minute, bounded retries, canonical URL deduplication, and a US residential proxy by default. Plain HTTP currently receives a managed access challenge. If a permitted browser session is still challenged, the run ends as failed with outcome BLOCKED, returns zero fabricated rows, and applies no player-result charge. It does not solve CAPTCHAs or bypass authenticated access controls.
Tables legitimately absent from a player page are warnings, not fabricated empty records. Use statTypes to request only tables relevant to the player. maxRows can stop a run after a partial but valid dataset.
Legal and compliance
You are responsible for ensuring that your Sports Reference permission or license covers automated collection, storage, and downstream use. Do not use the output to violate privacy, intellectual-property, database, contract, or applicable sports-betting laws. The Actor is not affiliated with Sports Reference LLC or Major League Baseball and does not include third-party branding.
For support, include the Apify run ID, selected player IDs, expected table, and redacted OUTPUT record. Never post authentication tokens or proxy URLs.
Use cases
- Schedule repeatable collection and export results to downstream workflows.
- Run a one-off research job and export the structured result as JSON, CSV, Excel, XML, or RSS from Apify.
- Schedule the same input to monitor changes over time and send completed datasets to a webhook or integration.
- Feed schema-shaped records into a database, spreadsheet, BI tool, or AI workflow with the source URL retained for verification.
FAQ
Why does my run end as BLOCKED?
Baseball Reference served a bot check instead of the player page. The Actor stops, writes the reason to OUTPUT, and charges no player events. It does not solve or evade the check.
Do I need permission to use this data?
Yes. Sports Reference says tools built on scraped site data need its permission. Use the Actor only under your own permission or data license.
What do I pay for?
One player event per player page delivered as stat rows, plus the start fee. Blocked, empty and failed pages are not charged.
Does it return game logs or splits?
No. It reads the season tables on public player pages only.
Can I pass player URLs instead of IDs?
Yes. Use startUrls with https://www.baseball-reference.com/players/... URLs; the example player is then not added.
Last verified: 2026-10-27