Documentation / Guides
FOOTBALL STATISTICS DATA
StatsThe collection in figures: goals, scorelines, home advantage, half-time leads, kickoff times, referees and league positions.
THE COLLECTION IN FIGURES
Seven endpoints under /v1/stats answer the questions people ask of a decade of football: goals a game, how often each scoreline happens, how strong home advantage is, how often a half-time lead holds, how kickoff time matters, how referees differ, and how the gap in the table tracks the result.
curl "https://api.footballapi.org/v1/stats/home-advantage?competition=premier-league&group_by=season" \ -H "X-API-Key: your key"
import requests
r = requests.get(
"https://api.footballapi.org/v1/stats/home-advantage?competition=premier-league&group_by=season",
headers={"X-API-Key": "your key"},
)
print(r.json()["data"])const res = await fetch("https://api.footballapi.org/v1/stats/home-advantage?competition=premier-league&group_by=season", {
headers: { "X-API-Key": "your key" },
});
const { data } = await res.json();
console.log(data);$ch = curl_init("https://api.footballapi.org/v1/stats/home-advantage?competition=premier-league&group_by=season");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-API-Key: your key"],
]);
$data = json_decode(curl_exec($ch), true)["data"];
print_r($data);NARROWING AND GROUPING
Each takes a competition and a season, and most take group_by to split the figures by competition, season, country, or competition and season.
On the complimentary key, stats read this season's Premier League; membership reads the whole collection.