# GET /v2/teams/{id}/position-history

Group: Teams

The team’s league position at the end of each week of one season, week 1 first, with the fixtures it played that week.

Note: League competitions with a table only (no cups). A week without a match keeps the previous position.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `league` | query | yes | a league id (e.g. from /v2/teams/{id}/leagues) |
| `season` | query | yes | a season id from /v2/leagues/{id}/seasons |

## Response

- `data`: `PositionHistoryPoint[]`
- `meta`: league, season, count
- Objects: PositionHistoryPoint (https://sportsapi.app/markdown/en/reference.md#positionhistorypoint)

## Errors

- 400 bad_request — missing or invalid league or season
- 403 history_not_in_plan — the season ended before your plan’s history
- 404 no_data — the source keeps no position history for that team, league and season (404 not_found: an id we never issued)
- 404 not_found — season is not one of this league’s seasons (the message names the parameter; list them with /v2/leagues/{id}/seasons)

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/teams/{id}/position-history?league=…&season=…"
```

TypeScript:

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

Python:

```python
res = client.teams.position_history(id, league=league, season=season)
```

Go:

```go
res, err := client.Teams.PositionHistory(ctx, id, &sportsapi.TeamsPositionHistoryParams{League: league, Season: season})
```

CLI:

```bash
$ sportsapi teams position-history <id> --league <league> --season <season>
```

## Example response

```json
{ "data": [ { "week": 1, "from": "2026-08-21", "to": "2026-08-27", "position": 2, "fixtureIds": [201101] },
    { "week": 2, "from": "2026-08-28", "to": "2026-09-03", "position": 1, "fixtureIds": [201188] }, … ],
  "meta": { "league": 195828, "season": 200386, "count": 9 } }
```

---

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