Documentation for NBA-API package

This package is an API Client for www.nba.com

Examples →

# Description

Nba-api is a free Python tool that downloads statistics from Official NBA stats page (opens new window) and makes them accessible to python programs.

Nba-api is a wonderful resource for obtaining statistics on NBA teams, seasons, players, and games. This package includes methods for acquiring data for all of these categories in a variety of formats. Each method has its own set of valid queries that can be specified by the user.

When trying to comprehend what is happening in the sport, statistics are helpful. They can also be utilized in projects involving machine learning and data analytics.

# Installation

This package must be installed before it can be used.

To install:

pip install nba-api

# Required and Optional Packages

Requests -- pip install requests

Pandas (optional) -- pip install pandas

# Usage

Each endpoint while using this package requires either a Player ID e.g "Lebron James ID : 2544" or a Team ID e.g Golden State Warriors ID : 1610612744. An explanation on getting the IDs for usage in your project can be gotten in the static module page.

# Authentication

No authentication is required for the usage of this package.

# Note

This package represents outstanding work by rforbes (opens new window) and swar (opens new window). The Github repo can be found here (opens new window)

This documentation was created by Ayo Yissa (opens new window).

A good warning

Ongoing Project. Not all endpoints are documented at this point.

Thank you 😃

Build Status (opens new window)