Skip to content

Livematches in play

Demo: Matchboard, opens in a new tab
Docs v2

Discovery

Categories

GET

/v2/categories

All plans

View as MarkdownTry in Playground →

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

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

sport

queryrequired

sport slug, as listed by /v2/sports

Response

data
Category[]
meta
sport, kind (fixtures | races — the same value /v2/sports gives), count
errors
400 bad_request — sport is absent or not recognised

Any /v2 call can also come back with one of the common errors.

curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/categories?sport=…"
Example
{ "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 } }