You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An API Client Package to Access the APIs of NBA.com
nba_api is an API Client for www.nba.com. This package intends to make the APIs of NBA.com easily accessible and provide extensive documentation about them.
Getting Started
nba_api requires Python 3.7+ along with the requests and numpy packages. While pandas is not required, it is required to work with Pandas DataFrames.
pip install nba_api
NBA Official Stats
fromnba_api.stats.endpointsimportplayercareerstats# Nikola Jokićcareer=playercareerstats.PlayerCareerStats(player_id='203999')
# pandas data frames (optional: pip install pandas)career.get_data_frames()[0]
# jsoncareer.get_json()
# dictionarycareer.get_dict()
Practical examples in Jupyter Notebook format, including making basic calls, finding games, working with play-by-play data, and interacting with live game data.
Join Slack to get help, help others, provide feedback, see amazing projects, participates in discussions, and collaborate with others from around the world.
Stack Overflow
Not a Slack fan? No problem. Head over to StackOverflow. Be sure to tag your post with nba-api.
A significant purpose of this package is to continuously map and analyze as many endpoints on NBA.com as possible. The documentation and analysis of the endpoints and parameters in this package are some of the most extensive information available. At the same time, NBA.com does not provide information regarding new, changed, or removed endpoints.
If you find a new, changed, or deprecated endpoint, open a GitHub Issue