# GET /v2/races/calendar

Group: Races & series

A whole month of a race sport in one call: each UTC day that has at least one session, with the ids of the races running that day. Built for month views in motorsport and cycling. Available since 2026-11-20.

Plans: Every plan, Free included.

Note: Days without a session are left out, and meta.count is the number of days returned. A race weekend appears under every day on which one of its sessions starts. Duplicate race entries the source files under a second series that never runs are left out (since 2026-11-25). The ids resolve on /v2/races/{id}; for one day with the races themselves, use /v2/races?date=.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `sport` | query | yes | motorsport \| cycling |
| `month` | query | yes | UTC month in YYYY-MM format |

## Response

- `data`: `RaceCalendarDay[]`
- `meta`: sport, month, count (days)
- Objects: RaceCalendarDay (https://datasportsapi.com/markdown/reference.md#racecalendarday)

## Errors

- 400 bad_request — the month is missing or not YYYY-MM, or the sport is not one of the race sports
- 403 history_not_in_plan — your plan’s history does not reach back to that month

Plus the errors every /v2 call shares (https://datasportsapi.com/markdown/docs/errors.md).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/races/calendar?month=…&sport=…"
```

TypeScript:

```ts
const { data, meta } = await client.races.calendar({ month, sport });
```

Python:

```python
res = client.races.calendar(month=month, sport=sport)
```

Go:

```go
res, err := client.Races.Calendar(ctx, &datasportsapi.RacesCalendarParams{Month: month, Sport: sport})
```

CLI:

```bash
$ dsa races calendar --month <month> --sport <sport>
```

## Example response

```json
{ "data": [ { "date": "2026-11-20", "raceIds": [697366, 703278] }, { "date": "2026-11-21", "raceIds": [703278, 697366] }, … ],
  "meta": { "sport": "motorsport", "month": "2026-11", "count": 14 } }
```

---

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