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

Group: Leagues

Returns all fixtures in a single round of a season.

Plans: Every plan, Free included.

## 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 |
| `round` | query | yes | round number taken from /rounds, between 1 and 9999 |
| `slug` | query | no | slug of the round as given by /rounds, if the round has one |
| `prefix` | query | no | prefix of the round as given by /rounds; applied only in combination with slug |

## Response

- `data`: `Fixture[]`
- `meta`: season, round, slug, prefix, count
- Objects: Fixture (https://datasportsapi.com/markdown/reference.md#fixture)

## Errors

- 400 bad_request — season or round is absent, or slug or prefix is malformed
- 404 not_found — the season id does not belong to this league; the error message names the offending parameter, and /v2/leagues/{id}/seasons lists the valid ones

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}/fixtures?season=…&round=…"
```

TypeScript:

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

Python:

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

Go:

```go
res, err := client.Leagues.Fixtures(ctx, id, &datasportsapi.LeaguesFixturesParams{Season: season, Round: round})
```

CLI:

```bash
$ dsa leagues fixtures <id> --season <season> --round <round>
```

## Example response

```json
{ "data": [ { "id": 201324, "round": { "number": 7, "name": null, "slug": null, "prefix": null }, … }, … ],
  "meta": { "season": 200386, "round": 7, "slug": null, "prefix": null, "count": 10 } }
```

---

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