# GET /v2/leagues/popular

Group: Discovery

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.

Plans: Every plan, Free included.

Note: 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

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `sport` | query | yes | sport slug, as listed by /v2/sports |
| `country` | query | no | 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
- Objects: LeagueRef (https://datasportsapi.com/markdown/reference.md#leagueref)

## Errors

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

Plus the common errors (https://datasportsapi.com/markdown/docs.md#errors).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/leagues/popular?sport=…"
```

TypeScript:

```ts
const { data, meta } = await client.leagues.popular({ sport });
```

Python:

```python
res = client.leagues.popular(sport=sport)
```

Go:

```go
res, err := client.Leagues.Popular(ctx, &datasportsapi.LeaguesPopularParams{Sport: sport})
```

CLI:

```bash
$ dsa leagues popular <sport>
```

## Example response

```json
{ "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 } }
```

---

Base URL: https://api.datasportsapi.com. Authenticate each /v2 call with the header `Authorization: Bearer <key>` (secret keys begin with `sk_live_`).
HTML: https://datasportsapi.com/docs/discovery/leagues-popular/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
