nba_api
is an API Client for www.nba.com
. This package is meant to make the API Endpoints more accessible and to provide extensive documentation.
The APIs on www.nba.com
are largely undocumented and change frequently.
Please feel free to contribute and have an open discussion regarding improvements and additional APIs to be mapped.
stats.nba.com
-stats
pip install nba_api
Required and Optional Packages:
- Basic Usage -- The basics of calling an API endpoint.
- Jupyter Notebooks -- Larger practical examples in Jupyter Notebook format, including looking for play-by-play data for a particular game.
To get started developing, clone the repo and cd
into it.
Then, in an environment (conda or virtualenv) where you have not yet installed nba_api
, run
python -m pip install -e .
This command will install the package for development, such that any changes you make in the repo will be reflected the next time you import the package in Python.
We're always looking for people to help! Some examples of ways to get involved are:
- fix a bug
- add a feature
- create or improve documentation and examples
Just fork this repo, make your changes (see Development above), and issue a pull request.
A major purpose of this package is to map and analyze as many endpoints on NBA.com as possible. The documentation and analysis on the Endpoints and Parameters found in this package is some of the most extensive information available on these largely undocumented Endpoints. Please open an issue with any additional Endpoints/APIs.