Skip to content
/ nba_api Public

An API Client package to access the APIs for


Notifications You must be signed in to change notification settings


Repository files navigation

Version: PyPI Downloads per Month: PyPY Build: CircleCI License: MIT Slack


An API Client Package to Access the APIs of

nba_api is an API Client for This package intends to make the APIs of 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

from nba_api.stats.endpoints import playercareerstats

# Nikola Jokić
career = playercareerstats.PlayerCareerStats(player_id='203999') 

# pandas data frames (optional: pip install pandas)

# json

# dictionary

NBA Live Data

from import scoreboard

# Today's Score Board
games = scoreboard.ScoreBoard()

# json

# dictionary

Additional Examples

  • Requests/Response Options
    • Proxy Support, Custom Headers, and Timeout Settings
    • Return Types and Raw Responses
  • Static Data Sets
    • Reduce HTTP requests for common and frequently accessed player and team data.
  • Jupyter Notebooks
    • 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 the Community


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.


See Contributing to the NBA_API for complete details.


A significant purpose of this package is to continuously map and analyze as many endpoints on 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, does not provide information regarding new, changed, or removed endpoints.

If you find a new, changed, or deprecated endpoint, open a GitHub Issue


Encounter a bug, report a bug.

License & Terms of Use

API Client Package

The nba_api package is Open Source with an MIT License. has a Terms of Use regarding the use of the NBA’s digital platforms.