Skip to content

Compare

DunkAPI vs scraping Basketball Reference

Basketball Reference has no public API and its terms bar scraping. DunkAPI gives you NBA, WNBA and college data over REST and MCP, with no scraper to maintain.

Basketball Reference is the best-known site for historical basketball statistics, but it does not offer a public API: the data is on HTML pages, and its data-use terms restrict automated collection. If you need basketball data in code, scraping it is both a maintenance burden and, going by those terms, not something to build a product on. DunkAPI serves play-by-play with shot locations, box scores, standings, lines and ratings over REST and MCP.

For reading a player's career or looking something up by hand, the site is still the right place. DunkAPI is for when the lookup has to run in code.

Side by side

DunkAPIscraping Basketball Reference
Price500 free credits, no card, then paid plansFree to read; paid options for some data
AccessREST API and MCP serverHTML pages; no public API
Automated useIntended and keyedRestricted by their data-use terms
HistoryNBA games since 2004; WNBA since 2006Covers the full history of the leagues
Shot locationsx/y for every field goal attempt, with expected pointsShot charts on the site; not offered as data
Sportsbook lines4 to 12 books per regular-season game, 2013-14 to 2023-24 (10 to 12 from 2020-21)Not a focus of the site
UpkeepOursYours, whenever the pages change

Use scraping Basketball Reference instead if

  • You need seasons before 2004: DunkAPI starts there for the NBA.
  • You are looking something up by hand, or reading career pages: the site is made for that.
  • You want its historical advanced stats and award pages, which we do not carry.

Questions

Does Basketball Reference have an API?

Not a public one. Its pages are meant to be read in a browser, and its data-use terms limit automated access.

Can I get Basketball Reference data as a CSV?

The site offers some table exports by hand. For programmatic access to similar box score data, DunkAPI returns JSON per request.

Sources

Checked October 7, 2026.

See the data

Try it with 500 free credits

No card. REST or MCP.