Coverage
List coverage by competition
Returns one row per competition: how many seasons are loaded, which data types it has (fixtures, team stats, xG, odds, lineups, player stats, standings), the latest season’s status and the number of finished matches. Use it to check what’s available before you build. Add data_type to list only competitions that have that data. Counts only include finished matches, and responses are cached for several hours.
Example: GET /coverage/leagues?data_type=xg&search=Premier
GET
/
coverage
/
leagues
List coverage by competition
curl --request GET \
--url https://api.thestatsapi.com/api/coverage/leagues \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/coverage/leagues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/coverage/leagues"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "comp_3039",
"name": "Premier League",
"country": "England",
"country_code": "GB",
"seasons": {
"count": 13,
"first": {
"id": "sn_612289",
"year": "14/15"
},
"last": {
"id": "sn_8406098",
"year": "26/27"
}
},
"data_types": {
"fixtures": {
"available": true
},
"team_stats": {
"available": true
},
"xg": {
"available": true
},
"odds": {
"available": true
},
"opening_odds": {
"available": true
},
"closing_odds": {
"available": true
},
"lineups": {
"available": true
},
"player_stats": {
"available": true
},
"standings": {
"available": true
}
},
"latest_season": {
"id": "sn_8406098",
"year": "26/27",
"status": "complete",
"finished_events": 50,
"total_events": 100
},
"total_finished_events": 4610
}
],
"meta": {
"page": 1,
"per_page": 20,
"total": 100,
"total_pages": 5
}
}How to check coverage before you build: Coverage.
Authorizations
Your API key, sent as Authorization: Bearer YOUR_API_KEY. Get one at https://www.thestatsapi.com/api-keys
Query Parameters
⌘I
List coverage by competition
curl --request GET \
--url https://api.thestatsapi.com/api/coverage/leagues \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/coverage/leagues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/coverage/leagues"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "comp_3039",
"name": "Premier League",
"country": "England",
"country_code": "GB",
"seasons": {
"count": 13,
"first": {
"id": "sn_612289",
"year": "14/15"
},
"last": {
"id": "sn_8406098",
"year": "26/27"
}
},
"data_types": {
"fixtures": {
"available": true
},
"team_stats": {
"available": true
},
"xg": {
"available": true
},
"odds": {
"available": true
},
"opening_odds": {
"available": true
},
"closing_odds": {
"available": true
},
"lineups": {
"available": true
},
"player_stats": {
"available": true
},
"standings": {
"available": true
}
},
"latest_season": {
"id": "sn_8406098",
"year": "26/27",
"status": "complete",
"finished_events": 50,
"total_events": 100
},
"total_finished_events": 4610
}
],
"meta": {
"page": 1,
"per_page": 20,
"total": 100,
"total_pages": 5
}
}