Skip to content

Data

NBA play-by-play data

Play-by-play for 23 NBA seasons, from 2003-04: clock, score, players, shot type and location, and win probability from 2018. REST or MCP.

DunkAPI serves the play-by-play of NBA games since 2003-04, regular season and playoffs, as ESPN logged them: each play's period, clock, score, team, the players involved, the play type and its text, and for every shot its location in feet, distance, zone and our expected points.

From 2017-18 each play also carries the home team's win probability after it. Ask for a whole game with get_plays and a game_id, or filter a player's or team's season to shots, makes or misses, a zone, a period or clutch time. The table below is read from the database.

Coverage by season

Counted from the database on October 8, 2026: finished regular-season and playoff games.

SeasonGamesCoveredPlays
20261,322100%642,354
20251,321100%624,638
20241,319100%613,929
20231,320100%620,405
20221,323100%617,324
20211,171100%545,014
20201,143100%547,321
20191,312100%625,281
20181,312100%602,169
20171,309100%596,395
20161,316100%595,821
20151,311100%594,011
20141,319100%593,133
20131,314100%577,862
20121,074100%475,942
20111,311100%584,860
20101,312100%584,754
20091,315100%582,774
20081,316100%585,446
20071,30999%586,496
20061,319100%594,822
20051,314100%595,872
20041,27199%559,034

How to get it

get_plays, 10 credits a call. A full 2026 season is 1,322 calls and 13,220 credits, which fits in one month of Pro ($49/mo).

curl -X POST https://mcp.dunkapi.com/v1/get_plays \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "game_id": "401705127",
  "limit": 1000
}'

What comes back

plays[]List of objects
plays[].game_id
plays[].seq
plays[].period
plays[].clock_seconds
plays[].team
plays[].type
plays[].text
plays[].shot
plays[].shot.made
plays[].shot.points_attempted
plays[].shot.x
plays[].shot.y
plays[].shot.distance_ft

Every field and a real response: get_plays docs.

Questions

How far back does the NBA play-by-play go?

From 2004 to the most recent game; the table shows the count per season.

Where does the data come from?

Public ESPN data, the same play-by-play ESPN shows on its game pages, stored and served through one API.

Can I get only clutch plays or only threes?

Yes. get_plays filters by shots, made or missed, shot zone, period and clutch time (last five minutes of the fourth quarter or overtime, score within five).

Can I use it from Claude or ChatGPT?

Yes. DunkAPI is an MCP server as well as a REST API: add one URL to Claude, Cursor or any MCP client and ask in plain English.

Is it free?

Every account starts with 500 free credits and no card. A game's full play-by-play is 10 credits.

What it will not do

  • Plays land the morning after a game, not live.
  • Win probability from 2017-18 only.
  • No player tracking (speed, distance, touches).
  • The source's 2015-16 play-by-play is missing about 2% of that season's shots.
  • 26 games (14 of them in 2003-04) have no play-by-play at all in the source.

Works with

Start with 500 free credits

No card. REST or MCP.