canonical: https://jentic.com/apis/nba.com/nba

# NBA Stats API

The NBA Stats API exposes the unofficial stats.nba.com data feed used by NBA.com itself, covering box scores, player and team dashboards, draft history, league leaders, shot charts, play-by-play, and franchise records. The catalogue contains 91 GET endpoints spanning live game data and deep historical splits down to per-shot and per-possession statistics. The OpenAPI spec is sourced from a community-maintained Swagger definition rather than an official NBA contract.

## For AI agents

Pull NBA box scores, player and team dashboards, shot charts, play-by-play, and league-wide statistics across 91 GET endpoints.

## Scope

Does not handle ticketing, NBA League Pass video streaming, or merchandise - use for NBA player, team, game, draft, and league statistics only.

## Capabilities

- Pull traditional, advanced, four-factors, and player-tracking box scores for any NBA game
- Retrieve player profile, splits, shot logs, and dashboard statistics on demand
- Fetch team rosters, schedules, and per-team dashboards across the league season
- Read draft history, draft combine measurements, and draft combine drill results
- Surface league dashboards for player and team statistics, clutch performance, and shot locations
- Retrieve play-by-play and shot chart data for granular game-level analysis

## Use cases

### NBA Game Analytics Dashboard

Sports analysts and content sites build dashboards that surface advanced game metrics shortly after each NBA matchup ends. Endpoints such as /boxscoreadvancedv2, /boxscorefourfactorsv2, and /boxscoreplayertrackv2 return rich per-game splits that drop into a Postgres warehouse for trend analysis. The 91-endpoint surface covers nearly every dashboard panel an NBA-focused analytics team needs.

Example prompt: For yesterday's NBA games, call /boxscoreadvancedv2 for each game ID and return team and player offensive and defensive ratings.

### Fantasy Basketball Tooling

Fantasy basketball products price players using up-to-date splits and trends. /leaguedashplayerstats, /leaguedashplayerclutch, and /leaguedashplayerbiostats expose ranked player tables with the metrics fantasy engines need for projections. Refreshing these tables nightly keeps the fantasy product aligned with the actual league season.

Example prompt: Call /leaguedashplayerstats for the current season and return the top 50 players sorted by player efficiency rating.

### NBA Draft and Combine Research

Front offices, scouts, and journalists analyse draft history and combine measurements to evaluate prospects. /drafthistory, /draftcombinestats, /draftcombineplayeranthro, /draftcombinedrillresults, /draftcombinespotshooting, and /draftcombinenonstationaryshooting expose the official NBA combine and historical draft records. Pulling them into a draft-tracker database enables longitudinal study of draft cohorts.

Example prompt: Call /drafthistory for season=2003 and /draftcombinestats for the same year to assemble a profile of that draft class.

### Shot Chart and Play-by-Play Visualisations

Broadcasters, content sites, and analytics teams render shot charts and play-by-play timelines to explain games to fans. The shot location and box score endpoints provide the underlying coordinates and event sequences. The result is a visualisation pipeline that can sit on top of the API rather than scraping the NBA web pages.

Example prompt: Pull /leaguedashplayershotlocations for a chosen player and season and emit a JSON payload suitable for a shot-chart renderer.

### Agent-Driven NBA Stats Lookup via Jentic

Agents that answer fan or analyst questions about NBA games need a fast structured stats lookup without hand-rolling integrations against an undocumented endpoint. Through Jentic the agent searches by intent, loads the schema for the relevant box score or dashboard operation, and executes it, then summarises the JSON for the user. Because the spec is community-sourced, Jentic also handles request-header quirks the official feed expects.

Example prompt: Search Jentic for 'get an NBA box score for a specific game', load the schema for /boxscoresummaryv2, and execute it with the requested gameId.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/boxscoresummaryv2` | Get box score summary for a game |
| GET | `/boxscoreadvancedv2` | Get advanced box score for a game |
| GET | `/boxscoretraditionalv2` | Get traditional box score for a game |
| GET | `/commonplayerinfo` | Get common player profile info |
| GET | `/commonteamroster` | Get current team roster |
| GET | `/leaguedashplayerstats` | League-wide player stats dashboard |
| GET | `/leaguedashteamclutch` | League-wide team clutch stats |
| GET | `/drafthistory` | Get NBA draft history |

## Key resources

- **Box Scores** — Traditional, advanced, four-factors, scoring, misc, usage, and player tracking box scores per game
- **Player Dashboards** — Career, splits, clutch, shot logs, and shot location data per player
- **Team Dashboards** — Roster, splits, clutch, lineups, and shot data per team
- **League Dashboards** — League-wide player and team rankings across multiple metric families
- **Draft** — Draft history and full combine measurement and drill result feeds
- **Franchise History** — Records and historical standings per franchise

## Why Jentic

- **Setup:** Wiring the NBA Stats feed by hand means discovering that stats.nba.com needs no key but rejects requests without the right Referer and User-Agent headers, then setting those on every call and handling errors yourself. Through Jentic you install once, import the NBA Stats API from the API Directory, and your agent calls it with those headers already in place.
- **Permission scoping:** NBA Stats carries its game, player, and team ids as query parameters rather than in the URL path, so scope the agent to the operations it needs, such as box scores and player stats. Every operation here is a read, so the agent retrieves statistics and nothing that changes state.
- **Credential handling:** The NBA Stats feed needs no vendor secret, so there is nothing to store: your own Jentic One instance supplies the required Referer and User-Agent headers at execution time. No credential ever enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get an NBA box score for a specific game', and Jentic returns the matching NBA Stats operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **balldontlie API** — Free NBA stats API with a stable contract and simpler player and team endpoints.
- **SportsDataIO NBA API** — Commercial sports data provider with licensed NBA odds, projections, and DFS data.
- **API-Sports** — Multi-sport stats provider commonly combined with NBA Stats for cross-sport coverage.

## FAQ

### What authentication does the NBA Stats API use?

The stats.nba.com endpoints accept unauthenticated requests but require browser-style headers (Referer and User-Agent) to return data successfully. The OpenAPI spec declares no security scheme; Jentic handles the headers transparently when calling endpoints such as /boxscoresummaryv2.

### Can I get the box score for a specific game with the NBA Stats API?

Yes. GET /boxscoresummaryv2 with the gameId parameter returns the summary box score, and parallel calls to /boxscoreadvancedv2, /boxscorefourfactorsv2, and /boxscoretraditionalv2 return matching advanced, four-factors, and traditional splits for the same gameId.

### What are the rate limits for the NBA Stats API?

stats.nba.com is unofficial and aggressively rate-limits clients that issue rapid requests, typically returning HTTP 429 or empty responses. Spread calls out, cache responses, and avoid parallel scraping; the OpenAPI spec does not publish a precise per-second figure.

### How do I pull NBA box score data through Jentic?

Run pip install jentic, search for 'get an NBA box score for a specific game', load the schema for /boxscoresummaryv2, and execute it with the gameId. Jentic supplies the required browser-style headers automatically. Run it through Jentic One, the self-hosted execution layer.

### Is the NBA Stats API official?

No. The stats.nba.com feed is the data source NBA.com uses internally and is not covered by a public commercial contract. The OpenAPI spec in this catalogue is community-maintained and may lag behind upstream changes; expect occasional breakages when NBA.com updates its endpoints.

### Can I get league leaders and player rankings?

Yes. /leaguedashplayerstats, /leaguedashplayerclutch, /leaguedashplayershotlocations, and related dashboard endpoints return ranked tables of players or teams across the season, suitable for league-leader displays and fantasy-league sorting.

### Can I limit what my agent is allowed to do with the NBA Stats API?

Yes. Because you run Jentic One yourself, your own rules decide which NBA Stats operations the agent may call, so you can allow just the endpoints it needs, such as /boxscoresummaryv2, /leaguedashplayerstats, or /drafthistory, and withhold the rest. Every operation in this API is a read that carries game, player, and team ids as query parameters, so the agent only retrieves statistics and never changes state upstream. The feed needs no vendor key, and your self-hosted instance supplies the required Referer and User-Agent headers at execution time so no credential enters the agent's prompt or logs.
