Dataset
NBA shot chart coordinates, as Parquet files
Short answer: the NBA History package ($199, one time) holds every located NBA shot we have since 2003-04. Each shot has x and y court coordinates in feet, a distance and our expected points. The files are Parquet, one per season. The API returns zone summaries and single games.
What you are buying
The NBA History package (id nba-history, $199 one time) has three tables that join on game_id:
- plays: one row per play. Shots carry the court location, the distance, the points attempted and our expected points.
- games: one row per game with the date, teams, score, periods, venue and attendance.
- player_game_stats holds one row per player per game.
For a shot chart you need only plays and, if you want dates or teams, games. The plays table is Parquet only, one file per season. Games and player game stats ship as CSV and Parquet. A README, a manifest with a row count per file and a checksum list come in the same download.
Unknown values are blank, never 0. A shot that has no location (a free throw, for example) has a blank x and y, so filter on x IS NOT NULL to get the located field-goal attempts.
Larger tiers contain this package. NBA History + Odds ($499) and NBA Complete ($799) both include the same plays table, with market history added on top. If you start with History you can upgrade for the price difference within 90 days.
Coverage and updates
Shot locations start with the 2003-04 season. Seasons are named by the year they end in, so the 2024-25 season is 2025. The catalog does not give a total row count for the plays table, so we do not quote one. Your manifest.json has the exact count for every season file.
Every package includes all finished seasons plus the current season as of our latest monthly update on the day you buy. While you hold an API plan of Pro or higher, we refresh the current season's files every month at no charge. Without a plan, an end-of-season update costs a quarter of the package price. Fixes to past seasons are free for a year, and you can re-download your files for 365 days.
Schema
These are the real column names from the free sample of the package, with the matching field in the API tools.
| Package column (plays) | API field | Meaning |
|---|---|---|
| game_id | game_id | Game key, joins every file |
| seq | seq (get_plays) | Order of the play inside the game |
| period | period | Quarter or overtime period |
| clock_seconds | clock_seconds | Seconds left in the period |
| team | team | Team abbreviation |
| type_text | type | Shot type, such as a pullup jump shot or a finger roll layup |
| shooting_play, scoring_play | made (get_shot_chart) | Whether the play was a shot, and whether it scored |
| points_attempted | pts | 2 or 3 for a field-goal attempt |
| x, y | x, y | Court location in feet, basket at (25, 0) |
| distance_ft | shot.distance_ft (get_plays) | Shot distance in feet |
| athlete_id | player_id | Shooter |
| x_points | expected_points | Our expected points for a shot of that type and location |
| x_points_point_in_time | expected_points_point_in_time | The same model fitted only on earlier data |
The package has no zone column. The API's get_shot_chart tool groups shots into six zones (restricted area, paint, midrange, corner three, above the break three, free throw) and reports attempts, makes and expected points per shot for each. In the package you build zones yourself from x, y and distance_ft.
A real sample
Five located shots from game 401859967 (2026 Finals, game 6, New York at San Antonio), from the free sample of the package:
| game_id | seq | period | clock_seconds | team | type_text | points_attempted | x | y | distance_ft | x_points |
|---|---|---|---|---|---|---|---|---|---|---|
| 401859967 | 1 | 1 | 695 | NY | Driving Floating Jump Shot | 2 | 29 | 7 | 8.1 | 0.902 |
| 401859967 | 3 | 1 | 672 | SA | Jump Shot | 3 | 7 | 20 | 26.9 | 1.064 |
| 401859967 | 5 | 1 | 645 | NY | Turnaround Bank Jump Shot | 2 | 21 | 19 | 19.4 | 0.804 |
| 401859967 | 8 | 1 | 616 | NY | Pullup Jump Shot | 2 | 39 | 1 | 14.0 | 0.892 |
| 401859967 | 11 | 1 | 606 | NY | Driving Finger Roll Layup | 2 | 27 | 1 | 2.2 | 1.254 |
A finger roll layup from two feet is worth about 1.25 expected points. A bank jumper from 19 feet is worth about 0.80. Expected points is the value of the shot from its type and location, so it does not depend on who took it.
A second view, from the API: the zone summary for Boston in the 2024-25 season, 7,380 field-goal attempts (live call, Dec 6, 2026):
| zone | attempts | made | pct | points_per_shot | expected_points_per_shot |
|---|---|---|---|---|---|
| restricted_area | 1,541 | 1,113 | 0.722 | 1.445 | 1.353 |
| paint | 1,282 | 592 | 0.462 | 0.924 | 0.885 |
| midrange | 602 | 251 | 0.417 | 0.834 | 0.849 |
| corner_3 | 765 | 298 | 0.390 | 1.169 | 1.146 |
| above_break_3 | 3,190 | 1,159 | 0.363 | 1.090 | 1.030 |
The tool also returns a free-throw row (1,565 attempts), which we left out because it has no location.
Load the Parquet files
DuckDB reads a folder of season files in one query. This bins every located shot into 5-foot squares and reports the share that scored. The file names are our guess from the manifest convention, so check yours. We have not run it, because we do not have the paid Parquet files locally.
import duckdb
duckdb.sql("""
SELECT floor(x / 5) * 5 AS x_bin,
floor(y / 5) * 5 AS y_bin,
count(*) AS attempts,
avg(CAST(scoring_play AS INT)) AS fg_pct,
avg(x_points) AS avg_expected_points
FROM read_parquet('plays_*.parquet')
WHERE x IS NOT NULL AND points_attempted IN (2, 3)
GROUP BY 1, 2
HAVING count(*) >= 50
ORDER BY attempts DESC
""").show()The same bins in Polars, lazily, so the archive never has to fit in memory. Also unverified.
import polars as pl
bins = (
pl.scan_parquet("plays_*.parquet")
.filter(pl.col("x").is_not_null() & pl.col("points_attempted").is_in([2, 3]))
.group_by((pl.col("x") // 5 * 5).alias("x_bin"), (pl.col("y") // 5 * 5).alias("y_bin"))
.agg(pl.len().alias("attempts"), pl.col("scoring_play").cast(pl.Int8).mean().alias("fg_pct"))
.filter(pl.col("attempts") >= 50)
.collect()
)
print(bins.sort("attempts", descending=True).head())Same data through the API
For one team's zones, or one game's shots with coordinates, call the API. Set DUNKAPI_API_KEY to a key from your account first.
import json
import os
import urllib.request
payload = {"team": "BOS", "season": 2025}
req = urllib.request.Request(
"https://mcp.dunkapi.com/v1/get_shot_chart",
data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json", "x-api-key": os.environ["DUNKAPI_API_KEY"]},
)
with urllib.request.urlopen(req, timeout=30) as resp:
print("HTTP", resp.status)
data = json.load(resp)["data"]
print(data["field_goal_attempts"])
for z in data["zones"]:
print(z["zone"], z["attempts"], z["expected_points_per_shot"])Add "game_id": "401859967", "include_shots": true to get every shot of that game with x, y, made and points, capped at 3,000 shots. One call costs 10 credits. The free plan gives 500 credits a month, no card.
When not to use this
- You need one team's zones for a season. The API call above returns six rows for 10 credits. Buying the archive for that is overkill.
- You need tonight's game. Files are refreshed monthly at best. Use the API.
- You need tracking data. There is no player or ball tracking, only the location of each shot.
- You want written play text or a defender distance. Neither is in the table.
- You want to resell the coordinates. The licence does not allow it.
- Your tool cannot read Parquet. Plays are not offered as CSV. DuckDB converts to CSV in one statement.
Who uses shot coordinates
Most buyers want one of three things. Some are training shot-quality models and need every shot with a location and an outcome in one table. Some are drawing charts or heat maps for a newsletter or a class and want to bin many seasons without paying per call. Others need a fixed snapshot they can cite. The manifest and checksums let you record exactly which files an analysis used. All three read many rows once, which is what Parquet is for.
Free sample first
Every tier has a free sample zip with a few real games, the same tables and the same columns. Download it from the data packages page, load it with the snippets above and confirm the columns suit your pipeline before you pay.
Get a free key Or download whole seasons as Parquet
Checked against the live API on 2026-12-06. Questions: hello@sportsdatahq.com.