FOOTBALL CLUBS DATA
ClubsClubs by their ids: their matches, form, figures, runs and travel, every meeting between two of them, and every ground.
CLUB IDS
Every club has one id, cl_ and 9 characters, the same in every match, table and list. Find one with /v1/clubs by competition, season or country, then pass it back.
A CLUB AND ITS MATCHES
/v1/clubs/{club_id} gives the club and its ground; …/matches every match it has played or will play, by season and home or away.
FORM, FIGURES, RUNS AND TRAVEL
…/form gives the last results with a summary; …/stats goals, clean sheets and results home and away; …/streaks current and longest runs; …/travel how far it goes and how it does at each distance.
curl "https://api.footballapi.org/v1/clubs/cl_a7vhnxhhh/form?last=5" \ -H "X-API-Key: your key"
import requests
r = requests.get(
"https://api.footballapi.org/v1/clubs/cl_a7vhnxhhh/form?last=5",
headers={"X-API-Key": "your key"},
)
print(r.json()["data"])const res = await fetch("https://api.footballapi.org/v1/clubs/cl_a7vhnxhhh/form?last=5", {
headers: { "X-API-Key": "your key" },
});
const { data } = await res.json();
console.log(data);$ch = curl_init("https://api.footballapi.org/v1/clubs/cl_a7vhnxhhh/form?last=5");
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);HEAD TO HEAD
/v1/clubs/{club_id}/head-to-head/{opponent_id} gives every meeting between two clubs since 2015/16 with the record of each side.
GROUNDS
/v1/grounds lists every ground with its city, capacity and surface, by country, surface or size, with gd_ ids; /v1/grounds/{ground_id} gives one ground.
On the complimentary key, club calls read the clubs of this season's Premier League.