Baseball Reference+API.SH

Baseball Reference API

Baseball-Reference stats tables, from career batting and pitching to play-by-play, as clean JSON.

Baseball-Reference has no public API. The API.SH Baseball Reference API reads its pages and returns every table as named columns and rows: a player's standard, value and advanced batting and pitching, postseason and fielding stats, batting, pitching or fielding game logs, team seasons with rosters and coaches, standings, the full season schedule with results, league-wide player stats, batting and pitching leaders, box scores with play-by-play, scores for any date, amateur draft rounds and award winners. A page route reads any other page of the site the same way.

  • 14 endpoints
  • from $1 / 1,000 calls
  • 1,000 free credits / month
  • failed calls free
Baseball Reference search
GET https://api.api.sh/baseball-reference/v1/search
1 credit · $1 per 1,000 calls

What you can build with the Baseball Reference API

Player analysis

Get a player's bio and every career table, then the game log for a season, for projections, prop research or fantasy tools.

Season-wide stat pulls

Download standard, value or advanced batting and pitching for every player in a season, with team totals, in one call.

Game logs and box scores

List the games of a date or the whole season schedule, then read each box score with batting and pitching lines, top plays and the play-by-play.

Standings and team seasons

Track division standings and pull a team's season with batting, pitching, fielding and value stats for its players.

Draft and awards history

Read any round of the June amateur draft with signing bonuses and career stats, and MVP, Cy Young, Gold Glove and other award winners.

Baseball Reference data you get

Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.

Baseball Reference API endpoints and prices

Baseball Reference endpoints cost 1 to 2 credits per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing

Search and discovery1
Baseball Reference search
/baseball-reference/v1/search
params qdocstry
$1 · $2 PAYG
1 credit
Profiles and accounts2
Baseball Reference any page
/baseball-reference/v1/page
params path +1 optionaldocstry
$1 · $2 PAYG
1 credit
Baseball Reference player page: bio and every stats table
/baseball-reference/v1/player
params id +1 optionaldocstry
$1 · $2 PAYG
1 credit
More data11
Baseball Reference award winners
/baseball-reference/v1/awards
params none required +2 optionaldocstry
$1 · $2 PAYG
1 credit
Baseball Reference box score
/baseball-reference/v1/boxscore
params id +1 optionaldocstry
$1 · $2 PAYG
1 credit
Baseball Reference amateur draft round
/baseball-reference/v1/draft
params year +2 optionaldocstry
$1 · $2 PAYG
1 credit
Baseball Reference season leaders
/baseball-reference/v1/leaders
params season +2 optionaldocstry
$1 · $2 PAYG
1 credit
Baseball Reference league player stats
/baseball-reference/v1/player-stats
params season +3 optionaldocstry
$2 · $4 PAYG
2 credits
Baseball Reference player game log for a season
/baseball-reference/v1/player/gamelog
params id, season +2 optionaldocstry
$1 · $2 PAYG
1 credit
Baseball Reference season schedule and results
/baseball-reference/v1/schedule
params seasondocstry
$1 · $2 PAYG
1 credit
Baseball Reference scores for a date
/baseball-reference/v1/scores
params datedocstry
$1 · $2 PAYG
1 credit
Baseball Reference league season team stats
/baseball-reference/v1/season
params season +2 optionaldocstry
$1 · $2 PAYG
1 credit
Baseball Reference standings
/baseball-reference/v1/standings
params season +1 optionaldocstry
$1 · $2 PAYG
1 credit
Baseball Reference team season: roster and stats
/baseball-reference/v1/team
params team, season +1 optionaldocstry
$1 · $2 PAYG
1 credit

Call the Baseball Reference API

Baseball Reference search: GET https://api.api.sh/baseball-reference/v1/search

curl "https://api.api.sh/baseball-reference/v1/search?q=judge" \
  -H "x-api-key: $APISH_KEY"
  1. Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
  2. Create an API keyOne key works for all 921 platforms.
  3. Send the requestJSON back in one call. Add output=csv or output=ndjson for files.

Why API.SH for Baseball Reference data

  • Public data only: no Baseball Reference login, cookies or account needed
  • One key and one response shape for Baseball Reference and 920 other platforms
  • Built and maintained by API.SH, not third-party publishers
  • Pay per call; errors on our side cost nothing
  • No rate limits: run as many calls in parallel as you need
  • Live status for every endpoint

API.SH vs the official Baseball Reference API

Baseball-Reference does not have a public API; the official MLB Stats API is a separate source run by the league. API.SH turns Baseball-Reference pages, including their historical and advanced tables, into JSON with one key.

Skip writing and fixing your own pybaseball-style scraper or paying for an Apify actor: one key returns every table with stable column keys.

Baseball Reference API questions

What Baseball Reference data can I get?+

Search (/baseball-reference/v1/search), player pages (/baseball-reference/v1/player), game logs (/baseball-reference/v1/player/gamelog), team seasons (/baseball-reference/v1/team), season team stats and standings (/baseball-reference/v1/season, /baseball-reference/v1/standings), the season schedule (/baseball-reference/v1/schedule), league player stats (/baseball-reference/v1/player-stats), leaders (/baseball-reference/v1/leaders), box scores (/baseball-reference/v1/boxscore), scores by date (/baseball-reference/v1/scores), the amateur draft (/baseball-reference/v1/draft), awards (/baseball-reference/v1/awards) and any other page (/baseball-reference/v1/page).

How much does the Baseball Reference API cost?+

Most Baseball Reference endpoints cost 1 credit per call; /baseball-reference/v1/player-stats costs 2 credits. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.

Is there a free trial?+

Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /baseball-reference/v1/awards at 1 credit each.

Is there an official Baseball Reference API?+

No. Baseball-Reference publishes its data as web pages only. MLB runs its own stats API for league data; API.SH reads Baseball-Reference's public pages and returns their tables as JSON.

Do I need an account or login?+

No. Every endpoint reads public pages; no account, subscription or login is used.

Can I use it from Python or R?+

Yes. Any HTTP client works. Tables come back as column keys plus rows, ready for a pandas or R data frame.

Is there a free Baseball Reference API?+

Every API.SH account gets free monthly credits, enough to try every route. After that you pay per call, with no subscription.

How do I get started?+

1. Sign up at api.sh. 2. Copy your API key. 3. Call /baseball-reference/v1/player with a player id like ohtansh01. Request examples and every parameter are in the docs at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.

Does the Baseball Reference API have a rate limit?+

No. API.SH puts no rate limit on your key: send as many Baseball Reference calls in parallel as you need and pay only for the calls that run. If Baseball Reference itself slows down, the call returns 503 with a retry-after header and is not charged.

More sports APIs all sports APIs →

Start with 1,000 free credits
Every month, on every account. One key works for all 921 platforms.
Get a free API key