# GET /v2/players/{id}/seasons

Group: Players

Lists each league and season for which the player has statistics, together with the statistics types offered in each (overall, home, away, regularSeason, playoffs).

Plans: Every plan, Free included.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | DataSportsAPI player id, a positive integer |

## Response

- `data`: `PlayerLeagueSeasons[]`
- `meta`: count
- Objects: PlayerLeagueSeasons (https://datasportsapi.com/markdown/reference.md#playerleagueseasons)

## 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/players/{id}/seasons"
```

TypeScript:

```ts
const { data, meta } = await client.players.seasons(id);
```

Python:

```python
res = client.players.seasons(id)
```

Go:

```go
res, err := client.Players.Seasons(ctx, id)
```

CLI:

```bash
$ dsa players seasons <id>
```

## Example response

```json
{ "data": [ { "league": { "id": 195828, "name": "Premier League", "slug": "premier-league", "sport": "football",
                "category": "England", "country": { "code": "EN", "name": "England" }, "image": "…" },
    "seasons": [ { "id": 200386, "name": "Premier League 26/27", "year": "26/27", "startYear": 2026, "endYear": 2027,
                   "types": ["overall", "home", "away"] }, … ] }, … ],
  "meta": { "count": 19 } }
```

---

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/players/seasons/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
