# GET /v2/categories

Group: Discovery

Returns the categories of a sport — the buckets our data source sorts leagues into: countries, regions (Europe, International), tours (ATP) and esports titles.

Plans: Every plan, Free included.

Note: country is filled only for categories that represent a country. Use a category id with /v2/leagues?category=; if kind is races (motorsport, cycling), use /v2/series?category= instead, because race sports are organised into series rather than leagues.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `sport` | query | yes | sport slug, as listed by /v2/sports |

## Response

- `data`: `Category[]`
- `meta`: sport, kind (fixtures | races — the same value /v2/sports gives), count
- Objects: Category (https://datasportsapi.com/markdown/reference.md#category)

## Errors

- 400 bad_request — sport is absent or not recognised

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/categories?sport=…"
```

TypeScript:

```ts
const { data, meta } = await client.categories.list({ sport });
```

Python:

```python
res = client.categories.list(sport=sport)
```

Go:

```go
res, err := client.Categories.List(ctx, &datasportsapi.CategoriesListParams{Sport: sport})
```

CLI:

```bash
$ dsa categories list <sport>
```

## Example response

```json
{ "data": [ { "id": 456, "name": "England", "slug": "england", "sport": "football", "country": { "code": "EN", "name": "England" } },
    { "id": 457, "name": "Oceania", "slug": "oceania", "sport": "football", "country": null }, … ],
  "meta": { "sport": "football", "kind": "fixtures", "count": 272 } }
```

---

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