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

Group: Leagues

Available seasons, newest first. year is the display label; startYear / endYear are numbers (equal for a calendar-year season).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |

## Response

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

## Errors

- 404 no_data — the source lists no seasons for this league

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

TypeScript:

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

Python:

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

Go:

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

CLI:

```bash
$ sportsapi leagues seasons <id>
```

## Example response

```json
{ "data": [ { "id": 200386, "name": "Premier League 26/27", "year": "26/27", "startYear": 2026, "endYear": 2027 }, … ],
  "meta": { "count": 34 } }
```

---

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