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

Group: Players

A player’s field-goal attempts of one league season by spot, each with its made and missed count — the season shot chart (basketball; ice hockey where the source has one).

Note: x and y are tenths of a foot from the basket, the frame of the match shot chart (/v2/fixtures/{id}/shotmap). The league’s percentages per zone are /v2/leagues/{id}/shooting-zones.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `league` | query | yes | a league id |
| `season` | query | yes | a season id from /v2/leagues/{id}/seasons |
| `type` | query | no | overall \| home \| away \| regularSeason \| playoffs \| mainDraw (a tennis tournament’s main draw, without qualifying). Default: the season’s own — overall where it has one (football), else regularSeason (NBA, NHL, …); a tennis tournament’s leaderboards (top-players, top-teams, top-performances) default to mainDraw where it has one, else overall; meta.type says which was used |

## Response

- `data`: `SeasonShotChart`
- `meta`: league, season, type (the one used), count (spots)
- Objects: SeasonShotChart (https://sportsapi.app/markdown/en/reference.md#seasonshotchart)

## Errors

- 403 history_not_in_plan — a season before your plan’s history
- 404 no_data — no shot chart for this player, league and season

Plus the common errors (https://sportsapi.app/markdown/en/docs.md#errors).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.sportsapi.app/v2/players/{id}/shot-chart?league=…&season=…"
```

TypeScript:

```ts
const { data, meta } = await client.players.shotChart(id, { league, season });
```

Python:

```python
res = client.players.shot_chart(id, league=league, season=season)
```

Go:

```go
res, err := client.Players.ShotChart(ctx, id, &sportsapi.PlayersShotChartParams{League: league, Season: season})
```

CLI:

```bash
$ sportsapi players shot-chart <id> --league <league> --season <season>
```

## Example response

```json
{ "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 } }
```

---

Base URL: https://api.sportsapi.app. Send your API key as `Authorization: Bearer <key>` on every /v2 request; keys are created in the dashboard (https://sportsapi.app/dashboard).
HTML: https://sportsapi.app/docs/players/shot-chart · All docs: https://sportsapi.app/markdown/en/docs.md
