Season shot chart
/
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).
Parameters
idpathrequired
DataSportsAPI player id, a positive integer
leaguequeryrequired
league id, as listed by /v2/players/{id}/seasons
seasonqueryrequired
season id, as listed by /v2/leagues/{id}/seasons
typequery
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
- data
SeasonShotChart- 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 begins404no_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=…"{ "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 } }