Building with AI? Give your coding tool the whole reference in one file: https://soccer-data.co/llms.txt
SOCCER DATA Docs
Sign in Get API key
// Competitions

Search competitions

Returns leagues, cups and tournaments, 20 per page by default. Use it to look up a competition_id by name or country, then pass that id to the matches, teams and standings endpoints.

GET https://api.soccer-data.co/v1/competitions
  • country_code=GB brings back English, Scottish, Welsh and Northern Irish competitions together. Use GB-ENG, GB-SCT, GB-WLS or GB-NIR for just one of them.
  • Asking for a page past the last one returns 400 PAGE_OUT_OF_RANGE.
Query parameters
search string

Part of the competition name, case-insensitive. With sort=relevance the closest match comes first.

country string

Country name, case-insensitive, for example England or Spain.

country_code string

A code as it appears in country_code or subdivision_code, such as GB, GB-ENG, DE or ES. GB covers all four UK nations.

type string

Only competitions of this format.

leaguecuptournament
sort string default relevance

relevance puts the best matches for search first; name orders results A to Z. Without search, both give A to Z.

relevancename
page integer default 1

Which page to return, starting at 1. meta.total_pages tells you how many there are.

per_page integer default 20

How many results per page, from 1 to 100.

Response fields
data[].idstring

The competition's id. Pass it as competition_id to other endpoints.

data[].namestring

The competition's name.

data[].countrystring

Country name. Null for international and continental competitions; see confederation for those.

data[].country_codestring

Two-letter ISO 3166 country code, such as GB. Null for international competitions. UK nations are told apart in subdivision_code.

data[].subdivision_codestring

ISO 3166-2 code for competitions in England, Scotland, Wales or Northern Ireland: GB-ENG, GB-SCT, GB-WLS or GB-NIR. Null everywhere else.

data[].confederationstring

The governing body of an international competition: UEFA, CONMEBOL, FIFA, CAF, AFC, CONCACAF or OFC. Null for domestic competitions.

data[].typestring

The format: league, cup or tournament.

data[].has_team_statsboolean

True when team statistics exist for this competition.

data[].has_player_statsboolean

True when player statistics exist for this competition.

data[].odds_availableboolean

True when bookmaker odds exist for its matches, either pre-match prices or stored closing prices.

data[].live_odds_availableboolean

True when at least one of its matches has in-play odds right now.

data[].xg_availableboolean

True when expected goals (xG) data exists, with at least one non-zero value.

meta.pageinteger

The page you're on.

meta.per_pageinteger

Results per page.

meta.totalinteger

Matching competitions across all pages.

meta.total_pagesinteger

How many pages there are.

curl "https://api.soccer-data.co/v1/competitions?search=Premier+League" \
  -H "X-Api-Key: $SOCCER_DATA_KEY"
200 · Example response
{
    "data": [
        {
            "id": "competition_705uv6jm8myn",
            "name": "Premier League",
            "country": "England",
            "country_code": "GB",
            "subdivision_code": "GB-ENG",
            "confederation": null,
            "type": "league",
            "has_team_stats": true,
            "has_player_stats": true,
            "odds_available": true,
            "live_odds_available": false,
            "xg_available": true
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 20,
        "total": 1,
        "total_pages": 1
    }
}
Get a free key to try it