Skip to content
API v2 docs

Players

Season shot chart

GET

/v2/players/{id}/shot-chart

All plans

Markdown copyOpen in the playground →

Basketball: every field-goal attempt a player took in one league season, grouped by spot with the number made and missed at each — the season shot chart (ice hockey too, where our data source keeps one).

x and y give the distance from the basket in tenths of a foot, matching the frame of the match shot map (/v2/fixtures/{id}/shotmap). For the league’s shooting percentage per zone, see /v2/leagues/{id}/shooting-zones.

Parameters

id

pathrequired

DataSportsAPI player id, a positive integer

league

queryrequired

league id, as listed by /v2/players/{id}/seasons

season

queryrequired

season id, as listed by /v2/leagues/{id}/seasons

type

query

overall | home | away | regularSeason | playoffs | mainDraw (a tennis tournament’s main draw). When omitted, the season’s native type applies: overall if the season has one (football), otherwise regularSeason (NBA, NHL, …); meta.type reports the one applied

Response

meta
league, season, type (as applied), count (number of spots)
errors
403 history_not_in_plan — the season finished before your plan’s history window begins404 no_data — no shot chart exists for this player, league and season

The errors every /v2 call shares (key, plan, quota, rate) are listed under error codes.

curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/players/{id}/shot-chart?league=…&season=…"
Example
{ "data": { "spots": [ { "x": -243, "y": 36, "made": 1, "missed": 0 }, { "x": -240, "y": 32, "made": 0, "missed": 1 }, … ] },
  "meta": { "league": 132, "season": 100772, "type": "regularSeason", "count": 313 } }