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

Group: Fixtures

Where one side was active during the match: its outfield players’ samples and its goalkeeper’s (football, covered leagues), in the frame of a player heatmap.

Note: Empty lists (200) when the source has no heatmap for the match.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `team` | query | yes | home or away |

## Response

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

## Errors

- 400 bad_request — team missing or not home / away
- 403 history_not_in_plan — a match before your plan’s history
- 404 not_found — a fixture id we never issued

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/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, &sportsapi.FixturesTeamHeatmapParams{Team: team})
```

CLI:

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