1. Extracting Starting XI Formations & Shot Quality xG from /v1/matches/detail
Call GET /v1/matches/detail?match_id=401878758 to retrieve both sides' full tactical boxscore, starting lineups, and key event timeline.
Hydrate Full Match Telemetry, Lineups & Key Events
Cost: 10 Credits per complete match dossier ($0.0004 on Business).
curl -sS "https://api.footballapi.dev/v1/matches/detail?match_id=401878758" \
-H "x-api-key: fb_live_your_api_key"import requests
d = requests.get(
"https://api.footballapi.dev/v1/matches/detail",
params={"match_id": "401878758"},
headers={"x-api-key": "fb_live_your_api_key"},
).json()["data"]
print(d["lineups"]["home"]["formation"], "xG:", d["telemetry"]["home"]["xg"])const res = await fetch("https://api.footballapi.dev/v1/matches/detail?match_id=401878758", {
headers: { "x-api-key": process.env.FOOTBALL_API_KEY! },
});
const { data } = await res.json();
console.log(data.telemetry, data.lineups);{
"code": 0,
"status": "ok",
"data": {
"match_id": "401878758",
"telemetry": {
"home": { "possession_pct": 39.2, "shots": 16, "shots_on_target": 4, "corners": 6, "xg": 1.96 },
"away": { "possession_pct": 60.8, "shots": 11, "shots_on_target": 3, "corners": 5, "xg": 1.43 },
"xg_model": "shot_telemetry_v1"
},
"lineups": {
"home": { "team_name": "Leeds United", "formation": "3-4-2-1" },
"away": { "team_name": "Tottenham Hotspur", "formation": "4-2-3-1" }
}
}
}Interactive Football Analytics Underwriting Terminal · GET /v1/matches/detail
Verify real-time latency, parcel credit math & JSON schema
Frequently Asked Questions
- How is Expected Goals (xG) calculated in FootballAPI?
- Live matches enriched by our in-play telemetry rail surface direct xG and dangerous attack counts; when direct xG is unavailable, shot_telemetry_v1 computes transparent xG from shots on target, off-target attempts, and corner pressure.