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

Competition details

Returns one competition, including the id of its newest season and how many teams take part. Call it when you know the competition and need its current season.

GET https://api.soccer-data.co/v1/competitions/{competition_id}
  • Read current_season_id from here instead of hard-coding a season, so your app moves on when a new season starts.
  • current_season_id is null for competitions that are no longer played, so handle that case.
Path parameters
competition_idstringrequired

The competition's id, like competition_…. Find one with the ID guide.

Response fields
data.idstring

The competition's id.

data.namestring

The competition's name.

data.countrystring

Country name. Null for international competitions.

data.country_codestring

Two-letter ISO 3166 country code. Null for international competitions.

data.subdivision_codestring

GB-ENG, GB-SCT, GB-WLS or GB-NIR for competitions in the UK nations. Null everywhere else.

data.confederationstring

UEFA, CONMEBOL, FIFA, CAF, AFC, CONCACAF or OFC for international competitions. Null for domestic ones.

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.

data.current_season_idstring

The id of the newest season. Null when the competition is dormant or has been discontinued.

data.total_teamsinteger

How many teams take part.

curl "https://api.soccer-data.co/v1/competitions/competition_705uv6jm8myn" \
  -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,
        "current_season_id": "season_hr1ie7yrsdmt",
        "total_teams": 20
    }
}
Get a free key to try it