Skip to content

Livematches in play

Demo: Matchboard, opens in a new tab
Docs v2

Discovery

Popular leagues

GET

/v2/leagues/popular

All plans

View as MarkdownTry in Playground →

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.

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.

Parameters

sport

queryrequired

sport slug, as listed by /v2/sports

country

query

two-letter country code of the visitor (TR, GB, US, …; case-insensitive). If omitted, the source’s international list is returned

Response

data
LeagueRef[]
meta
sport, country (null when the request had no country), count
errors
400 bad_request — sport is missing or not recognised, or country is not a two-letter code

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

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