API — Football Universe Copilot

The live Azure API behind the demo, plus the static files that carry the same pipeline output. ← Back to the live demo · Tech stack

Base URL & ground rules

https://fuc-api-pv4pnqx2o2t4y.azurewebsites.net/api

Anonymous — no key, no sign-up. Every response is JSON. Synthetic match data only: the featured match and the seasons are generated for this project and no real fixtures or results are served. The universe graph is different — a hand-authored seed of well-known historical connections (real names, public career facts); it is not synthetic and is never presented as match data. The API runs on Azure Functions (Consumption, westus2) with narration by Microsoft Phi-4-mini-instruct on Microsoft Foundry; a first call after idle can take ~60–90 seconds (serverless cold start) — subsequent calls are seconds. CORS allows the demo origin https://mike-demo.github.io. Spend guardrails on the model-backed endpoint: /match/intelligence responses are cached per focus player for 10 minutes and throttled to 20 requests/minute per client IP (in-memory, per-instance — a bound, not a guarantee). The same pipeline runs locally with no cloud at all: src/api/app.py (FastAPI) exposes the same five routes, /season included.

Endpoints

EndpointWhat it returns
GET /healthLiveness check. {"ok": true, "synthetic_only": true}
GET /match/intelligence
?focus_player=Erling Haaland (default)
The full pipeline output for the featured synthetic match (Arsenal v Manchester City): stats (incl. momentum with per-team splits, threshold alerts, event-share counts), graph_context (verified connections + leaderboard), narrative (recap + why-it-matters, always labelled with narration_source — microsoft-foundry:Phi-4-mini-instruct when the model answers, the deterministic template otherwise), personalized (five personas: casual_fan, analyst, player_focus, club_focus, es) and overlay (the timed broadcast feed, schema football-universe-overlay/v1).
GET /graph/path
?a=Nicolas Anelka&b=Erling Haaland
Verified shortest path through the universe graph: {from, to, degrees, path, edges}. The documented example returns 2 degrees via Manchester City. Unknown names return degrees: null with an empty path — paths are never invented.
GET /graph/leaderboardTop-20 Kevin Bacon Scores: Brandes betweenness centrality over the 45-node seed graph, scaled to /10, with each node's connection count.
GET /season
?league=premier_league (default) or wsl
One simulated season: {competition, standings, narratives, synthetic: true} — 380 Premier League or 132 WSL fixtures behind the table, from the seeded Poisson ratings model documented on the tech page.

Try it: /api/health · /api/graph/path?a=Nicolas Anelka&b=Erling Haaland (fast, no model call). The intelligence endpoint is the one with the cold start.

Static equivalents (no server, no cold start)

The demo itself runs on these files, baked from the same pipeline:

FileContents
data.jsonFeatured match: full event stream with pitch coordinates and key-moment snapshots, stats, graph + graph context, narrative, personas, timed overlay, and the FIFA FCD alignment block.
season.jsonBoth simulated seasons: every fixture with model xG, standings, form, points progressions, narratives.
fds/featured-match.xml · season · WSLFIFA Connect Data v3.3 alignment exports, validated against the standard's XSDs; synthetic SYN-prefixed IDs. See the tech page's data-standard section for the honest scope.
llms.txt · carbon.txtMachine-readable site summary, and the hosting carbon disclosure (no green claim).

Errors: unknown routes return the Functions platform 404; there is no auth and no write API — nothing you send is stored. Costs and teardown are documented in the repo's infra/COSTS.md (the whole deployment lives in one resource group under a $10 budget alert).