# GET /v2/fixtures/{id}/heatmap/{playerId}

Group: Fixtures

Where one player was active during the fixture: every position sample, in pitch percentages.

Plans: Pro + Business only (other plans get 403 endpoint_not_in_plan).

Note: Football, covered leagues. x runs along the pitch in the player’s direction of attack (100 = the goal attacked), y across it. Empty points when there is no heatmap (and 200 with empty points in other sports); 404 for a fixture or player id that does not exist.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `playerId` | path | yes | our player id (e.g. from /lineups) |

## Response

- `data`: `Heatmap`
- `meta`: playerId, count
- Objects: Heatmap (https://sportsapi.app/markdown/en/reference.md#heatmap)

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.sportsapi.app/v2/fixtures/{id}/heatmap/{playerId}"
```

TypeScript:

```ts
const { data, meta } = await client.fixtures.heatmap(id, playerId);
```

Python:

```python
res = client.fixtures.heatmap(id, player_id)
```

Go:

```go
res, err := client.Fixtures.Heatmap(ctx, id, playerId)
```

CLI:

```bash
$ sportsapi fixtures heatmap <id> <playerId>
```

## Example response

```json
{ "data": { "points": [ { "x": 61.2, "y": 23.4 }, { "x": 58, "y": 31.5 }, … ] },
  "meta": { "playerId": 3759, "count": 214 } }
```

---

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/fixtures/heatmap · All docs: https://sportsapi.app/markdown/en/docs.md
