{
  "openapi": "3.1.0",
  "info": {
    "title": "FootballAPI — Global Football Scores, Fixtures, Standings, Lineups & xG Telemetry API",
    "version": "1.1.0",
    "description": "Real-time global football scores, fixtures, league standings, starting XI lineups, formations, key events, team rosters, and Expected Goals (xG) match telemetry across Premier League, Champions League, LaLiga, Serie A, Bundesliga, Ligue 1, MLS & 50+ competitions. Pure sports analytics JSON with $0.15/1K Starter pricing, 3,000 Free Credits on sign-up, Remote MCP Server (OAuth 2.1), and keyless Base Mainnet USDC x402 micropayments ($0.002/call).",
    "contact": {
      "name": "FootballAPI Support",
      "email": "support@footballapi.dev",
      "url": "https://footballapi.dev/docs"
    }
  },
  "servers": [
    {
      "url": "https://api.footballapi.dev",
      "description": "Production Global Football Telemetry Gateway"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your FootballAPI key (fb_live_...). Claim 3,000 Free Credits at https://footballapi.dev/signup"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Pass fb_live_... API key or OAuth 2.1 mcp_at_... token."
      }
    }
  },
  "paths": {
    "/v1/matches/live": {
      "get": {
        "operationId": "getLiveMatches",
        "summary": "Live Football Scores & Match xG Telemetry",
        "description": "Returns real-time football scores, match clocks, possession %, shots, shots on target, corners, cards, and Expected Goals (xG) telemetry across Premier League, Champions League, LaLiga, Serie A, Bundesliga, Ligue 1, MLS & 50+ leagues. Cost: 2 Credits / match returned (0 Credits if empty).",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "epl"
            },
            "description": "League code: epl, ucl, laliga, seriea, bundesliga, ligue1, mls, eredivisie, libertadores, europa, worldcup, or all."
          },
          {
            "name": "live_only",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "When true, returns strictly currently in-play matches only."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            },
            "description": "Maximum matches to return."
          }
        ],
        "responses": {
          "200": {
            "description": "Live scores and matchday telemetry payload",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://footballapi.dev",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "league": "epl",
                    "date": null,
                    "live_count": 1,
                    "matchday_fallback": false,
                    "count": 1,
                    "matches": [
                      {
                        "match_id": "401878758",
                        "league": "epl",
                        "league_name": "English Premier League",
                        "season": 2026,
                        "kickoff_utc": "2026-11-07T15:00Z",
                        "status": "finished",
                        "status_detail": "FT",
                        "minute": "FT",
                        "venue": {
                          "name": "Elland Road",
                          "city": "Leeds",
                          "country": "England"
                        },
                        "home_team": {
                          "team_id": "357",
                          "name": "Leeds United",
                          "short_name": "Leeds",
                          "abbreviation": "LEE",
                          "score": 1,
                          "winner": true
                        },
                        "away_team": {
                          "team_id": "367",
                          "name": "Tottenham Hotspur",
                          "short_name": "Tottenham",
                          "abbreviation": "TOT",
                          "score": 0,
                          "winner": false
                        },
                        "telemetry": {
                          "home": {
                            "possession_pct": 39.2,
                            "shots": 16,
                            "shots_on_target": 4,
                            "corners": 6,
                            "fouls": 11,
                            "yellow_cards": 2,
                            "red_cards": 0,
                            "xg": 1.96
                          },
                          "away": {
                            "possession_pct": 60.8,
                            "shots": 11,
                            "shots_on_target": 3,
                            "corners": 5,
                            "fouls": 9,
                            "yellow_cards": 1,
                            "red_cards": 0,
                            "xg": 1.43
                          },
                          "xg_model": "shot_telemetry_v1"
                        }
                      }
                    ]
                  },
                  "meta": {
                    "endpoint": "/v1/matches/live",
                    "credits_per_item": 2,
                    "credits_charged": 2,
                    "cached": false,
                    "took_ms": 48
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/matches/fixtures": {
      "get": {
        "operationId": "getFixtures",
        "summary": "Global Football Fixtures, Schedules & Matchday Results",
        "description": "Retrieve football fixtures, kickoff UTC timestamps, stadium venues, final scores, and match statistics by league and optional date (YYYYMMDD). Cost: 2 Credits / fixture returned.",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "ucl"
            },
            "description": "League code (epl, ucl, laliga, seriea, bundesliga, ligue1, mls, eredivisie, libertadores, all)."
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "20261107"
            },
            "description": "Optional match date formatted as YYYYMMDD or YYYY-MM-DD."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized fixtures and results payload",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://footballapi.dev",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "league": "ucl",
                    "date": null,
                    "live_count": 0,
                    "count": 1,
                    "matches": [
                      {
                        "match_id": "401915378",
                        "league": "ucl",
                        "league_name": "UEFA Champions League",
                        "status": "finished",
                        "minute": "FT",
                        "home_team": {
                          "team_id": "21000",
                          "name": "Sabah FK",
                          "abbreviation": "SAB",
                          "score": 1
                        },
                        "away_team": {
                          "team_id": "83",
                          "name": "Barcelona",
                          "abbreviation": "BAR",
                          "score": 4
                        },
                        "telemetry": {
                          "home": {
                            "possession_pct": 28.6,
                            "shots": 8,
                            "shots_on_target": 3,
                            "corners": 4,
                            "xg": 1.24
                          },
                          "away": {
                            "possession_pct": 71.4,
                            "shots": 21,
                            "shots_on_target": 13,
                            "corners": 8,
                            "xg": 4.4
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/leagues/standings": {
      "get": {
        "operationId": "getLeagueStandings",
        "summary": "League Standings Table & Qualification Zones",
        "description": "Retrieve full league standings table with rank, played, won, drawn, lost, goals for/against, goal difference, points, points per game, and qualification zones. Cost: 2 Credits / call.",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "epl"
            },
            "description": "League code (epl, ucl, laliga, seriea, bundesliga, ligue1, mls, eredivisie, libertadores)."
          },
          {
            "name": "season",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2026"
            },
            "description": "Optional 4-digit season year."
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized league standings table",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://footballapi.dev",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "league": "epl",
                    "league_name": "English Premier League",
                    "country": "England",
                    "season": "2026-27 English Premier League",
                    "count": 20,
                    "standings": [
                      {
                        "rank": 1,
                        "team_id": "359",
                        "team_name": "Arsenal",
                        "abbreviation": "ARS",
                        "played": 11,
                        "won": 9,
                        "drawn": 1,
                        "lost": 1,
                        "goals_for": 17,
                        "goals_against": 7,
                        "goal_difference": 10,
                        "points": 28,
                        "points_per_game": 2.55,
                        "qualification_zone": "UEFA Champions League"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/matches/detail": {
      "get": {
        "operationId": "getMatchDetail",
        "summary": "Match Detail, Starting XI Formations, Key Events & xG Telemetry",
        "description": "Fetch complete match telemetry dossier by match_id: starting XI lineups, tactical formations, substitutes, goals/cards/VAR key events, play-by-play commentary, possession %, shots, passes, and Expected Goals (xG). Cost: 10 Credits / call.",
        "parameters": [
          {
            "name": "match_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "401878758"
            },
            "description": "Numeric match_id from /v1/matches/live or /v1/matches/fixtures."
          },
          {
            "name": "league",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "epl"
            },
            "description": "Optional league hint."
          }
        ],
        "responses": {
          "200": {
            "description": "Complete tactical match detail dossier",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://footballapi.dev",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "match_id": "401878758",
                    "league": "epl",
                    "league_name": "English Premier League",
                    "status": "finished",
                    "minute": "FT",
                    "home_team": {
                      "team_id": "357",
                      "name": "Leeds United",
                      "score": 1
                    },
                    "away_team": {
                      "team_id": "367",
                      "name": "Tottenham Hotspur",
                      "score": 0
                    },
                    "telemetry": {
                      "home": {
                        "possession_pct": 39.2,
                        "shots": 16,
                        "shots_on_target": 4,
                        "corners": 6,
                        "xg": 1.96
                      },
                      "away": {
                        "possession_pct": 60.8,
                        "shots": 11,
                        "shots_on_target": 3,
                        "corners": 5,
                        "xg": 1.43
                      },
                      "xg_model": "shot_telemetry_v1"
                    },
                    "lineups": {
                      "home": {
                        "team_id": "357",
                        "team_name": "Leeds United",
                        "formation": "3-4-2-1",
                        "starters": [],
                        "substitutes": []
                      },
                      "away": {
                        "team_id": "367",
                        "team_name": "Tottenham Hotspur",
                        "formation": "4-2-3-1",
                        "starters": [],
                        "substitutes": []
                      }
                    },
                    "key_events": [
                      {
                        "minute": "1'",
                        "type": "Kickoff",
                        "scoring_play": false,
                        "text": "First Half begins."
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/teams/roster": {
      "get": {
        "operationId": "getTeamRoster",
        "summary": "Club Squad Roster, Positions & Season Stats",
        "description": "Retrieve full club squad roster by numeric team_id or club name with jersey numbers, positions, age, height/weight, nationality, appearances, goals, assists, and cards. Cost: 2 Credits / call.",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "epl"
            },
            "description": "League code (epl, ucl, laliga, seriea, bundesliga, ligue1, mls)."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "359"
            },
            "description": "Numeric club ID (e.g. 359 for Arsenal) or club name (e.g. Arsenal)."
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized club squad roster",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://footballapi.dev",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "league": "epl",
                    "league_name": "English Premier League",
                    "season": "2026-27 English Premier League",
                    "team": {
                      "team_id": "359",
                      "name": "Arsenal",
                      "abbreviation": "ARS",
                      "coach": "Mikel Arteta"
                    },
                    "squad_count": 25,
                    "players": [
                      {
                        "player_id": "256847",
                        "name": "Bukayo Saka",
                        "jersey": "7",
                        "position": "Forward",
                        "position_abbr": "F",
                        "appearances": 11,
                        "goals": 5,
                        "assists": 4
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}