basketball_reference_web_scraper is a free, open source data extraction & web scraping project written in HTML and released under MIT. It has 563 GitHub stars, 133 forks and 8 open issues, and was last pushed 27 hours ago. On this registry it ranks #143 of 149 tracked projects in Data Extraction & Web Scraping, with 5 head-to-head comparisons available. It gained 3 stars over the last 30 tracked days.

What is basketball_reference_web_scraper?

basketball_reference_web_scraper is a Python package distributed on PyPI that provides an API-style interface over Basketball Reference's NBA statistics, built for developers and analysts who want NBA numbers available inside their own Python code rather than copied out of web pages by hand.

What it is

The project is a web scraper for Basketball Reference, the long-running basketball statistics site. It lives in the Python ecosystem and is published as a PyPI package, which is how its code reaches users' environments. The repository carries the topic tags basketball-reference, nba, python, web-scraper, and web-scraping, and the tagline describes it as an "NBA Stats API via Basketball Reference". It is released under the MIT licence and hosted on GitHub, where it has accumulated 556 stars, 133 forks, and 8 open issues. The author states plainly that the library began as an exercise in publishing a first PyPI package.

The concrete thing it replaces is the one-off scraper that a developer would otherwise write and maintain alone against Basketball Reference's pages. Getting statistics out of a stats site normally means fetching pages, locating the right tables in the markup, and parsing them into a usable shape — work that has to be redone whenever a site changes and that is duplicated by everyone who needs the same numbers. This library consolidates that fetching and parsing into a single installable dependency with a documented surface of API methods, so callers work against method names instead of page structure.

Key capabilities

  • Ships as the basketball_reference_web_scraper Python package, installable from PyPI into an existing Python environment.
  • Exposes documented API methods, with the reference published at jaebradley.github.io/basketball_reference_web_scraper.
  • Sources NBA data from Basketball Reference, tagged on the repository as basketball-reference and nba.
  • Distributed under the MIT licence, permitting reuse and modification in other projects.
  • Maintained as an open-source project with visible activity: the last push to the repository was 2026-09-17.
  • Accepts outside contributions, with thirteen contributors credited by handle in the README, including @DaiJunyan, @ecallahan5, @Yotamho, and @ntsirakis.
  • Has a downstream footprint of 133 forks, alongside 556 stars and 8 open issues on GitHub.

Who uses it and how

  • Python developers who want NBA statistics available as objects in code rather than as HTML, and who prefer a pip-installable dependency over a scraper of their own.
  • Analytics and notebook-style workflows written in Python, where the package sits alongside other libraries in the same interpreter.
  • Open-source contributors working through pull requests, as the credited contributor list and the open issue count of 8 indicate an active external contributor base.
  • Teams and individuals who fork rather than depend directly, consistent with the 133 forks recorded on the repository.
  • Readers of the project documentation, who are directed to a separate documentation site for installation steps and method descriptions.

Getting started

Installation is through PyPI as the basketball_reference_web_scraper package, and the README directs users to the documentation page for both installation instructions and the API methods. There is no hosted service and no Docker image; the package runs inside a Python environment the user controls.

How it compares

No list of paid products or comparable tools appears in the available facts, so on the axes of licence and cost model the only grounded statement is that this project is MIT-licensed and free to install. No similar scraper or data provider is named in the material, so within this registry it stands alone. Any comparison to commercial NBA data feeds would be speculation and is not made here.

When to use it — and when not to

A self-hoster operates nothing beyond a Python environment — no database, object storage, or mail server is involved — which makes adoption cheap, but it also means the package inherits every risk of depending on a third party's page structure and availability. The README is deliberately thin and points outward to a separate documentation site, so users who need thorough in-repository guidance, or who need a vendor-supported data source with guarantees about uptime and schema stability, should not choose this library. The author's own aside about hoping the source site does not object also serves as a reminder that polite request behaviour and the site's terms are the user's responsibility.

project readme (upstream, from github) — read inline

logo

pypi python version license code coverage continuous integration

Basketball Reference is a great site (especially for a basketball stats nut like me), and hopefully they don't get too pissed off at me for creating this.

I initially wrote this library as an exercise for creating my first PyPi package - hope you find it valuable!

Documentation

For documentation about installing the package and API methods see the documentation page.

Contributors

Thanks to @DaiJunyan, @ecallahan5, @Yotamho, @ntsirakis, @allanbelliti, @krlu, @aaronbannin, @benjaminmesser, @pepeefirat, @PGats, @jakeakopp, and @DigitalCurrensy for their contributions!

Frequently asked questions

Is basketball_reference_web_scraper free to use?

basketball_reference_web_scraper is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does basketball_reference_web_scraper do?

NBA Stats API via Basketball Reference

What is basketball_reference_web_scraper written in?

basketball_reference_web_scraper is primarily written in HTML. Its source is publicly available at https://github.com/jaebradley/basketball_reference_web_scraper, and it has 563 GitHub stars.