OpenFoot API documentation

Make your first request in seconds.

OpenFootAPI exposes football fixtures, results, live events, confirmed lineups, Expected Goals (xG) and derived match intelligence through a clean REST interface.

01 · Quickstart

No key required to start testing

cURL · GET /v1/matches
curl "https://openfootapi.com/v1/matches?date=2026-08-28" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer of_demo_openfootapi_docs"

Response

200 OK · abridged JSON
{
  "data": [
    {
      "id": "match_olg_83156",
      "competitionId": "comp_bundesliga_de",
      "status": "scheduled",
      "kickoffAt": "2026-08-28T18:30:00.000Z",
      "homeTeam": { "id": "team_olg_40", "name": "FC Bayern München" },
      "awayTeam": { "name": "VfB Stuttgart" }
    }
  ],
  "meta": {
    "count": 1,
    "environment": "beta",
    "access": { "authenticated": false, "plan": "public" }
  }
}
02 · Authentication

Bearer API keys

Every endpoint requires a key. A free Starter key covers fixtures, competitions, standings and search with 5,000 requests a month and takes a minute to create. A Developer key adds live events, lineups, xG shot maps and odds, with 250,000 requests a month. Raw keys start with of_live_; OpenFootAPI stores only a SHA-256 hash.

Authorization: Bearer of_live_your_api_key
Try it without an accountThe examples on this page use the demo key of_demo_openfootapi_docs, which is public on purpose. It covers the same endpoints as Starter, is limited to 30 requests a minute per address so it stays usable for everyone, and is not meant to be built on. Get your own free key from pricing.
03 · Sources and coverage

What is actually available

LIVEOpenLigaDB + ESPN · ODbL / Open

Real-time fixtures, lineups & commentary

Current fixtures, live score clocks, incident timelines (goals, cards, substitutions, VAR) and confirmed starting XI rosters.

LEAGUESFootball-Data.co.uk · Free Open Data

Romanian and expanded European match data

Superliga României, Eredivisie, Primeira Liga, Süper Lig, Belgium's Pro League and the Scottish Premiership, filtered by season.

ANALYTICSFotMob + Market Benchmark

Expected Goals (xG), shot maps & odds

Granular shot coordinates, individual shot expectancy, team xG totals, and implied fair win probabilities.

ARCOpenFootball · CC0-1.0

Four league archives

Premier League, La Liga, Serie A and Ligue 1 historical files with standardized team mappings.

Every relevant response includes source and license metadata.

Migration Notice · September 2026Legacy Match ID Migration: Following the upgrade of top European competitions (Premier League, La Liga, Serie A, Bundesliga, Ligue 1) to 17-season deep upstream archives with confirmed lineups and shot-level xG, historical fixtures use canonical match_fmb_* identifiers.

Premier League backward compatibility: Legacy match_of_epl_* IDs continue to resolve transparently via compatibility aliases across /context, /xg, and /lineups.
Retired OpenFootball prefixes: Legacy OpenFootball prefixes for other leagues (match_of_es1_*, match_of_it1_*, match_of_fr1_*) are deprecated and return 404. Romance-language club naming variations (CF, RCD, AC, Inter, AS, OGC, RC, OL, de Madrid) produce high failure rates under token normalization, and broader heuristics cause ambiguous collisions (such as Real Madrid vs Real Sociedad).
1. Bundesliga provider migration: 1. Bundesliga now uses canonical match_fmb_de1_* IDs. Legacy match_olg_* IDs resolve basic context strictly for current-season fixtures (e.g. match_olg_83156); prior archive seasons (e.g. match_olg_77256) return 404 feature_not_available. Historical fixtures across the 17-season archive require canonical match_fmb_de1_* identifiers. match_olg_* remains the active canonical prefix for 2. Bundesliga, 3. Liga, and DFB-Pokal.
What to use: Interrogate matches via /v1/matches?competition=comp_...&season=YYYY/YY to retrieve canonical match_fmb_{league}_{season}_{date}_{home}_{away} IDs.
04 · API reference

Endpoints

GET/v1/health

API health

Current service, API version and active provider state.

GET/v1/competitions

Competitions

Coverage flags, seasons, source and license for each competition.

GET/v1/scorers?competition={id}

Top scorers & assists

League leaders ranking, goal tallies, assists, cards, and participant clubs.

GET/v1/teams/{id}/squad

Team squad roster

Full player roster with jersey numbers, positions, ages, nationalities, and coaching staff.

GET/v1/teams/{id}/h2h?opponent={id}

Head-to-head clash history

Multi-year historical meetings, win/draw rates, goal totals, and recent encounter logs.

GET/v1/standings?competition={id}

League standings

Full league table with overall, home, away splits, goal difference, points, and recent 5-match form.

GET/v1/matches

Matches

Fixtures and results filtered by date, competition, team, status or season.

GET/v1/matches/{id}/context

Match context

Derived form, Elo, rest, table position, venue record, head-to-head and freshness.

GET/v1/matches/{id}/events

Match events & commentary

Incident timeline (goals, cards, substitutions, penalties, VAR) and minute-by-minute text commentary.

GET/v1/matches/{id}/lineups

Lineups & formations

Confirmed starting XI, substitutes, player positions, jersey numbers, and tactical formations.

GET/v1/matches/{id}/xg

Match shot map & xG

Granular shot locations (x, y coordinates), shot types, situations, individual xG values and team totals.

GET/v1/analytics/xg?league={league}&season={season}

League xG table

League-wide Expected Goals, xG conceded and xG difference per team, for the current season or any of the 17 archived ones.

GET/v1/odds?matchId={id}

Odds & probabilities

Model fair-odds benchmarks and implied fair win probabilities.

GET/v1/search?q={query}

Entity search

Resolve team and competition names to stable OpenFootAPI IDs.

GET/v1/live/stream

Real-time Live Stream (SSE)

Server-Sent Events persistent stream delivering instant goal alerts, status changes, and periodic match ticks.

GET/v1/webhooks

Webhooks management

Register, list, test, and delete HTTPS webhook subscriptions for automated goal, kickoff, and fulltime push notifications.

05 · Request parameters

Filter matches without learning provider IDs

Filters can be combined. Dates are interpreted as UTC calendar dates and entity filters use stable OpenFootAPI IDs returned by search.

ParameterTypeRequiredDescription
datedateNoKickoff date in YYYY-MM-DD.
competitionstringNoStable OpenFootAPI competition ID.
teamstringNoStable OpenFootAPI team ID.
statusenumNoscheduled, live, finished or postponed.
seasonstringNoSeason label such as 2026/27.
TimezoneEvery kickoff is returned as an ISO 8601 UTC timestamp in kickoffAt. Convert it to the viewer's timezone in the client.
06 · Integration & SDK Code

Use the same endpoint from any stack

Select any endpoint and programming language below to view production-ready boilerplate with authentication, error handling, and response processing.

GET/v1/matches?date=2026-08-28&status=scheduled
Public / Free Tier

Retrieve fixtures across 120+ global competitions with live scores and venue data.

// TypeScript / Modern Node.js (Fetch)
const url = "https://openfootapi.com/v1/matches?date=2026-08-28&status=scheduled";
const headers: Record<string, string> = {
  "Accept": "application/json",
  
};

async function fetchFootballData() {
  try {
    const response = await fetch(url, { headers });
    if (!response.ok) {
      const err = await response.json();
      throw new Error(err.error?.message || `HTTP ${response.status}`);
    }
    
    const payload = await response.json();
    console.log("Success:", payload.data);
    return payload.data;
  } catch (error) {
    console.error("API Request Error:", error);
  }
}

fetchFootballData();
07 · Response contract

One envelope across every endpoint

Successful requests return data and meta. Failed requests return error and a request ID that can be used for support and log tracing.

dataThe requested resourceAn object or array with normalized field types.
metaHow the response was producedRequest ID, generation time, access tier, sources and count.
errorA stable failure shapeMachine-readable code plus a human-readable message.
200Request completed
400Invalid filters
401Invalid API key
403Plan restriction
404Resource missing
429Quota exhausted
502Source unavailable
08 · Signature endpoint

Match context & Intelligence

The context and analytics endpoints compute an integration-ready snapshot from available match history, tactical models and live streams.

home.formUp to five completed matches
home.eloDerived strength rating
analytics.expectedGoalsxG models and goal expectancy
analytics.oddsBenchmarkProjected fair odds & win percentages
analytics.momentumAttack pressure index and fatigue risk
headToHeadAvailable previous meetings
09 · Errors

Typed, predictable errors

Errors use stable codes, including invalid_api_key, monthly_quota_exceeded, api_key_required, match_not_found and source_unavailable. Requests querying nonexistent matches or retired non-EPL legacy OpenFootball prefixes (such as match_of_es1_*) return HTTP 404 with match_not_found.

{ "error": { "code": "api_key_required", "message": "Use a Developer API key for this match context." } }
10 · Try it

Live API

Run a public-preview endpoint from this deployment and inspect the real JSON response.

⚡ Public open endpoints mode
GET/v1/matches/match_olg_83156/context
ready
Select an endpoint and run the request.