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

Group: Fixtures

A single football player’s activity map for the fixture — each recorded position sample, expressed as percentages of the pitch.

Plans: Requires Pro, Business or Enterprise; a Free or Starter key receives 403 endpoint_not_in_plan.

Note: Football only, in covered leagues. x measures distance along the pitch in the direction the player attacks (100 = the goal being attacked) and y measures across it. points is empty when no heatmap exists, and other sports likewise get 200 with empty points; an unknown fixture or player id gets 404.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | fixture id issued by DataSportsAPI, a positive integer |
| `playerId` | path | yes | player id issued by DataSportsAPI, for example taken from /lineups |

## Response

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

## Errors

Plus the common errors (https://datasportsapi.com/markdown/docs.md#errors).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/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
$ dsa 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.datasportsapi.com. Authenticate each /v2 call with the header `Authorization: Bearer <key>` (secret keys begin with `sk_live_`).
HTML: https://datasportsapi.com/docs/fixtures/heatmap/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
