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

Group: Referees & managers

Returns one page of matches the referee has officiated (recent) or has been assigned to (upcoming), split by the same rule as team fixtures.

Plans: Every plan, Free included.

Note: upcoming covers matches yet to start, soonest first; recent covers live, finished and called-off matches, newest first. A referee who exists but has no appointments gets 200 with an empty array.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | DataSportsAPI referee id, a positive integer |
| `type` | query | no | recent \| upcoming; upcoming when omitted |
| `page` | query | no | zero-based page number, a whole number from 0 to 50 (defaults to 0) |

## Response

- `data`: `Fixture[]`
- `meta`: type, page, count, hasNextPage; historyFrom is added if your plan excluded older fixtures
- Objects: Fixture (https://datasportsapi.com/markdown/reference.md#fixture)

## Errors

- 400 bad_request — type is neither recent nor upcoming, or page is not a whole number between 0 and 50

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/referees/{id}/fixtures"
```

TypeScript:

```ts
const { data, meta } = await client.referees.fixtures(id);
for await (const page of client.referees.fixturesPages(id)) { … }
```

Python:

```python
res = client.referees.fixtures(id)
for page in client.referees.fixtures_pages(id): ...
```

Go:

```go
res, err := client.Referees.Fixtures(ctx, id, &datasportsapi.RefereesFixturesParams{})
for page, err := range client.Referees.FixturesPages(ctx, id, &datasportsapi.RefereesFixturesParams{}) { … }
```

CLI:

```bash
$ dsa referees fixtures <id>
$ dsa referees fixtures <id> --all -o csv
```

## Example response

```json
{ "data": [ { "id": 201324, "status": { "type": "finished", … }, "referee": null, … }, … ],
  "meta": { "type": "recent", "page": 0, "count": 30, "hasNextPage": true } }
```

---

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