{"openapi":"3.1.0","info":{"title":"OpenFoot API","version":"1.0.0-beta","description":"A developer-first football data API combining current German data, Romanian and expanded European league datasets, open archives and derived analytics. Coverage, season metadata and source licenses are explicit; an uptime SLA is not included in this beta.","contact":{"name":"OpenFootAPI"}},"servers":[{"url":"https://openfootapi.com","description":"OpenFootAPI open-data beta"}],"tags":[{"name":"System","description":"API availability and metadata"},{"name":"Competitions","description":"Coverage, source and license information"},{"name":"Matches","description":"Fixtures, results and derived match context"},{"name":"Live","description":"Live SSE event streaming (about a minute behind the pitch) and Webhook push notifications"},{"name":"Search","description":"Human-friendly entity lookup"}],"paths":{"/v1/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Check API health","responses":{"200":{"description":"The API is operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/account/quota":{"get":{"operationId":"getAccountQuota","tags":["Account"],"summary":"Inspect monthly quota without consuming requests","description":"Returns current billing-period usage for the supplied API key. Read-only: never consumes monthly quota.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Current period usage for the key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountQuotaResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimitExceeded"}}}},"/v1/competitions":{"get":{"operationId":"listCompetitions","tags":["Competitions"],"summary":"List supported competitions","security":[{},{"bearerAuth":[]}],"responses":{"200":{"description":"Competition coverage, source and licenses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitionListResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/standings":{"get":{"operationId":"getStandings","tags":["Competitions"],"summary":"Get league standings table","description":"Returns the league table with total, home, and away splits, goal difference, points and recent form.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"competition","in":"query","required":true,"description":"Competition ID, code or name — comp_premier_league_eng, EPL or premier-league all resolve. GET /v1/competitions lists them.","schema":{"type":"string","example":"comp_bundesliga_de"}},{"name":"season","in":"query","required":false,"description":"Season label (e.g. 2024/25 or 2026)","schema":{"type":"string","example":"2024/25"}}],"responses":{"200":{"description":"Computed league standings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandingsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/scorers":{"get":{"operationId":"getScorers","tags":["Competitions"],"summary":"Get league top scorers and leader statistics","description":"Returns the league's confirmed top scorers, goal tallies, assists, player identity, and club information.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"competition","in":"query","required":true,"description":"Competition ID, code or name — comp_premier_league_eng, EPL or premier-league all resolve. GET /v1/competitions lists them.","schema":{"type":"string","example":"comp_premier_league_eng"}},{"name":"season","in":"query","required":false,"description":"Season label (e.g. 2026/27 or 2026)","schema":{"type":"string","example":"2026/27"}}],"responses":{"200":{"description":"Top scorers and league leader statistics","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/teams/{id}/squad":{"get":{"operationId":"getTeamSquad","tags":["Teams"],"summary":"Get team squad roster","description":"Returns the team's official squad roster with player names, shirt numbers, positions, nationalities, age, and season statistics.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Stable team ID or FotMob team ID","schema":{"type":"string","example":"team_arsenal_eng"}}],"responses":{"200":{"description":"Squad roster and player details","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/teams/{id}/h2h":{"get":{"operationId":"getHeadToHead","tags":["Teams"],"summary":"Get head-to-head match history between two teams","description":"Returns historical head-to-head records, win/draw/loss counts, goal metrics, and recent meeting results between two clubs.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Primary team ID","schema":{"type":"string","example":"team_arsenal_eng"}},{"name":"opponent","in":"query","required":true,"description":"Opponent team ID","schema":{"type":"string","example":"team_chelsea_eng"}}],"responses":{"200":{"description":"Head-to-head records and summary metrics","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/matches":{"get":{"operationId":"listMatches","tags":["Matches"],"summary":"List fixtures and results","description":"The public preview returns at most five matches. Developer access supports cursor pagination with up to 100 matches per page. A query with no competition, team, date, season or round covers the full 120-competition catalogue but only the week around today (today plus or minus three days, UTC) — the applied range is reported in meta.scope.window. Naming any of those filters replaces the window with what you asked for.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"date","in":"query","description":"Kickoff date in YYYY-MM-DD","schema":{"type":"string","format":"date"}},{"name":"competition","in":"query","description":"Competition ID, code or name — comp_premier_league_eng, EPL or premier-league all resolve. GET /v1/competitions lists them.","schema":{"type":"string"}},{"name":"team","in":"query","description":"Stable team ID","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by match status: 'live' (in-play), 'finished' (match ended), 'scheduled' (upcoming), 'postponed' (rescheduled), 'cancelled' (called off), or 'unknown' (kickoff time passed but live updates or final score unconfirmed upstream)","schema":{"type":"string","enum":["scheduled","live","finished","postponed","cancelled","unknown"]}},{"name":"season","in":"query","schema":{"type":"string","example":"2026/27"}},{"name":"round","in":"query","description":"Numeric matchday for providers that expose rounds","schema":{"type":"string","pattern":"^[0-9]{1,2}$","example":"34"}},{"name":"limit","in":"query","description":"Page size. Public requests remain capped at five items.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","description":"Opaque cursor from meta.pagination.next_cursor. Requires Developer access.","schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"Matching fixtures and results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"502":{"$ref":"#/components/responses/SourceUnavailable"}}}},"/v1/matches/{id}/context":{"get":{"operationId":"getMatchContext","tags":["Matches"],"summary":"Get derived match context","description":"Returns both teams' form, Elo-style rating, rest, table position, venue record, head-to-head and field freshness. The public preview ID is match_olg_83156; other IDs require a Developer API key.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Stable match ID","schema":{"type":"string","example":"match_olg_83156"}}],"responses":{"200":{"description":"Normalized match context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchContextResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ApiKeyRequired"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"502":{"$ref":"#/components/responses/SourceUnavailable"}}}},"/v1/search":{"get":{"operationId":"searchEntities","tags":["Search"],"summary":"Search teams and competitions","description":"The public preview returns at most five search results.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2},"example":"bayern"}],"responses":{"200":{"description":"Matching entities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/matches/{id}/events":{"get":{"operationId":"getMatchEvents","tags":["Matches"],"summary":"Get live key events and commentary timeline","description":"Goals, cards and substitutions for one match. Each event names the player it happened to in `player` — the scorer, the booked player, or the one coming on. `assist` is the assisting player on a goal and is null elsewhere; `playerOut` is the player leaving the pitch and is set on substitutions only. Stoppage time is reported in `detail` (\"45+3\") rather than added to `minute`, which always holds the base minute of the period. Requires Developer ($14/mo) plan.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"match_olg_83156"}],"responses":{"200":{"description":"Match events and minute-by-minute commentary"},"404":{"$ref":"#/components/responses/MatchDataNotFound"}}}},"/v1/matches/{id}/lineups":{"get":{"operationId":"getMatchLineups","tags":["Matches"],"summary":"Get starting XI, bench and tactical formations","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"match_olg_83156"}],"responses":{"200":{"description":"Lineups and formations"},"404":{"$ref":"#/components/responses/MatchDataNotFound"}}}},"/v1/matches/{id}/xg":{"get":{"operationId":"getMatchXG","tags":["Analytics"],"summary":"Get granular shot maps and expected goals (xG) per shot","description":"Returns the shots the upstream source publishes for the match, with no shots added, removed or estimated. There is no per-match completeness field. A match with no published shot map returns 404 `feature_not_available`; an unplayed match returns 404 `match_not_played`. `homeXG` and `awayXG` are the sums of the per-shot xG values. `result` is one of `Goal`, `SavedShot`, `ShotOnPost`, `MissedShots` or `BlockedShot`. A shot on target is `Goal` or `SavedShot`; `ShotOnPost` and `BlockedShot` are not on target. The endpoint returns shot rows and team xG totals only, so count team and player shot totals from the rows.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"match_olg_83156"}],"responses":{"200":{"description":"Shot map with coordinates and xG"},"404":{"$ref":"#/components/responses/MatchDataNotFound"}}}},"/v1/analytics/xg":{"get":{"operationId":"getLeagueXG","tags":["Analytics"],"summary":"Get league-wide expected goals table","description":"Per-team Expected Goals, xG conceded and xG difference for any competition whose data source publishes an xG table. Defaults to the current season; pass `season` for any season listed in the competition's availableSeasons. Any of `goals`, `rank`, `matchesPlayed`, `xGConceded` and `xGDifference` is null when the source does not report it — a null is not a zero, and a team the source reports no xG for is omitted rather than listed on 0. Requires Developer ($14/mo) plan.","security":[{"bearerAuth":[]}],"parameters":[{"name":"league","in":"query","required":false,"description":"A competition ID (comp_premier_league_eng), its code (EPL), its name (premier-league), or a short alias (epl, la-liga, serie-a, bundesliga, ligue-1)","schema":{"type":"string","default":"epl","example":"epl"}},{"name":"season","in":"query","required":false,"description":"Season label; defaults to the competition's current season","schema":{"type":"string","example":"2025/26"}}],"responses":{"200":{"description":"Per-team league xG table"}}}},"/v1/odds":{"get":{"operationId":"getMatchOdds","tags":["Odds"],"summary":"Get bookmaker odds benchmark and implied fair probabilities","security":[{"bearerAuth":[]}],"parameters":[{"name":"matchId","in":"query","required":true,"schema":{"type":"string"},"example":"match_olg_83156"}],"responses":{"200":{"description":"Odds and win probability benchmark"}}}},"/v1/live/stream":{"get":{"operationId":"getLiveStream","tags":["Live"],"summary":"Stream live match ticks, goal alerts, and status changes (SSE)","description":"Server-Sent Events (SSE) persistent stream. Emits instant 'goal', 'status_change', and periodic 'tick' updates. Accepts API key in Authorization header, X-API-Key, or ?api_key= parameter for browser EventSource. Requires Developer ($14/mo) plan.","security":[{"bearerAuth":[]}],"parameters":[{"name":"competition","in":"query","required":false,"description":"Filter by stable competition ID","schema":{"type":"string","example":"comp_premier_league_eng"}},{"name":"team","in":"query","required":false,"description":"Filter by team ID","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Filter by country code (e.g. eng, es, ro)","schema":{"type":"string"}},{"name":"interval","in":"query","required":false,"description":"Tick interval in seconds (3-60, default: 10)","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"Live Server-Sent Events stream, about a minute behind the pitch","content":{"text/event-stream":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimitExceeded"}}}},"/v1/webhooks":{"get":{"operationId":"listWebhooks","tags":["Live"],"summary":"List registered webhook endpoints","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Active registered webhooks list"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"operationId":"registerWebhook","tags":["Live"],"summary":"Register a webhook endpoint for live match events","description":"Registers an HTTPS endpoint to receive match.goal, match.kickoff, match.halftime, match.fulltime, and match.status_change events signed with HMAC SHA-256.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri","example":"https://my-app.com/api/webhooks"},"events":{"type":"array","items":{"type":"string","enum":["match.kickoff","match.goal","match.halftime","match.fulltime","match.status_change"]}},"competition":{"type":"string","example":"comp_premier_league_eng"},"secret":{"type":"string","description":"Optional custom secret. If omitted, a cryptographically secure whsec_ key is generated automatically."}}}}}},"responses":{"201":{"description":"Webhook registered successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"delete":{"operationId":"deleteWebhook","tags":["Live"],"summary":"Delete a registered webhook","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"description":"Webhook ID (whk_...)","schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook deleted"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/webhooks/test":{"post":{"operationId":"testWebhook","tags":["Live"],"summary":"Send a test ping to a webhook","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string","example":"whk_..."},"url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Test delivery result and latency"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Developer API keys use the of_live_ prefix and are stored only as SHA-256 hashes."}},"responses":{"BadRequest":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"API key missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ApiKeyRequired":{"description":"A Developer API key is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"The requested resource does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"MatchDataNotFound":{"description":"`match_not_found` when the ID matches no fixture. `match_not_played` when the match has not kicked off yet, or was postponed or cancelled. For an upcoming match the message gives the kickoff time. `feature_not_available` when the match was played but no source publishes this data for it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"QuotaExceeded":{"description":"The monthly request allowance is exhausted","headers":{"Retry-After":{"description":"Seconds until the monthly quota resets","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests included in the monthly quota","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the monthly quota","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the monthly quota resets","schema":{"type":"integer"}},"RateLimit-Minute-Limit":{"description":"Requests allowed per minute on the current plan","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimitExceeded":{"description":"Per-minute rate limit exceeded for the current plan","headers":{"Retry-After":{"description":"Seconds until the minute window resets","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests included in the monthly quota","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the monthly quota","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the monthly quota resets","schema":{"type":"integer"}},"RateLimit-Minute-Limit":{"description":"Requests allowed per minute on the current plan","schema":{"type":"integer"}},"RateLimit-Minute-Remaining":{"description":"Requests left in the current minute","schema":{"type":"integer"}},"RateLimit-Minute-Reset":{"description":"Seconds until the minute window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"SourceUnavailable":{"description":"An upstream open-data source is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"Access":{"type":"object","required":["authenticated","plan"],"properties":{"authenticated":{"type":"boolean"},"plan":{"type":"string","example":"developer"},"quota":{"type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"},"period":{"type":"string","example":"2026-08"}}},"StandingsStats":{"type":"object","required":["played","won","drawn","lost","goalsFor","goalsAgainst","goalDifference","points"],"properties":{"played":{"type":"integer"},"won":{"type":"integer"},"drawn":{"type":"integer"},"lost":{"type":"integer"},"goalsFor":{"type":"integer"},"goalsAgainst":{"type":"integer"},"goalDifference":{"type":"integer"},"points":{"type":"integer"}}},"StandingsRow":{"type":"object","required":["position","team","total","home","away","form"],"properties":{"position":{"type":"integer"},"team":{"type":"object","required":["id","name","shortName","code"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string"},"code":{"type":"string"},"logoUrl":{"type":["string","null"]}}},"total":{"$ref":"#/components/schemas/StandingsStats"},"home":{"$ref":"#/components/schemas/StandingsStats"},"away":{"$ref":"#/components/schemas/StandingsStats"},"form":{"type":"array","items":{"type":"string","enum":["W","D","L"]}}}},"StandingsResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","required":["competitionId","competitionName","season","updatedAt","table"],"properties":{"competitionId":{"type":"string"},"competitionName":{"type":"string"},"season":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"table":{"type":"array","items":{"$ref":"#/components/schemas/StandingsRow"}}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"SourceAttribution":{"type":"object","required":["name","license","url","coverage"],"properties":{"name":{"type":"string","enum":["OpenLigaDB","OpenFootball","Football-Data.co.uk","Understat","ESPN"]},"license":{"type":"string"},"url":{"type":"string","format":"uri"},"coverage":{"type":"string"}}},"Meta":{"type":"object","required":["request_id","generated_at","environment"],"properties":{"request_id":{"type":"string","example":"req_19d5a7a8e7c4437d94"},"generated_at":{"type":"string","format":"date-time"},"environment":{"type":"string","enum":["beta"]},"count":{"type":"integer","minimum":0},"total_count":{"type":"integer","minimum":0},"preview_limit":{"type":["integer","null"]},"pagination":{"type":"object","required":["limit","next_cursor"],"properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"next_cursor":{"type":["string","null"]}}},"access":{"$ref":"#/components/schemas/Access"},"scope":{"type":"object","required":["mode","partial","competitions_searched","competitions_total"],"properties":{"mode":{"type":"string","enum":["default_competitions","filtered"]},"partial":{"type":"boolean"},"competitions_searched":{"type":"array","items":{"type":"string"}},"competitions_total":{"type":"integer","minimum":0},"window":{"type":"object","description":"The date range an unfiltered /v1/matches was narrowed to: today plus or minus three days, UTC, inclusive. Absent as soon as the query names a competition, team, date, season or round — then the caller's own range applies.","required":["from","to","reason"],"properties":{"from":{"type":"string","format":"date","example":"2026-08-27"},"to":{"type":"string","format":"date","example":"2026-09-02"},"reason":{"type":"string","enum":["default_window"]}}}}},"unavailable":{"type":"array","description":"Competitions that were searched but served nothing, with the reason. Present on /v1/matches; empty when every searched competition returned normally.","items":{"type":"object","required":["competition_id","reason","message","configured_season","upstream_season"],"properties":{"competition_id":{"type":"string","example":"comp_fa_cup_eng"},"reason":{"type":"string","enum":["season_not_published_upstream"]},"message":{"type":"string","example":"The 2026/27 season is not published upstream yet (latest available: 2025/2026). Matches are withheld rather than served from the previous edition."},"configured_season":{"type":"string","example":"2026/27"},"upstream_season":{"type":["string","null"],"example":"2025/2026"}}}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceAttribution"}}},"additionalProperties":true},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"meta":{"type":"object","properties":{"request_id":{"type":"string"}}}}},"Team":{"type":"object","required":["id","name","shortName","code","logoUrl","country","competitionId"],"properties":{"id":{"type":"string","example":"team_arsenal_eng"},"name":{"type":"string","example":"Arsenal"},"shortName":{"type":"string","example":"Arsenal"},"code":{"type":"string","example":"ARS"},"logoUrl":{"type":["string","null"],"format":"uri","example":"https://i.imgur.com/v0tkpNx.png"},"country":{"type":"string","example":"England"},"competitionId":{"type":"string","example":"comp_premier_league_eng"},"sourceRefs":{"type":"array","items":{"type":"object","required":["source","id"],"properties":{"source":{"type":"string"},"id":{"type":"string"}}}}}},"Match":{"type":"object","required":["id","competitionId","season","kickoffAt","kickoffTimeKnown","status","round","venue","homeTeam","awayTeam","score","updatedAt"],"properties":{"id":{"type":"string","example":"match_olg_83156"},"competitionId":{"type":"string"},"season":{"type":"string"},"kickoffAt":{"type":"string","format":"date-time"},"kickoffTimeKnown":{"type":"boolean","description":"False when upstream provided only a date and no exact kickoff time","example":true},"status":{"type":"string","enum":["scheduled","live","finished","postponed","cancelled","unknown"]},"round":{"type":"string"},"venue":{"type":["string","null"]},"homeTeam":{"$ref":"#/components/schemas/Team"},"awayTeam":{"$ref":"#/components/schemas/Team"},"score":{"type":"object","properties":{"home":{"type":["integer","null"]},"away":{"type":["integer","null"]}}},"minute":{"type":["integer","null"],"description":"Minute of play while the match is live. Null before kickoff, at half-time, after full time, and whenever upstream reports no clock. Stoppage time is not added here: 45+3 is minute 45 with addedTime 3.","example":45},"addedTime":{"type":["integer","null"],"description":"Stoppage minutes being played beyond `minute`, when upstream reports them; otherwise null or absent.","example":3},"period":{"type":["string","null"],"enum":["1H","HT","2H","ET","PEN","FT",null],"description":"Phase of the match: 1H first half, HT half-time, 2H second half, ET extra time, PEN penalty shoot-out, FT full time. Null when not started or not reported. `status` stays `live` during half-time, so read `period` to tell a break from play.","example":"HT"},"updatedAt":{"type":"string","format":"date-time"},"sourceRefs":{"type":"array","description":"Identifiers of this match at the upstream sources it was assembled from.","items":{"type":"object","required":["source","id"],"properties":{"source":{"type":"string"},"id":{"type":"string"}}}}}},"Competition":{"type":"object","required":["id","name","country","code","currentSeason","availableSeasons","coverage","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"country":{"type":"string"},"code":{"type":"string"},"currentSeason":{"type":"string"},"availableSeasons":{"type":"array","items":{"type":"string"}},"coverage":{"type":"object","additionalProperties":{"type":"boolean"}},"source":{"type":"object","required":["name","mode","license","url"],"properties":{"name":{"type":"string"},"mode":{"type":"string","enum":["current","archive","unavailable"],"description":"unavailable = no verified upstream currently serves fixtures for this competition"},"license":{"type":"string"},"url":{"type":"string","format":"uri"}}}}},"TeamContext":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"}}},"form":{"type":"string","example":"WWDWW"},"pointsLast5":{"type":"integer"},"goalsScoredLast5":{"type":"integer"},"goalsConcededLast5":{"type":"integer"},"goalsAverage":{"type":"number"},"elo":{"type":"integer"},"tablePosition":{"type":["integer","null"]},"restDays":{"type":["integer","null"]},"venueRecord":{"type":"object","properties":{"wins":{"type":"integer"},"draws":{"type":"integer"},"losses":{"type":"integer"}}}}},"HealthResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string"},"version":{"type":"string"},"provider":{"type":"string"}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"AccountQuotaResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"plan":{"type":"string"},"period":{"type":"string"},"quota":{"type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"CompetitionListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Competition"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"MatchListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Match"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"MatchAnalytics":{"type":"object","description":"Derived analytical modeling including goal expectancy, odds benchmark, momentum, and team radar","properties":{"expectedGoals":{"type":"object","properties":{"homeXG":{"type":"number","example":1.65},"awayXG":{"type":"number","example":1.12},"totalExpectedGoals":{"type":"number","example":2.77}}},"oddsBenchmark":{"type":"object","properties":{"impliedHomeWinPct":{"type":"number","example":52.4},"impliedDrawPct":{"type":"number","example":26.1},"impliedAwayWinPct":{"type":"number","example":21.5},"projectedFairOdds":{"type":"object","properties":{"home":{"type":"number","example":1.91},"draw":{"type":"number","example":3.83},"away":{"type":"number","example":4.65}}}}},"momentum":{"type":"object","properties":{"homeAttackPressure":{"type":"number","example":64},"awayAttackPressure":{"type":"number","example":36},"dominanceIndicator":{"type":"string","enum":["home_dominant","balanced","away_dominant"]},"restAdvantageDays":{"type":"number","example":2},"fatigueRisk":{"type":"string","enum":["low","moderate","high"]},"intervals":{"type":"array","description":"15-minute tactical pressure segments and dominance shifts across the match","items":{"type":"object","properties":{"interval":{"type":"string","example":"1-15"},"minuteStart":{"type":"number","example":1},"minuteEnd":{"type":"number","example":15},"homePressure":{"type":"number","example":64},"awayPressure":{"type":"number","example":36},"netPressure":{"type":"number","example":28},"dominantTeam":{"type":"string","enum":["home","away","even"],"example":"home"}}}}}},"radar":{"type":"object","properties":{"home":{"type":"object","additionalProperties":{"type":"number"}},"away":{"type":"object","additionalProperties":{"type":"number"}}}}}},"MatchContextResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"match":{"$ref":"#/components/schemas/Match"},"home":{"$ref":"#/components/schemas/TeamContext"},"away":{"$ref":"#/components/schemas/TeamContext"},"headToHead":{"type":"object","additionalProperties":{"type":"integer"}},"analytics":{"$ref":"#/components/schemas/MatchAnalytics"},"freshness":{"type":"object","additionalProperties":{"type":"string","format":"date-time"}}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"SearchResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["team","competition"]},"id":{"type":"string"},"name":{"type":"string"},"subtitle":{"type":"string"}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}}