DiscoveryEndpoint 90 of 116
Popular leagues
https://api.datasportsapi.com/
- Plan
- All plans
- Auth
Bearer dsa_live_…- Parameters
- 1 required · 1 optional
- Returns
LeagueRef[]
Our data source’s selection of a sport’s most popular leagues for a visitor from a given country, kept in the source’s order: domestic leagues and the major international competitions come first. Designed to feed a “top leagues” menu.
Worth knowing
No list exists for race sports or MMA, so they get an empty array. Elsewhere, LeagueRef.priority (where set) is the field to sort other league lists by.
01Parameters
sportqueryRequiredsport slug, as listed by /v2/sports
countryqueryOptionaltwo-letter country code of the visitor (TR, GB, US, …; case-insensitive). If omitted, the source’s international list is returned
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/leagues/popular?sport=…"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataLeagueRef[]meta- sport, country (null when the request had no country), count
{ "data": [ { "id": 195850, "name": "UEFA Super Cup", "category": "Europe", "country": null, … },
{ "id": 195833, "name": "Trendyol Süper Lig", "category": "Turkey",
"country": { "code": "TR", "name": "Turkey", "flag": "https://cdn.datasportsapi.com/v2/countries/TR/flag" }, … },
{ "id": 195829, "name": "FIFA World Cup", … }, { "id": 195900, "name": "UEFA Champions League", … }, … ],
"meta": { "sport": "football", "country": "TR", "count": 22 } }04Errors
- 400
bad_requestsport is missing or not recognised, or country is not a two-letter code
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code