Skip to main content

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

nba_api

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.10+ 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)
career.season_totals_regular_season.get_data_frame()

# json
career.get_json()

# dictionary
career.get_dict()

NBA Live Data

from nba_api.live.nba.endpoints import scoreboard

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

# json
games.get_json()

# dictionary
games.get_dict()

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.

Documentation

Join the Community

Slack

Join Slack to get help, help others, provide feedback, see amazing projects, participate 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.

Contributing

See Contributing to the NBA_API for complete details.

Endpoints

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

Bugs

Encounter a bug, report a bug.

License & Terms of Use

API Client Package

The nba_api package is Open Source with an MIT License.

NBA.com

NBA.com has a Terms of Use regarding the use of the NBA’s digital platforms.

Release files for nba_api 1.11.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nba_api 1.11.4
File Size Uploaded
nba_api-1.11.4.tar.gz 177.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nba_api 1.11.4
File Interpreter ABI Platform
nba_api-1.11.4-py3-none-any.whl Python 3 none any Details

Total release size: 499.9 kB

Release files / nba_api-1.11.4.tar.gz

Download URL nba_api-1.11.4.tar.gz
Size 177.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1dccd70b78f36f64260e1f353c4a02c1644147c4a2a5ce42fbd9f637d70bad3e
BLAKE2b-256 checksum
How to use checksums
0df8761434ce98e39d6bdd1b98611102fdc054920e330a5b5194464cb340adf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.1 Darwin/25.3.0

Release files / nba_api-1.11.4-py3-none-any.whl

Download URL nba_api-1.11.4-py3-none-any.whl
Size 322.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f489b2a1d67ee4298f5173775b335d0e43e63455ed157a5612b542094b9f1963
BLAKE2b-256 checksum
How to use checksums
6bc217c805220de846ea9280f62a003c0cdebddf1de3d387614162891502a3a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.1 Darwin/25.3.0

Release history Release notifications | RSS feed

This release

1.11.4 This release

2 release files

1.11.3

2 release files

1.11.2

2 release files

1.11.1

2 release files

1.11.0

2 release files

1.10.2

2 release files

1.10.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7

3 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2

2 release files

1.1.14

2 release files

1.1.13

2 release files

1.1.12

2 release files

1.1.11

1 release file

1.1.10

2 release files

1.1.9

1 release file

1.1.8

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page