# swar/nba_api

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

Repository: https://github.com/swar/nba_api
Canonical: https://ross.abutalabs.com/products/nba_api
Language: Python
License: MIT
License Family: permissive
Topics: nba, stats, nba-stats, nba-api, nba-stats-api, basketball-stats, sports-stats, api-client, endpoint-analysis, jupyter-notebooks, analysis, http-client, python, python3
Last push: 2026-08-16T18:05:47+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 59, longevity 100
- inputs: {"age_days": 2907, "days_push": 17, "days_rel": 194, "gap_med": 31.5, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3753, forks 721 (observed 2026-08-28T04:08:17.748040+00:00)

## What it is
A Python API client package for accessing NBA.com's official stats and live game APIs. It wraps NBA.com endpoints with easy methods returning JSON, dictionaries, or pandas DataFrames, plus static player/team datasets.

## Use cases
- fetch NBA player career stats in Python
- get live NBA scoreboard and game data
- analyze basketball play-by-play data in pandas
- pull team and player stats for sports analytics projects
- build a basketball stats dashboard or model
- reduce HTTP calls with static player and team datasets

## When to choose
- you need NBA.com stats or live game data in Python
- you want pandas DataFrame output for analysis
- you want documented access to NBA stats endpoints

## When to avoid
- you need data from other sports leagues
- you need a non-Python language client
- you need guaranteed uptime since NBA.com APIs are unofficial and can change

## Facets
- artifact type: library
- maturity: active
- function: http-client, api-framework, data-science
- domain: apis, sports, data-science, analytics
- platform: python, cross-platform
- tags: nba, basketball, sports-stats, api-client, stats-api

## Member repositories
- swar/nba_api (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:17.748040+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:28:57.959332+00:00, confidence not recorded.
  - readme: https://github.com/swar/nba_api (fetched 2026-08-28T04:08:17.748040+00:00, sha 06b979518bf3)
  - registry_pypi: https://pypi.org/pypi/nba_api/json (fetched 2026-08-29T09:22:59.877364+00:00, sha 97c3d1b609dc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
