{
 "openapi": "3.0.3",
 "info": {
  "title": "Football Charts API",
  "version": "1",
  "description": "Football (soccer) data for 98 leagues in 44 countries, including the lower divisions most sources skip and five women's leagues: league tables (classic, expected points, goals), results with half-time scores and first-goal minutes, fixtures with the model's probabilities (1X2, over/under, both teams to score, expected goals), Monte Carlo season projections (10,000 simulations), goal timing and team pages. All dates and times are UTC. Every answer carries `source_url`, the football-charts.com page with the same data, and asks for the credit \"Data by football-charts.com\". Statistics, not betting advice: the model is a calibrated Dixon-Coles baseline that does not beat the betting market.\n\n**Access.** No key: 25/day and 20/min per IP. Free key (`POST /keys/register/`): 200/day per email address once the address is confirmed with the link in the key email (100/day until then), 60/min, current and previous season, personal use. Paid plans: Personal (€9/month, 5,000/day) and Commercial (€39/month, 25,000/day, for apps, sites, bots and channels), every season back to 2020 and per-match statistics (xG where the provider has it, shots, passes, possession, corners, cards, saves): https://www.football-charts.com/developers#pricing . Send the key as `Authorization: Bearer <key>` or `X-API-Key: <key>`.",
  "contact": {
   "name": "Football Charts",
   "email": "contact@football-charts.com",
   "url": "https://www.football-charts.com/developers"
  },
  "termsOfService": "https://www.football-charts.com/terms"
 },
 "servers": [
  {
   "url": "https://api.football-charts.com/api/v1"
  }
 ],
 "tags": [
  {
   "name": "Leagues"
  },
  {
   "name": "Teams"
  },
  {
   "name": "Matches"
  },
  {
   "name": "Model"
  },
  {
   "name": "Keys"
  }
 ],
 "paths": {
  "/leagues/": {
   "get": {
    "operationId": "listLeagues",
    "summary": "List leagues",
    "description": "Every covered league: key, name, country and the seasons held.",
    "tags": [
     "Leagues"
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "leagues": [
          {
           "league": "premier",
           "name": "Premier League",
           "country": "England",
           "seasons": [
            "2026-2027",
            "2025-2026"
           ],
           "url": "https://www.football-charts.com/leagues/england/premier-league?ref=api"
          },
          {
           "league": "brazil1",
           "name": "Serie A Betano",
           "country": "Brazil",
           "seasons": [
            "2026",
            "2025"
           ],
           "url": "https://www.football-charts.com/leagues/brazil/serie-a-betano?ref=api"
          }
         ],
         "count": 98,
         "season_window": "current + previous season (free tier)",
         "source_url": "https://www.football-charts.com/leagues?ref=api",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/leagues/{league}/table/": {
   "get": {
    "operationId": "getLeagueTable",
    "summary": "League table",
    "description": "Standings. `view=luck` adds expected points and position, `view=goals` goal records.",
    "tags": [
     "Leagues"
    ],
    "parameters": [
     {
      "name": "league",
      "in": "path",
      "description": "League key from `/leagues/` (premier, cha, spain1, brazil1, ...).",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "premier"
     },
     {
      "name": "season",
      "in": "query",
      "description": "Season string: \"2026-2027\" for autumn-spring leagues, \"2026\" for calendar-year leagues. Default: the latest season with data.",
      "required": false,
      "schema": {
       "type": "string"
      },
      "example": "2026-2027"
     },
     {
      "name": "view",
      "in": "query",
      "description": "classic (default), luck or goals.",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "classic",
        "luck",
        "goals"
       ]
      },
      "example": "classic"
     },
     {
      "name": "format",
      "in": "query",
      "description": "`csv` answers a CSV file instead of JSON. Needs a key (a free key: current and previous season; a paid plan: every season, with the per-match statistics as columns on results).",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "csv"
       ]
      },
      "example": "csv"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "league": "premier",
         "season": "2026-2027",
         "view": "classic",
         "season_state": "in_season",
         "current_season": "2026-2027",
         "table": [
          {
           "team": "Arsenal",
           "position": 1,
           "played": 10,
           "won": 9,
           "drawn": 0,
           "lost": 1,
           "goals_for": 15,
           "goals_against": 5,
           "goal_difference": 10,
           "points": 27,
           "last_5_form": "WWWWW",
           "expected_points": 21.14,
           "luck_difference": 5.86,
           "expected_position": 1,
           "avg_goals_scored": 1.5,
           "avg_goals_conceded": 0.5
          }
         ],
         "source_url": "https://www.football-charts.com/leagues/england/premier-league?ref=api",
         "csv_download_page": "https://www.football-charts.com/rankings/england/premier-league/2026-2027/classic?ref=api-csv",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "400": {
      "description": "Unknown season for this league (the message names the seasons held).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Season outside the plan (`season_gated`) or key disabled.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Unknown league, team or match.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/leagues/{league}/results/": {
   "get": {
    "operationId": "getResults",
    "summary": "Results",
    "description": "Finished matches: full-time and half-time score, first-goal minute, kickoff in UTC. Paid plans also get `stats` per match: xG (where the provider has it), shots, passes, possession, corners, offsides, fouls, cards and saves for each side; `null` where none are held.",
    "tags": [
     "Leagues"
    ],
    "parameters": [
     {
      "name": "league",
      "in": "path",
      "description": "League key from `/leagues/` (premier, cha, spain1, brazil1, ...).",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "premier"
     },
     {
      "name": "season",
      "in": "query",
      "description": "Season string: \"2026-2027\" for autumn-spring leagues, \"2026\" for calendar-year leagues. Default: the latest season with data.",
      "required": false,
      "schema": {
       "type": "string"
      },
      "example": "2026-2027"
     },
     {
      "name": "team",
      "in": "query",
      "description": "Only matches of teams whose name contains this text.",
      "required": false,
      "schema": {
       "type": "string"
      },
      "example": "arsenal"
     },
     {
      "name": "format",
      "in": "query",
      "description": "`csv` answers a CSV file instead of JSON. Needs a key (a free key: current and previous season; a paid plan: every season, with the per-match statistics as columns on results).",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "csv"
       ]
      },
      "example": "csv"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "league": "premier",
         "season": "2026-2027",
         "season_state": "in_season",
         "current_season": "2026-2027",
         "count": 1,
         "matches": [
          {
           "id": 216791,
           "date": "2026-08-21",
           "time": "19:00:00",
           "kickoff_utc": "2026-08-21T19:00:00Z",
           "homeTeam": "Arsenal",
           "awayTeam": "Coventry",
           "score": "3:0",
           "ht_result": "2:0",
           "first_goal_time": 15,
           "first_goal_time_extra": 0,
           "goalless": false,
           "stage": "league",
           "stats": {
            "home": {
             "xg": 2.31,
             "shots": 17,
             "shots_on_target": 7,
             "possession_pct": 61,
             "passes": 548,
             "corners": 8,
             "yellow_cards": 1,
             "saves": 1
            },
            "away": {
             "xg": 0.42,
             "shots": 6,
             "shots_on_target": 1,
             "possession_pct": 39,
             "passes": 351,
             "corners": 2,
             "yellow_cards": 3,
             "saves": 4
            }
           }
          }
         ],
         "source_url": "https://www.football-charts.com/leagues/england/premier-league?ref=api",
         "csv_download_page": "https://www.football-charts.com/rankings/england/premier-league/2026-2027/classic?ref=api-csv",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "400": {
      "description": "Unknown season for this league (the message names the seasons held).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Season outside the plan (`season_gated`) or key disabled.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Unknown league, team or match.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/leagues/{league}/fixtures/": {
   "get": {
    "operationId": "getFixtures",
    "summary": "Fixtures with model probabilities",
    "description": "Matches in the next few days with the model's probabilities: home, draw, away, over/under lines, both teams to score, expected goals. Bookmaker odds are never included.",
    "tags": [
     "Leagues"
    ],
    "parameters": [
     {
      "name": "league",
      "in": "path",
      "description": "League key from `/leagues/` (premier, cha, spain1, brazil1, ...).",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "premier"
     },
     {
      "name": "format",
      "in": "query",
      "description": "`csv` answers a CSV file instead of JSON. Needs a key (a free key: current and previous season; a paid plan: every season, with the per-match statistics as columns on results).",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "csv"
       ]
      },
      "example": "csv"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "league": "brazil1",
         "count": 1,
         "matches": [
          {
           "slug": "brazil/serie-a-betano/2026-11-14-mirassol-vs-atletico-mg",
           "home_team": "Mirassol",
           "away_team": "Atletico-MG",
           "match_date": "2026-11-14",
           "time": "21:30",
           "status": "scheduled",
           "league": "brazil1",
           "country": "Brazil",
           "model_predictions": {
            "dc_base": {
             "model": "dc_v2.0",
             "raw": {
              "home": 0.459,
              "away": 0.2653,
              "btts_yes": 0.4974,
              "over_2.5": 0.4498,
              "expected_home_goals": 1.4414,
              "expected_away_goals": 1.0338
             }
            }
           }
          }
         ],
         "source_url": "https://www.football-charts.com/leagues/brazil/serie-a-betano?ref=api",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Unknown league, team or match.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/leagues/{league}/projection/": {
   "get": {
    "operationId": "getSeasonProjection",
    "summary": "Season projection",
    "description": "Monte Carlo projection of the final table (10,000 simulations of the remaining fixtures): mean points, the 10-90 % range, title, top-4 and relegation chances.",
    "tags": [
     "Leagues"
    ],
    "parameters": [
     {
      "name": "league",
      "in": "path",
      "description": "League key from `/leagues/` (premier, cha, spain1, brazil1, ...).",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "premier"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "projection": {
          "league": "premier",
          "season": "2026-2027",
          "run_date": "2026-11-09",
          "n_sims": 10000,
          "scheduled_remaining": 280,
          "teams": {
           "Arsenal": {
            "pts_now": 27,
            "played": 10,
            "mean_pts": 84.1,
            "p10_pts": 76,
            "p90_pts": 92,
            "title": 0.7979,
            "top4": 0.9991,
            "bottom3": 0.0
           }
          }
         },
         "source_url": "https://www.football-charts.com/leagues/england/premier-league/projection?ref=api",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Unknown league, team or match.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/leagues/{league}/goal-timing/": {
   "get": {
    "operationId": "getGoalTiming",
    "summary": "Goal timing",
    "description": "When each team scores and concedes, in 15-minute bins.",
    "tags": [
     "Leagues"
    ],
    "parameters": [
     {
      "name": "league",
      "in": "path",
      "description": "League key from `/leagues/` (premier, cha, spain1, brazil1, ...).",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "premier"
     },
     {
      "name": "season",
      "in": "query",
      "description": "Season string: \"2026-2027\" for autumn-spring leagues, \"2026\" for calendar-year leagues. Default: the latest season with data.",
      "required": false,
      "schema": {
       "type": "string"
      },
      "example": "2026-2027"
     },
     {
      "name": "team",
      "in": "query",
      "description": "Only matches of teams whose name contains this text.",
      "required": false,
      "schema": {
       "type": "string"
      },
      "example": "arsenal"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "league": "premier",
         "season": "2026-2027",
         "time_bins": [
          "0-15",
          "15-30",
          "30-45",
          "45+",
          "46-60",
          "60-75",
          "75-90",
          "90+"
         ],
         "stats": {
          "total_goals": 273,
          "most_active_period": "46-60",
          "late_goals": 59,
          "match_count": 100
         },
         "data": [
          {
           "team": "Brighton",
           "total": 26,
           "late_share_pct": 19,
           "first_half_pct": 54
          }
         ],
         "source_url": "https://www.football-charts.com/charts/england/premier-league?ref=api",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "400": {
      "description": "Unknown season for this league (the message names the seasons held).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Season outside the plan (`season_gated`) or key disabled.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Unknown league, team or match.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/leagues/{league}/teams/": {
   "get": {
    "operationId": "listLeagueTeams",
    "summary": "Teams",
    "description": "The league's teams with their slugs for `/teams/{team}/`.",
    "tags": [
     "Teams"
    ],
    "parameters": [
     {
      "name": "league",
      "in": "path",
      "description": "League key from `/leagues/` (premier, cha, spain1, brazil1, ...).",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "premier"
     },
     {
      "name": "season",
      "in": "query",
      "description": "Season string: \"2026-2027\" for autumn-spring leagues, \"2026\" for calendar-year leagues. Default: the latest season with data.",
      "required": false,
      "schema": {
       "type": "string"
      },
      "example": "2026-2027"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "league": "premier",
         "season": "2026-2027",
         "teams": [
          {
           "team": "Arsenal",
           "slug": "arsenal",
           "position": 1,
           "points": 27,
           "played": 10
          }
         ],
         "source_url": "https://www.football-charts.com/leagues/england/premier-league?ref=api",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "400": {
      "description": "Unknown season for this league (the message names the seasons held).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Season outside the plan (`season_gated`) or key disabled.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Unknown league, team or match.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/leagues/{league}/teams/{team}/": {
   "get": {
    "operationId": "getTeam",
    "summary": "Team",
    "description": "One team's season: table row, matches, goal timing and season averages (shots, possession, corners, xG where held).",
    "tags": [
     "Teams"
    ],
    "parameters": [
     {
      "name": "league",
      "in": "path",
      "description": "League key from `/leagues/` (premier, cha, spain1, brazil1, ...).",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "premier"
     },
     {
      "name": "team",
      "in": "path",
      "description": "Team slug from `/leagues/{league}/teams/`.",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "arsenal"
     },
     {
      "name": "season",
      "in": "query",
      "description": "Season string: \"2026-2027\" for autumn-spring leagues, \"2026\" for calendar-year leagues. Default: the latest season with data.",
      "required": false,
      "schema": {
       "type": "string"
      },
      "example": "2026-2027"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "team": "Arsenal",
         "slug": "arsenal",
         "league": "premier",
         "season": "2026-2027",
         "stats": {
          "matches_with_stats": 10,
          "shots_avg": 13.8,
          "shots_on_target_avg": 4.8,
          "possession_avg": 59.8,
          "corners_avg": 5.7,
          "xg_avg": 1.65,
          "xg_against_avg": 0.72
         },
         "matches": [
          {
           "date": "2026-08-21",
           "home": "Arsenal",
           "away": "Coventry",
           "venue": "H",
           "score": "3:0",
           "ht": "2:0",
           "first_goal_time": "15",
           "outcome": "W"
          }
         ],
         "source_url": "https://www.football-charts.com/leagues/england/premier-league/teams/arsenal?ref=api",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "400": {
      "description": "Unknown season for this league (the message names the seasons held).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Season outside the plan (`season_gated`) or key disabled.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Unknown league, team or match.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/matches/{country}/{competition}/{match}/": {
   "get": {
    "operationId": "getMatch",
    "summary": "Match",
    "description": "One upcoming or finished match with the model's probabilities across markets. The three parts are the `slug` of a fixture, split at its slashes.",
    "tags": [
     "Matches"
    ],
    "parameters": [
     {
      "name": "country",
      "in": "path",
      "description": "First part of the fixture slug.",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "brazil"
     },
     {
      "name": "competition",
      "in": "path",
      "description": "Second part of the fixture slug.",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "serie-a-betano"
     },
     {
      "name": "match",
      "in": "path",
      "description": "Last part of the fixture slug.",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "2026-11-14-mirassol-vs-atletico-mg"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "match": {
          "slug": "brazil/serie-a-betano/2026-11-14-mirassol-vs-atletico-mg",
          "home_team": "Mirassol",
          "away_team": "Atletico-MG",
          "match_date": "2026-11-14",
          "time": "21:30:00",
          "match_status": "scheduled",
          "model_predictions": {
           "dc_base": {
            "raw": {
             "home": 0.459,
             "away": 0.2653,
             "over_2.5": 0.4498
            }
           }
          }
         },
         "source_url": "https://www.football-charts.com/predictions/brazil/serie-a-betano/2026-11-14-mirassol-vs-atletico-mg?ref=api",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Unknown league, team or match.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/track-record/": {
   "get": {
    "operationId": "getTrackRecord",
    "summary": "Model track record",
    "description": "Every published prediction, settled: hit rates by market, losses included.",
    "tags": [
     "Model"
    ],
    "parameters": [
     {
      "name": "days",
      "in": "query",
      "description": "Window in days (default 90).",
      "required": false,
      "schema": {
       "type": "integer"
      },
      "example": "90"
     },
     {
      "name": "signals_only",
      "in": "query",
      "description": "1 (default): published signals only; 0: every settled prediction.",
      "required": false,
      "schema": {
       "type": "integer",
       "enum": [
        0,
        1
       ]
      },
      "example": "1"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "track_record": {
          "summary": {
           "n": 9181,
           "won": 3964,
           "lost": 5118,
           "void": 99,
           "hit_rate": 0.4365
          },
          "by_market": {
           "ft_ou_25": {
            "n": 2050,
            "won": 887,
            "lost": 1138,
            "void": 25,
            "hit_rate": 0.438
           }
          }
         },
         "source_url": "https://www.football-charts.com/track-record?ref=api",
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/keys/register/": {
   "post": {
    "operationId": "registerKey",
    "summary": "Get a free key",
    "tags": [
     "Keys"
    ],
    "security": [
     {}
    ],
    "description": "Returns a key at once. It works at 100 requests/day until the address is confirmed with the link in the key email, then 200/day (all keys of one address together). Up to three keys per address.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "email"
        ],
        "properties": {
         "email": {
          "type": "string",
          "format": "email"
         },
         "use": {
          "type": "string",
          "enum": [
           "model",
           "product",
           "research",
           "trying"
          ]
         }
        }
       },
       "example": {
        "email": "you@example.com",
        "use": "model"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Key created",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "key": "fc_...",
         "tier": "free",
         "daily_limit": 100,
         "confirm_required": true,
         "confirmed_daily_limit": 200,
         "emailed": true,
         "note": "We emailed you the key and a link that confirms your address ..."
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/keys/resend/": {
   "post": {
    "operationId": "resendKeys",
    "summary": "Email an address its keys",
    "tags": [
     "Keys"
    ],
    "security": [
     {}
    ],
    "description": "Emails the address its active keys (and a fresh confirmation link while unconfirmed). Never returns a key.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "email"
        ],
        "properties": {
         "email": {
          "type": "string",
          "format": "email"
         }
        }
       },
       "example": {
        "email": "you@example.com"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Sent if the address has keys",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "ok": true,
         "note": "If this address has API keys, we have emailed them to it."
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/keys/status/": {
   "get": {
    "operationId": "getKeyStatus",
    "summary": "Check key tier and daily limit",
    "tags": [
     "Keys"
    ],
    "description": "Returns whether a key is free or paid (`has_paid_access`) and its effective daily request limit without consuming daily quota.",
    "responses": {
     "200": {
      "description": "Key status",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "valid": true,
         "tier": "free",
         "has_paid_access": false,
         "daily_limit": 200,
         "email_confirmed": true,
         "attribution": "Data by football-charts.com"
        }
       }
      }
     },
     "401": {
      "description": "API key not recognised.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Season outside the plan (`season_gated`) or key disabled.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily or per-minute limit reached (`Retry-After` says when it resets).",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Error": {
    "type": "object",
    "properties": {
     "error": {
      "type": "object",
      "properties": {
       "code": {
        "type": "string"
       },
       "message": {
        "type": "string"
       }
      }
     }
    }
   }
  },
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "Free or paid key (fc_...). Optional: without one, the keyless limits apply."
   },
   "apiKeyHeader": {
    "type": "apiKey",
    "in": "header",
    "name": "X-API-Key"
   }
  }
 },
 "security": [
  {},
  {
   "bearer": []
  },
  {
   "apiKeyHeader": []
  }
 ]
}