Basketball Reference+API.SH

Basketball Reference API

Every Basketball-Reference stats table, from player careers to box scores, as clean JSON.

Basketball-Reference has no official API, and its stats live in HTML tables, some of them hidden inside page comments. The API.SH Basketball Reference API reads those pages for you and returns every table as named columns and rows: a player's per game, totals, per 36, per 100 possessions, advanced, shooting and play-by-play stats for the regular season and playoffs, season game logs, team rosters, league standings, monthly schedules, league-wide player stats, leaders, box scores by quarter, scores for any date, drafts 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
Basketball Reference search
GET https://api.api.sh/basketball-reference/v1/search
1 credit · $1 per 1,000 calls

What you can build with the Basketball Reference API

Player research and projections

Pull a player's bio and every career stats table, then the game log for any season, to build projections, aging curves or fantasy rankings.

League-wide datasets

Download every player's per game, totals, advanced or shooting stats for a season in one call, back to the early years of the league.

Game results and box scores

List the games played on a date or in a month, then read each box score with the line score, four factors and every player's basic and advanced line by quarter.

Standings and team pages

Track conference and division standings, expanded standings and team rosters with per game and advanced stats for any season.

Draft and awards history

Get every pick of a draft with the players' career numbers, and the winners of the MVP, Rookie of the Year, All-NBA and other awards by season.

Any other page

Point the page route at coaches, franchises, playoffs, WNBA or G League pages and get their tables in the same JSON shape.

Basketball Reference data you get

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

Basketball Reference API endpoints and prices

Basketball 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
Basketball Reference search
/basketball-reference/v1/search
params qdocstry
$1 · $2 PAYG
1 credit
Profiles and accounts2
Basketball Reference any page
/basketball-reference/v1/page
params path +1 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference player page: bio and every stats table
/basketball-reference/v1/player
params id +1 optionaldocstry
$1 · $2 PAYG
1 credit
More data11
Basketball Reference award winners
/basketball-reference/v1/awards
params none required +2 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference box score
/basketball-reference/v1/boxscore
params id +1 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference draft
/basketball-reference/v1/draft
params year +2 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference season leaders
/basketball-reference/v1/leaders
params season +1 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference league player stats
/basketball-reference/v1/player-stats
params season +3 optionaldocstry
$2 · $4 PAYG
2 credits
Basketball Reference player game log for a season
/basketball-reference/v1/player/gamelog
params id, season +2 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference schedule and results by month
/basketball-reference/v1/schedule
params season +3 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference scores for a date
/basketball-reference/v1/scores
params datedocstry
$1 · $2 PAYG
1 credit
Basketball Reference league season summary
/basketball-reference/v1/season
params season +2 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference standings
/basketball-reference/v1/standings
params season +2 optionaldocstry
$1 · $2 PAYG
1 credit
Basketball Reference team season: roster and stats
/basketball-reference/v1/team
params team, season +1 optionaldocstry
$1 · $2 PAYG
1 credit

Call the Basketball Reference API

Basketball Reference search: GET https://api.api.sh/basketball-reference/v1/search

curl "https://api.api.sh/basketball-reference/v1/search?q=curry" \
  -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 Basketball Reference data

  • Public data only: no Basketball Reference login, cookies or account needed
  • One key and one response shape for Basketball 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 Basketball Reference API

Basketball-Reference does not offer a public API; its data is published as web pages, and its owner sells a separate paid query tool. The NBA's own stats site is a different source. API.SH turns Basketball-Reference pages into JSON with one key.

Instead of maintaining a Python scraper that breaks when a table moves into a comment, or comparing Apify actors, call one endpoint and get every table with stable column keys.

Basketball Reference API questions

What Basketball Reference data can I get?+

Search (/basketball-reference/v1/search), player pages with bio and every stats table (/basketball-reference/v1/player), season game logs (/basketball-reference/v1/player/gamelog), team seasons (/basketball-reference/v1/team), season summaries and standings (/basketball-reference/v1/season, /basketball-reference/v1/standings), monthly schedules (/basketball-reference/v1/schedule), league player stats (/basketball-reference/v1/player-stats), leaders (/basketball-reference/v1/leaders), box scores (/basketball-reference/v1/boxscore), scores by date (/basketball-reference/v1/scores), drafts (/basketball-reference/v1/draft), awards (/basketball-reference/v1/awards) and any other page (/basketball-reference/v1/page).

How much does the Basketball Reference API cost?+

Most Basketball Reference endpoints cost 1 credit per call; /basketball-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 /basketball-reference/v1/awards at 1 credit each.

Is there an official Basketball Reference API?+

No. Basketball-Reference publishes its stats as web pages and has no public API. API.SH reads those public pages and returns the tables as JSON.

Do I need a Basketball Reference account?+

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

Can I use it from Python?+

Yes. Any HTTP client works: send your key in the x-api-key header and read the JSON. Each table comes back with column keys and rows, so it loads straight into a pandas DataFrame.

Does it include tables hidden in the page?+

Yes. Many tables on the site are loaded from comments in the page source; the API returns them with the visible ones. Use tables= to ask for only the ones you need.

How do I get started?+

1. Sign up at api.sh. 2. Copy your API key. 3. Call /basketball-reference/v1/player with a player id like jamesle01. 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 Basketball Reference API have a rate limit?+

No. API.SH puts no rate limit on your key: send as many Basketball Reference calls in parallel as you need and pay only for the calls that run. If Basketball 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