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

Group: Fixtures

One side’s activity map for a football fixture: the position samples of its outfield players in one list and its goalkeeper’s in another, laid out on the same frame as a single player’s heatmap. Available since 2026-11-20.

Plans: Every plan, Free included.

Note: Football only, in covered leagues. Coordinates are percentages of the pitch with the chosen side attacking from left to right, the same frame /v2/fixtures/{id}/heatmap/{playerId} uses, so the two can share one drawing: render the points as a density. When our data source holds no heatmap for the match both lists come back empty with 200. meta.count is the number of outfield samples.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | fixture id issued by DataSportsAPI, a positive integer |
| `team` | query | yes | home \| away: the side whose map you want |

## Response

- `data`: `TeamHeatmap`
- `meta`: team, count (outfield samples)
- Objects: TeamHeatmap (https://datasportsapi.com/markdown/reference.md#teamheatmap)

## Errors

- 400 bad_request — team is missing, or is neither home nor away
- 403 history_not_in_plan — the fixture predates the history your plan covers
- 404 not_found — no fixture carries this id

Plus the errors every /v2 call shares (https://datasportsapi.com/markdown/docs/errors.md).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/fixtures/{id}/heatmap?team=…"
```

TypeScript:

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

Python:

```python
res = client.fixtures.team_heatmap(id, team=team)
```

Go:

```go
res, err := client.Fixtures.TeamHeatmap(ctx, id, &datasportsapi.FixturesTeamHeatmapParams{Team: team})
```

CLI:

```bash
$ dsa fixtures team-heatmap <id> --team <team>
```

## Example response

```json
{ "data": { "points": [ { "x": 58.5, "y": 92.4 }, { "x": 40.1, "y": 82.6 }, … ],
            "goalkeeperPoints": [ { "x": 4.2, "y": 50.1 }, … ] },
  "meta": { "team": "home", "count": 882 } }
```

---

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/team-heatmap/ · Group: https://datasportsapi.com/markdown/docs/fixtures.md · All docs: https://datasportsapi.com/markdown/docs.md · Data model: https://datasportsapi.com/markdown/reference.md
