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

Group: Leagues

Returns each UTC day of a league season on which fixtures are scheduled, together with the number of fixtures — handy for drawing a season calendar or linking straight to a matchday via /v2/fixtures?date=&league=. Available since 2026-11-04.

Plans: Every plan, Free included.

Note: Days are sorted oldest first. The list is rebuilt every day, so a rescheduled fixture moves to its new date within a day.

## 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`: `SeasonDay[]`
- `meta`: season, count (number of days), fixtureCount (fixtures across all those days)
- Objects: SeasonDay (https://datasportsapi.com/markdown/reference.md#seasonday)

## Errors

- 403 history_not_in_plan — your plan’s history window begins after this season ended
- 404 not_found — the season id does not belong to this 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}/calendar?season=…"
```

TypeScript:

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

Python:

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

Go:

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

CLI:

```bash
$ dsa leagues calendar <id> --season <season>
```

## Example response

```json
{ "data": [ { "date": "2026-08-21", "fixtureCount": 1 }, { "date": "2026-08-22", "fixtureCount": 5 }, … ], "meta": { "season": 200386, "count": 112, "fixtureCount": 380 } }
```

---

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