Match statistics and lineups of a tournament match
const url = 'https://foxleague.ai/api/public/tournament-match/example/stats';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://foxleague.ai/api/public/tournament-match/example/statsThe statistics of a tournament or challenge match, asked by its public id (matches[].id of GET /api/tournaments/{id}), in the shape of GET /api/matches/{id}/stats. From the kickoff until its broadcast ends it answers the lineup-only form gated: true with player_names, for the live viewer; once the broadcast ends, the full analysis.
Who: anyone. A session header that is present but invalid answers 401.
Refusals:
Match not found: no such public id; a match before its kickoff; a next-round match while a match that sends one of its teams there is still on air.No stats available for this match: the result is public but no analysis exists for the match.
Authorizations
Section titled “Authorizations ”- None
- session
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The match’s public id (matches[].id of the tournament): 22 URL-safe characters.
Responses
Section titled “ Responses ”Success or a refusal: read success (the refusals are in the description).
object
A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.
The answer. Present when success is true.
object
Name of the analysis.
The away side’s formation, when known.
The away squad, when known, in the same form as home_lineup.
true on the lineup-only form; absent on the full analysis.
Every goal with its time, side and scorer.
The home side’s formation, when known.
The home squad, when known: formation, lineup and substitutes (NFT nonces) and players with each card’s attributes, level, condition and portrait.
Teams (left_team, right_team), final_score, penalties (null without a shootout), decided_by and the match’s length.
object
Map of home-<n> or away-<n> (the player’s number on the pitch, 1 to 11) to {name, shirt_number, country} of the card.
object
Map of squad slot (0 to 17 home, 18 to 35 away) to {name, shirt_number, country} of the card, for the viewer.
object
Technical data of the recording; not needed to show the match.
object
Per-player statistics for left and right.
object
Ball possession in percent: overall, first_half and second_half, each with left and right.
object
Technical data of the recording; not needed to show the match.
object
Team totals for left and right: shots, passes, tackles, saves, fouls, corners, cards and more.
object
The match’s events in order.
Version of the analysis format.
Why the request was refused, in plain words. Present when success is false.
true when the request did what it asked. false is a refusal: read error.
Example
{ "data": { "gated": true, "player_names": { "away-10": { "country": 19, "name": "Teo Brandt", "shirt_number": 10 }, "home-9": { "country": 7, "name": "Marco Vela", "shirt_number": 9 } } }, "success": true}No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.
Example
Session expired or invalidA server read failed. The body is empty.