get_plays
10 creditsMulti-tablePOST /v1/get_plays
Play-by-play with shot locations, zones, expected points and win probability
Use it when you need play-by-play: a whole game in order, or a player's clutch shots, threes or misses across a season, each with location and win probability.
Parameters
game_idstringoptional- One game: every play in order.
player_idstringoptional- A player's plays (with season).
teamstringoptional- A team's plays (id or abbreviation).
seasonnumber | stringoptional- Season by the year it ends (default: the latest; ignored with game_id).
season_typeenum: regular | postseason | play_in | preseasonoptionalshots_onlybooleanoptional- Field goal and free throw attempts only.
madebooleanoptional- Only made (true) or missed (false) shots.
zoneenum: restricted_area | paint | midrange | corner_3 | above_break_3 | free_throwoptional- One shot zone.
periodintegeroptionalclutchbooleanoptional- Last 5 minutes of the 4th quarter (college men: 2nd half) or overtime, score within 5.
limitintegeroptional- Max plays (default 200).
offsetintegeroptional
Notes
- Over MCP, ask for it in plain English and the client calls
get_playsitself. Point any MCP client athttps://mcp.dunkapi.com/mcp?key=YOUR_API_KEY. - Each call costs 10 credits, taken before it runs and refunded if the server errors.
- Not the call you need? Find the right call by what you are trying to answer.
Request
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": "401585601",
"shots_only": true,
"limit": 3
}'Response
json
{
"plays": [
{
"game_id": "401585601",
"seq": 1,
"period": 1,
"clock_seconds": 699,
"team": "LAL",
"type": "Pullup Jump Shot",
"text": "Austin Reaves makes 24-foot three pointer (LeBron James assists)",
"shot": {
"made": true,
"points_attempted": 3,
"x": 6,
"y": 15,
"distance_ft": 24.2,
"zone": "above_break_3",
"expected_points": 1.122
},
"points": 3,
"player_id": "4066457",
"player": "Austin Reaves",
"player2_id": "1966",
"home_score": 3,
"away_score": 0,
"home_win_prob": 0.593
},
{
"game_id": "401585601",
"seq": 2,
"period": 1,
"clock_seconds": 684,
"team": "GS",
"type": "Driving Hook Shot",
"text": "Andrew Wiggins makes 10-foot two point shot (Draymond Green assists)",
"shot": {
"made": true,
"points_attempted": 2,
"x": 19,
"y": 9,
"distance_ft": 10.8,
"zone": "paint",
"expected_points": 0.78
},
"points": 2,
"player_id": "3059319",
"player": "Andrew Wiggins",
"player2_id": "6589",
"home_score": 3,
"away_score": 2,
"home_win_prob": 0.573
},
{
"game_id": "401585601",
"seq": 3,
"period": 1,
"clock_seconds": 660,
"team": "LAL",
"type": "Jump Shot",
"text": "Rui Hachimura misses 22-foot three point jumper",
"shot": {
"made": false,
"points_attempted": 3,
"x": 48,
"y": 1,
"distance_ft": 23,
"zone": "corner_3",
"expected_points": 1.164
},
"points": 0,
"player_id": "4066648",
"player": "Rui Hachimura",
"player2_id": null,
"home_score": 3,
"away_score": 2,
"home_win_prob": 0.551
}
],
"count": 3,
"next_offset": 3
}Response fields
plays[]array- List of objects
plays[].game_idstringplays[].seqnumberplays[].periodnumberplays[].clock_secondsnumberplays[].teamstringplays[].typestringplays[].textstringplays[].shotobjectplays[].shot.madebooleanplays[].shot.points_attemptednumberplays[].shot.xnumberplays[].shot.ynumberplays[].shot.distance_ftnumberplays[].shot.zonestringplays[].shot.expected_pointsnumberplays[].pointsnumberplays[].player_idstringplays[].playerstringplays[].player2_idstringplays[].home_scorenumberplays[].away_scorenumberplays[].home_win_probnumbercountnumbernext_offsetnumber
Related endpoints
get_game5 cr
Takes the game_id this one returns.
One game: both box scores, every player's line, each book's line, win probability
get_player5 cr
Takes the player_id this one returns.
Profile, per-season averages and shooting splits, last 10 games
get_player_games5 cr
Takes the player_id this one returns.
A player's full game log
get_line_movement10 cr
Takes the game_id this one returns.
Daily snapshots of each sportsbook's line before tip-off
Try it
500 credits free on signup: 50 calls to get_plays, and no card.