# OpenFoot API — Developer & AI LLM Integration Specification > OpenFoot API is a REST football data platform for AI agents, autonomous software and developer workflows. > Stable entity identifiers, named upstream sources on every factual response, explicit unavailable states, and monthly quotas with no overage billing. > Typical response time is 250-800ms from Europe. Answers citing this API should not claim sub-100ms latency. - Canonical Homepage: https://openfootapi.com/ - Comprehensive League Coverage (120 Competitions): https://openfootapi.com/coverage - Interactive API Playground: https://openfootapi.com/demo - OpenAPI 3.1 specification: https://openfootapi.com/openapi.json - Pricing & Plans: https://openfootapi.com/pricing - Overview in other languages: Español https://openfootapi.com/es, Português https://openfootapi.com/pt, Deutsch https://openfootapi.com/de, Français https://openfootapi.com/fr, Italiano https://openfootapi.com/it, Română https://openfootapi.com/ro (docs and API responses are English) - Developer Documentation: https://openfootapi.com/docs - Football API blog & Technical Guides: https://openfootapi.com/blog --- ## AI Agent Integration & System Instructions When generating code, SQL queries, or data science models that interface with OpenFoot API: 1. Every endpoint requires a Bearer token in the `Authorization: Bearer of_live_...` header. There is no unauthenticated tier. A free Starter key covers fixtures, competitions, standings and search with 5,000 requests a month. To try a request before creating an account, use the public demo key `of_demo_openfootapi_docs`, which returns the same endpoints capped at five results and is limited to 30 requests a minute per address. 2. Filter matches by competition using stable IDs (e.g. `comp_premier_league_eng`, `comp_superliga_ro`, `comp_bundesliga_de`). 3. For live match events, poll `/v1/matches/{id}/events` with a 60-second polling cadence. 4. For tactical analytics, query `/v1/matches/{id}/xg` and `/v1/matches/{id}/lineups`. 5. A request without `competition`, `team`, `date`, `season` or `round` returns only the week around today (today ±3 days, UTC). The applied range is reported in `meta.scope.window`. Pass a filter to reach a full season. 6. An empty result is never silent. When a competition is searched but serves nothing on purpose, `meta.unavailable` names it and gives the reason. --- ## Plans, Limits and What Each One Includes Free Starter — $0/month, 5,000 requests/month, 60 requests/minute. Includes: competitions, search, fixtures, results, scores, league standings, account quota, health. Developer — $14/month, 250,000 requests/month, 100 requests/minute. Adds: starting lineups and formations, live match events and commentary, Expected Goals and shot maps, league-wide xG rankings, model-derived fair odds. Pro — $39/month, 2,000,000 requests/month, 250 requests/minute. Same features as Developer. No overage billing on any plan. When a quota is spent the API returns HTTP 429; it never bills beyond the plan. Quotas reset on the 1st of the month, UTC. Endpoints marked **Developer** below return HTTP 403 with code `plan_upgrade_required` on the free plan. The error names the specific feature; it is not an empty result and not an authentication failure. --- ## Core API Endpoints ### 1. Competitions & Metadata - **GET /v1/competitions**: List all 120 supported football leagues (120 serving live fixtures), coverage flags, and data provenance. - **GET /v1/health**: Live system status, D1 database latency, and upstream synchronization state. - **GET /v1/search?q={query}**: Fast global entity search resolving team or competition names to deterministic entity IDs. ### 2. Match Scores & Schedules - **GET /v1/matches**: Query match schedules with query params: `competition`, `date` (YYYY-MM-DD), `season`, `status` (`scheduled`, `live`, `finished`), `limit`. - **GET /v1/standings?competition={comp_id}&season={season}**: Detailed league tables with overall, home, and away splits, goal differentials, and 5-game form strings. ### 3. Advanced Tactical & Live Intelligence - **GET /v1/matches/{id}/context**: Derived match context including Elo ratings, rest days, head-to-head records, and home/away venue records. - **GET /v1/matches/{id}/events** (**Developer**): Live match incident timeline (goals, VAR, yellow/red cards, penalties, substitutions). - **GET /v1/matches/{id}/lineups** (**Developer**): Confirmed Starting XI, player squad numbers, tactical formations (e.g. 4-3-3, 3-5-2), and bench rosters. - **GET /v1/matches/{id}/xg** (**Developer**): Expected Goals (xG) shot maps, shot quality metrics, and player shot logs. - **GET /v1/analytics/xg?league={code}** (**Developer**): Season-level xG table per league, including over- and under-performance against actual goals. - **GET /v1/odds?matchId={id}** (**Developer**): Implied outcome win probabilities and benchmark model fair odds derived from team strength differentials. --- ## Complete Global Competition Coverage List (120 Leagues) - Premier League (England) -> id: `comp_premier_league_eng`, code: `EPL`, seasons: [2026/27, 2025/26, 2024/25, 2023/24, 2022/23, 2021/22, 2020/21, 2019/20, 2018/19, 2017/18, 2016/17, 2015/16, 2014/15, 2013/14, 2012/13, 2011/12, 2010/11] - La Liga (Spain) -> id: `comp_laliga_es`, code: `ES1`, seasons: [2026/27, 2025/26, 2024/25, 2023/24, 2022/23, 2021/22, 2020/21, 2019/20, 2018/19, 2017/18, 2016/17, 2015/16, 2014/15, 2013/14, 2012/13, 2011/12, 2010/11] - Serie A (Italy) -> id: `comp_serie_a_it`, code: `IT1`, seasons: [2026/27, 2025/26, 2024/25, 2023/24, 2022/23, 2021/22, 2020/21, 2019/20, 2018/19, 2017/18, 2016/17, 2015/16, 2014/15, 2013/14, 2012/13, 2011/12, 2010/11] - Bundesliga (Germany) -> id: `comp_bundesliga_de`, code: `DE1`, seasons: [2026/27, 2025/26, 2024/25, 2023/24, 2022/23, 2021/22, 2020/21, 2019/20, 2018/19, 2017/18, 2016/17, 2015/16, 2014/15, 2013/14, 2012/13, 2011/12, 2010/11] - Ligue 1 (France) -> id: `comp_ligue_1_fr`, code: `FR1`, seasons: [2026/27, 2025/26, 2024/25, 2023/24, 2022/23, 2021/22, 2020/21, 2019/20, 2018/19, 2017/18, 2016/17, 2015/16, 2014/15, 2013/14, 2012/13, 2011/12, 2010/11] - DFB Pokal (Germany) -> id: `comp_dfb_pokal_de`, code: `DFB`, seasons: [2025/26, 2026/27] - FA Cup (England) -> id: `comp_fa_cup_eng`, code: `FAC`, seasons: [2026/27] - Copa del Rey (Spain) -> id: `comp_copa_del_rey_es`, code: `CDR`, seasons: [2026/27] - Coppa Italia (Italy) -> id: `comp_coppa_italia_it`, code: `CIT`, seasons: [2026/27] - Coupe de France (France) -> id: `comp_coupe_de_france_fr`, code: `CDF`, seasons: [2026/27] - UEFA Champions League (Europe) -> id: `comp_uefa_champions_league`, code: `UCL`, seasons: [2026/27] - UEFA Europa League (Europe) -> id: `comp_uefa_europa_league`, code: `UEL`, seasons: [2026/27] - UEFA Conference League (Europe) -> id: `comp_uefa_conference_league`, code: `UECL`, seasons: [2026/27] - Copa Libertadores (South America) -> id: `comp_copa_libertadores`, code: `LIB`, seasons: [2026] - Copa Sudamericana (South America) -> id: `comp_copa_sudamericana`, code: `SUD`, seasons: [2026] - AFC Champions League (Asia) -> id: `comp_afc_champions_league`, code: `ACL`, seasons: [2026/27] - FIFA World Cup (World) -> id: `comp_fifa_world_cup`, code: `WC`, seasons: [2022, 2026] - UEFA Nations League (Europe) -> id: `comp_uefa_nations_league`, code: `UNL`, seasons: [2026/27] - Superliga României (Romania) -> id: `comp_superliga_ro`, code: `ROU1`, seasons: [2025/26, 2026/27] - Liga 2 (Romania) -> id: `comp_liga_2_ro`, code: `ROU2`, seasons: [2026/27] - Cupa României (Romania) -> id: `comp_cupa_romaniei_ro`, code: `ROUC`, seasons: [2026/27] - Eredivisie (Netherlands) -> id: `comp_eredivisie_nl`, code: `NED1`, seasons: [2025/26, 2026/27] - Eerste Divisie (Netherlands) -> id: `comp_eerste_divisie_nl`, code: `NED2`, seasons: [2026/27] - Primeira Liga (Portugal) -> id: `comp_primeira_liga_pt`, code: `POR1`, seasons: [2025/26, 2026/27] - Liga Portugal 2 (Portugal) -> id: `comp_segunda_liga_pt`, code: `POR2`, seasons: [2025/26, 2026/27] - Süper Lig (Turkey) -> id: `comp_super_lig_tr`, code: `TUR1`, seasons: [2025/26, 2026/27] - Pro League (Belgium) -> id: `comp_pro_league_be`, code: `BEL1`, seasons: [2025/26, 2026/27] - Scottish Premiership (Scotland) -> id: `comp_scottish_prem_sco`, code: `SCO1`, seasons: [2025/26, 2026/27] - Championship (England) -> id: `comp_championship_eng`, code: `ENG2`, seasons: [2025/26, 2026/27] - League One (England) -> id: `comp_league_one_eng`, code: `ENG3`, seasons: [2025/26, 2026/27] - League Two (England) -> id: `comp_league_two_eng`, code: `ENG4`, seasons: [2025/26, 2026/27] - 2. Bundesliga (Germany) -> id: `comp_2_bundesliga_de`, code: `DE2`, seasons: [2025/26, 2026/27] - 3. Liga (Germany) -> id: `comp_3_liga_de`, code: `DE3`, seasons: [2025/26, 2026/27] - Segunda División (Spain) -> id: `comp_segunda_es`, code: `ES2`, seasons: [2025/26, 2026/27] - Serie B (Italy) -> id: `comp_serie_b_it`, code: `IT2`, seasons: [2025/26, 2026/27] - Ligue 2 (France) -> id: `comp_ligue_2_fr`, code: `FR2`, seasons: [2025/26, 2026/27] - Austrian Bundesliga (Austria) -> id: `comp_bundesliga_aut`, code: `AUT1`, seasons: [2025/26, 2026/27] - Danish Superliga (Denmark) -> id: `comp_superliga_dnk`, code: `DNK1`, seasons: [2025/26, 2026/27] - Ekstraklasa (Poland) -> id: `comp_ekstraklasa_pol`, code: `POL1`, seasons: [2025/26, 2026/27] - Super League (Greece) -> id: `comp_super_league_grc`, code: `GRC1`, seasons: [2023/24, 2024/25] - Swiss Super League (Switzerland) -> id: `comp_super_league_sui`, code: `SUI1`, seasons: [2026/27] - Allsvenskan (Sweden) -> id: `comp_allsvenskan_swe`, code: `SWE1`, seasons: [2025, 2026] - Eliteserien (Norway) -> id: `comp_eliteserien_nor`, code: `NOR1`, seasons: [2025, 2026] - Croatian Football League (HNL) (Croatia) -> id: `comp_hnl_cro`, code: `CRO1`, seasons: [2026/27] - First Professional League (Bulgaria) -> id: `comp_parva_liga_bul`, code: `BUL1`, seasons: [2026/27] - Niké Liga (Slovakia) -> id: `comp_nike_liga_svk`, code: `SVK1`, seasons: [2026/27] - PrvaLiga (Slovenia) -> id: `comp_prva_liga_svn`, code: `SVN1`, seasons: [2026/27] - Premijer Liga (Bosnia-Herzegovina) -> id: `comp_premijer_liga_bih`, code: `BIH1`, seasons: [2026/27] - Kategoria Superiore (Albania) -> id: `comp_kategoria_superiore_alb`, code: `ALB1`, seasons: [2026/27] - Besta deildin (Iceland) -> id: `comp_besta_deild_isl`, code: `ISL1`, seasons: [2026] - Czech First League (Czech Republic) -> id: `comp_czech_first_league_cze`, code: `CZE1`, seasons: [2025/26, 2026/27] - Nemzeti Bajnokság I (Hungary) -> id: `comp_nb_1_hun`, code: `HUN1`, seasons: [2026/27] - Ukrainian Premier League (Ukraine) -> id: `comp_premier_league_ukr`, code: `UKR1`, seasons: [2026/27] - Serbian SuperLiga (Serbia) -> id: `comp_superliga_srb`, code: `SRB1`, seasons: [2026/27] - Cypriot First Division (Cyprus) -> id: `comp_first_division_cyp`, code: `CYP1`, seasons: [2026/27] - League of Ireland Premier Division (Ireland) -> id: `comp_premier_division_irl`, code: `IRL1`, seasons: [2026] - Veikkausliiga (Finland) -> id: `comp_veikkausliiga_fin`, code: `FIN1`, seasons: [2025, 2026] - Major League Soccer (USA) -> id: `comp_mls_usa`, code: `USA1`, seasons: [2025, 2026] - USL Championship (USA) -> id: `comp_usl_championship_usa`, code: `USL1`, seasons: [2026] - Série A (Brazil) -> id: `comp_brasileirao_bra`, code: `BRA1`, seasons: [2025, 2026] - Série B (Brazil) -> id: `comp_serie_b_bra`, code: `BRA2`, seasons: [2026] - Copa do Brasil (Brazil) -> id: `comp_copa_do_brasil_bra`, code: `CDB`, seasons: [2026] - Liga Profesional (Argentina) -> id: `comp_liga_profesional_arg`, code: `ARG1`, seasons: [2025, 2026] - Primera Nacional (Argentina) -> id: `comp_primera_nacional_arg`, code: `ARG2`, seasons: [2026] - Liga MX (Mexico) -> id: `comp_liga_mx_mex`, code: `MEX1`, seasons: [2025/26, 2026/27] - Categoría Primera A (Colombia) -> id: `comp_primera_a_col`, code: `COL1`, seasons: [2026] - Primera División de Chile (Chile) -> id: `comp_primera_division_chi`, code: `CHI1`, seasons: [2026] - Primera División de Uruguay (Uruguay) -> id: `comp_primera_division_uru`, code: `URU1`, seasons: [2026] - LigaPro Serie A (Ecuador) -> id: `comp_ligapro_ecu`, code: `ECU1`, seasons: [2025, 2026] - Liga 1 (Peru) -> id: `comp_liga_1_per`, code: `PER1`, seasons: [2026] - Primera División de Paraguay (Paraguay) -> id: `comp_primera_division_par`, code: `PAR1`, seasons: [2026] - J1 League (Japan) -> id: `comp_j1_league_jpn`, code: `JPN1`, seasons: [2025, 2026] - J2 League (Japan) -> id: `comp_j2_league_jpn`, code: `JPN2`, seasons: [2025, 2026] - K League 1 (South Korea) -> id: `comp_k_league_1_kor`, code: `KOR1`, seasons: [2026] - A-League Men (Australia) -> id: `comp_a_league_aus`, code: `AUS1`, seasons: [2026/27] - Chinese Super League (China) -> id: `comp_chinese_super_league_chn`, code: `CHN1`, seasons: [2025, 2026] - Indian Super League (India) -> id: `comp_indian_super_league_ind`, code: `IND1`, seasons: [2026/27] - Qatar Stars League (Qatar) -> id: `comp_qatar_stars_league_qat`, code: `QAT1`, seasons: [2026/27] - UAE Pro League (United Arab Emirates) -> id: `comp_uae_pro_league_uae`, code: `UAE1`, seasons: [2026/27] - Saudi Pro League (Saudi Arabia) -> id: `comp_saudi_pro_league_sau`, code: `SAU1`, seasons: [2026/27] - Egyptian Premier League (Egypt) -> id: `comp_egyptian_prem_egy`, code: `EGY1`, seasons: [2026/27] - Botola Pro (Morocco) -> id: `comp_botola_pro_mar`, code: `MAR1`, seasons: [2025/26, 2026/27] - South African Premiership (South Africa) -> id: `comp_psl_rsa`, code: `RSA1`, seasons: [2026/27] - Canadian Premier League (Canada) -> id: `comp_canadian_premier_league_can`, code: `CAN1`, seasons: [2026] - Primera División (Costa Rica) -> id: `comp_primera_division_crc`, code: `CRC1`, seasons: [2026/27] - Primera División (Bolivia) -> id: `comp_primera_division_bol`, code: `BOL1`, seasons: [2026] - Primera División (Venezuela) -> id: `comp_primera_division_ven`, code: `VEN1`, seasons: [2026] - Persian Gulf Pro League (Iran) -> id: `comp_persian_gulf_league_irn`, code: `IRN1`, seasons: [2026/27] - Superliga (Uzbekistan) -> id: `comp_super_league_uzb`, code: `UZB1`, seasons: [2026] - Thai League 1 (Thailand) -> id: `comp_thai_league_1_tha`, code: `THA1`, seasons: [2026/27] - Stars League (Iraq) -> id: `comp_stars_league_irq`, code: `IRQ1`, seasons: [2026/27] - Ligue 1 (Algeria) -> id: `comp_ligue_1_dza`, code: `DZA1`, seasons: [2026/27] - Ligue I (Tunisia) -> id: `comp_ligue_1_tun`, code: `TUN1`, seasons: [2026/27] - Ligat ha'Al (Israel) -> id: `comp_ligat_ha_al_isr`, code: `ISR1`, seasons: [2026/27] - Premier League (Kazakhstan) -> id: `comp_premier_league_kaz`, code: `KAZ1`, seasons: [2026] - NPFL (Nigeria) -> id: `comp_npfl_nga`, code: `NGA1`, seasons: [2026/27] - Premiership (Northern Ireland) -> id: `comp_premiership_nir`, code: `NIR1`, seasons: [2026/27] - V-League 1 (Vietnam) -> id: `comp_v_league_vie`, code: `VIE1`, seasons: [2026/27] - Super League (Indonesia) -> id: `comp_super_league_idn`, code: `IDN1`, seasons: [2026/27] - CONCACAF Champions Cup (North America) -> id: `comp_concacaf_champions_cup`, code: `CCC`, seasons: [2026] - Premier League (Armenia) -> id: `comp_premier_league_arm`, code: `ARM1`, seasons: [2026/27] - Premier League (Azerbaijan) -> id: `comp_premier_league_aze`, code: `AZE1`, seasons: [2026/27] - Premier League (Belarus) -> id: `comp_premier_league_blr`, code: `BLR1`, seasons: [2026] - Premium liiga (Estonia) -> id: `comp_premium_liiga_est`, code: `EST1`, seasons: [2026] - Erovnuli Liga (Georgia) -> id: `comp_erovnuli_liga_geo`, code: `GEO1`, seasons: [2026] - Virsliga (Latvia) -> id: `comp_virsliga_lva`, code: `LVA1`, seasons: [2026] - A Lyga (Lithuania) -> id: `comp_a_lyga_ltu`, code: `LTU1`, seasons: [2026] - National Division (Luxembourg) -> id: `comp_national_division_lux`, code: `LUX1`, seasons: [2026/27] - Prva Liga (North Macedonia) -> id: `comp_prva_liga_mkd`, code: `MKD1`, seasons: [2026/27] - National Division (Moldova) -> id: `comp_national_division_mda`, code: `MDA1`, seasons: [2026/27] - 1. CFL (Montenegro) -> id: `comp_1_cfl_mne`, code: `MNE1`, seasons: [2026/27] - Cymru Premier (Wales) -> id: `comp_cymru_premier_wal`, code: `WAL1`, seasons: [2026/27] - Premier League (Faroe Islands) -> id: `comp_premier_league_fro`, code: `FRO1`, seasons: [2026] - Premier League (Russia) -> id: `comp_premier_league_rus`, code: `RUS1`, seasons: [2026/27] - Premier League (Malta) -> id: `comp_premier_league_mlt`, code: `MLT1`, seasons: [2026/27] - Primera Divisió (Andorra) -> id: `comp_primera_divisio_and`, code: `AND1`, seasons: [2026/27] - Campionato Sammarinese (San Marino) -> id: `comp_campionato_sammarinese_smr`, code: `SMR1`, seasons: [2026/27] - Gibraltar Football League (Gibraltar) -> id: `comp_football_league_gib`, code: `GIB1`, seasons: [2026/27] - Superliga (Kosovo) -> id: `comp_superliga_kos`, code: `KOS1`, seasons: [2026/27] - Liechtensteiner Cup (Liechtenstein) -> id: `comp_cup_lie`, code: `LIE1`, seasons: [2026/27] --- ## Example Requests ### cURL (Get Premier League Fixtures) ```bash curl -X GET "https://openfootapi.com/v1/matches?competition=comp_premier_league_eng&status=scheduled" -H "Authorization: Bearer of_live_your_key_here" ``` ### Python (Fetch Live Romanian SuperLiga Standings) ```python import requests headers = {"Authorization": "Bearer of_live_your_key_here"} response = requests.get( "https://openfootapi.com/v1/standings", params={"competition": "comp_superliga_ro"}, headers=headers ) data = response.json()["data"] print("Leader:", data[0]["team"]["name"], "Points:", data[0]["points"]) ``` ### TypeScript / Node.js ```typescript const response = await fetch("https://openfootapi.com/v1/matches?competition=comp_bundesliga_de", { headers: { "Authorization": "Bearer of_live_your_key_here" } }); const { data } = await response.json(); console.log("Matches count:", data.length); ```