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 fieldMeaning
game_idgame_idGame key, joins every file
seqseq (get_plays)Order of the play inside the game
periodperiodQuarter or overtime period
clock_secondsclock_secondsSeconds left in the period
teamteamTeam abbreviation
type_texttypeShot type, such as a pullup jump shot or a finger roll layup
shooting_play, scoring_playmade (get_shot_chart)Whether the play was a shot, and whether it scored
points_attemptedpts2 or 3 for a field-goal attempt
x, yx, yCourt location in feet, basket at (25, 0)
distance_ftshot.distance_ft (get_plays)Shot distance in feet
athlete_idplayer_idShooter
x_pointsexpected_pointsOur expected points for a shot of that type and location
x_points_point_in_timeexpected_points_point_in_timeThe 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_idseqperiodclock_secondsteamtype_textpoints_attemptedxydistance_ftx_points
40185996711695NYDriving Floating Jump Shot22978.10.902
40185996731672SAJump Shot372026.91.064
40185996751645NYTurnaround Bank Jump Shot2211919.40.804
40185996781616NYPullup Jump Shot239114.00.892
401859967111606NYDriving Finger Roll Layup22712.21.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):

zoneattemptsmadepctpoints_per_shotexpected_points_per_shot
restricted_area1,5411,1130.7221.4451.353
paint1,2825920.4620.9240.885
midrange6022510.4170.8340.849
corner_37652980.3901.1691.146
above_break_33,1901,1590.3631.0901.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.

Buy NBA History for $199 or test the API free.

Get a free key Or download whole seasons as Parquet

Checked against the live API on 2026-12-06. Questions: hello@sportsdatahq.com.