# GET /v2/leagues/{id}/player-of-the-season

Group: Leagues

Player of the season for a completed league season as chosen by our data source — the highest average match rating among players with enough appearances — together with their club and appearance count.

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

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | league id issued by DataSportsAPI, a positive integer |
| `season` | query | yes | season id, as listed by /v2/leagues/{id}/seasons |

## Response

- `data`: `PlayerOfTheSeason`
- `meta`: season
- Objects: PlayerOfTheSeason (https://datasportsapi.com/markdown/reference.md#playeroftheseason)

## Errors

- 403 history_not_in_plan — your plan’s history window begins after this season ended
- 404 no_data — no award exists yet, either because the season is not over (the contest is at /player-of-the-season/race) or because the league does not hand one out; 404 not_found — the season id belongs to a different league

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/leagues/{id}/player-of-the-season?season=…"
```

TypeScript:

```ts
const { data, meta } = await client.leagues.playerOfTheSeason(id, { season });
```

Python:

```python
res = client.leagues.player_of_the_season(id, season=season)
```

Go:

```go
res, err := client.Leagues.PlayerOfTheSeason(ctx, id, &datasportsapi.LeaguesPlayerOfTheSeasonParams{Season: season})
```

CLI:

```bash
$ dsa leagues player-of-the-season <id> --season <season>
```

## Example response

```json
{ "data": { "player": { "id": 4022, "name": "Bruno Fernandes", … }, "team": { "id": 35, "name": "Manchester United", … }, "rating": 7.61, "appearances": 35 },
  "meta": { "season": 180212 } }
```

---

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/leagues/player-of-the-season/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
