Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An API Client package to access the APIs for NBA.com

License

NotificationsYou must be signed in to change notification settings

swar/nba_api

Repository files navigation

Version: PyPIDownloads per Month: PyPYBuild: CircleCILicense: MITSlack

nba_api

An API Client Package to Access the APIs of NBA.com

nba_api is an API Client forwww.nba.com. This package intends to make the APIs ofNBA.com easily accessible and provide extensive documentation about them.

Getting Started

nba_api requires Python 3.7+ along with therequests andnumpy packages. Whilepandas 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()

NBA Live Data

fromnba_api.live.nba.endpointsimportscoreboard# Today's Score Boardgames=scoreboard.ScoreBoard()# jsongames.get_json()# dictionarygames.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

JoinSlack 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 toStackOverflow. Be sure to tag your post withnba-api.

Contributing

SeeContributing 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 aGitHub Issue

Bugs

Encounter a bug,report a bug.

License & Terms of Use

API Client Package

Thenba_api package is Open Source with anMIT License.

NBA.com

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


[8]ページ先頭

©2009-2025 Movatter.jp