Competitions
List groups in a season
Returns the groups (A to L) of a tournament season with a group stage, such as the FIFA World Cup, EURO, AFCON or the pre-2024 UEFA Champions League. Returns an empty list for competitions without groups, such as the Premier League. Pass a group_label to /football/matches?group= or to the standings group filter. Returns 400 if season_id belongs to a different competition.
Example: GET /football/competitions/comp_6107/seasons/sn_326766/groups (World Cup 2022, groups A to H)
GET
/
football
/
competitions
/
{competition_id}
/
seasons
/
{season_id}
/
groups
List groups in a season
curl --request GET \
--url https://api.thestatsapi.com/api/football/competitions/{competition_id}/seasons/{season_id}/groups \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/competitions/{competition_id}/seasons/{season_id}/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/football/competitions/{competition_id}/seasons/{season_id}/groups"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"group_label": "A",
"name": "Group A"
}
]
}Only useful for tournaments with a group stage. See Standings.
Authorizations
Your API key, sent as Authorization: Bearer YOUR_API_KEY. Get one at https://www.thestatsapi.com/api-keys
Path Parameters
⌘I
List groups in a season
curl --request GET \
--url https://api.thestatsapi.com/api/football/competitions/{competition_id}/seasons/{season_id}/groups \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/competitions/{competition_id}/seasons/{season_id}/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/football/competitions/{competition_id}/seasons/{season_id}/groups"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"group_label": "A",
"name": "Group A"
}
]
}