Skip to content
datasportsAPI

DiscoveryPopular leagues

Documentation

/

Type to filter the docs by title or path.

DiscoveryEndpoint 90 of 116

Popular leagues

GET

/v2/leagues/popular

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

  • sportqueryRequired

    sport slug, as listed by /v2/sports

  • countryqueryOptional

    two-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.

data
LeagueRef[]
meta
sport, country (null when the request had no country), count
ObjectsLeagueRef
Example response
{ "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

  • 400bad_request

    sport is missing or not recognised, or country is not a two-letter code

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code