DiscoveryEndpoint 88 of 116
Categories
https://api.datasportsapi.com/
- Plan
- All plans
- Auth
Bearer dsa_live_…- Parameters
- 1 required · 0 optional
- Returns
Category[]
Returns the categories of a sport — the buckets our data source sorts leagues into: countries, regions (Europe, International), tours (ATP) and esports titles.
Worth knowing
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.
01Parameters
sportqueryRequiredsport slug, as listed by /v2/sports
02Request
The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.
curl -H "Authorization: Bearer dsa_live_…" \
"https://api.datasportsapi.com/v2/categories?sport=…"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataCategory[]meta- sport, kind (fixtures | races — the same value /v2/sports gives), count
{ "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 } }04Errors
- 400
bad_requestsport is absent or not recognised
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code