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.
| Season | Games | Covered | Plays |
|---|---|---|---|
| 2026 | 1,322 | 100% | 642,354 |
| 2025 | 1,321 | 100% | 624,638 |
| 2024 | 1,319 | 100% | 613,929 |
| 2023 | 1,320 | 100% | 620,405 |
| 2022 | 1,323 | 100% | 617,324 |
| 2021 | 1,171 | 100% | 545,014 |
| 2020 | 1,143 | 100% | 547,321 |
| 2019 | 1,312 | 100% | 625,281 |
| 2018 | 1,312 | 100% | 602,169 |
| 2017 | 1,309 | 100% | 596,395 |
| 2016 | 1,316 | 100% | 595,821 |
| 2015 | 1,311 | 100% | 594,011 |
| 2014 | 1,319 | 100% | 593,133 |
| 2013 | 1,314 | 100% | 577,862 |
| 2012 | 1,074 | 100% | 475,942 |
| 2011 | 1,311 | 100% | 584,860 |
| 2010 | 1,312 | 100% | 584,754 |
| 2009 | 1,315 | 100% | 582,774 |
| 2008 | 1,316 | 100% | 585,446 |
| 2007 | 1,309 | 99% | 586,496 |
| 2006 | 1,319 | 100% | 594,822 |
| 2005 | 1,314 | 100% | 595,872 |
| 2004 | 1,271 | 99% | 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.