{
  "openapi": "3.1.0",
  "info": {
    "title": "FootballPulse API",
    "description": "Global football/soccer betting intelligence API — match previews, Asian handicap, live in-play intel, value bets, accumulators, league stats, player intelligence, corner/booking markets, clean sheet probability, and transfer watch. 50+ leagues across 6 continents. All endpoints require x402 payment (USDC on Base mainnet) via the PAYMENT-SIGNATURE header.",
    "version": "1.0.0",
    "contact": {
      "url": "https://footballpulse.vercel.app",
      "email": "info@theaslangroupllc.com"
    }
  },
  "servers": [
    {
      "url": "https://footballpulse.vercel.app"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 micropayment signature. USDC on Base mainnet. Send request without header to receive 402 with payment requirements."
      }
    }
  },
  "security": [{ "x402": [] }],
  "paths": {
    "/api/match-preview": {
      "get": {
        "summary": "Match preview \u2014 team form, H2H, injuries, xG comparison, key battles, predicted score, and primary bet",
        "operationId": "matchPreview",
        "parameters": [
          { "name": "home", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "away", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "league", "in": "query", "schema": { "type": "string" } },
          { "name": "date", "in": "query", "schema": { "type": "string", "format": "date" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Match preview with betting angles" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "150000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/asian-handicap", "/api/corner-cards", "/api/clean-sheet", "/api/value-bets"] }
      }
    },
    "/api/value-bets": {
      "get": {
        "summary": "Value bets \u2014 EV analysis across 1X2, BTTS, over/under 2.5, and Asian handicap for any matchday",
        "operationId": "valueBets",
        "parameters": [
          { "name": "league", "in": "query", "required": true, "schema": { "type": "string" }, "description": "e.g. PL, PD, BL1, SA, FL1, CL" },
          { "name": "date", "in": "query", "schema": { "type": "string", "format": "date" } },
          { "name": "market", "in": "query", "schema": { "type": "string", "enum": ["all", "btts", "goals", "result", "handicap"], "default": "all" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Value bets with EV ratings" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "150000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/match-preview", "/api/accumulator", "/api/asian-handicap"] }
      }
    },
    "/api/asian-handicap": {
      "get": {
        "summary": "Asian handicap \u2014 quarter/half-ball line selection, Pinnacle/Macau intelligence, sharp money indicators",
        "operationId": "asianHandicap",
        "parameters": [
          { "name": "home", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "away", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "line", "in": "query", "schema": { "type": "string" }, "description": "e.g. -0.5, +1.5, -1.75" },
          { "name": "league", "in": "query", "schema": { "type": "string" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Asian handicap analysis" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "150000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/match-preview", "/api/value-bets"] }
      }
    },
    "/api/live-intel": {
      "get": {
        "summary": "Live in-play intelligence \u2014 momentum, xG trajectory, dangerous attacks, substitution impact, in-play bets",
        "operationId": "liveIntel",
        "parameters": [
          { "name": "home", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "away", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "minute", "in": "query", "schema": { "type": "integer" } },
          { "name": "score", "in": "query", "schema": { "type": "string" }, "description": "e.g. 1-0" },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Live match intelligence" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "150000", "asset": "USDC", "network": "eip155:8453" }
      }
    },
    "/api/accumulator": {
      "get": {
        "summary": "Accumulator builder \u2014 evidence-based multi-match parlay with EV analysis, banker pick, stake guide",
        "operationId": "accumulator",
        "parameters": [
          { "name": "leagues", "in": "query", "schema": { "type": "string", "default": "PL,PD,BL1,SA,FL1" } },
          { "name": "date", "in": "query", "schema": { "type": "string", "format": "date" } },
          { "name": "strategy", "in": "query", "schema": { "type": "string", "enum": ["value", "safe", "btts", "goals", "mixed"], "default": "value" } },
          { "name": "max_legs", "in": "query", "schema": { "type": "integer", "minimum": 2, "maximum": 8, "default": 5 } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Accumulator selections with combined odds" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "150000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/value-bets", "/api/match-preview"] }
      }
    },
    "/api/league-pulse": {
      "get": {
        "summary": "League intelligence \u2014 standings, top scorers, over/under rates, BTTS rates, betting angles",
        "operationId": "leaguePulse",
        "parameters": [
          { "name": "league", "in": "query", "required": true, "schema": { "type": "string" }, "description": "e.g. PL, PD, BL1, SA, FL1, CL, DED, PPL, BSA" },
          { "name": "season", "in": "query", "schema": { "type": "string" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "League stats and betting trends" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "100000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/value-bets", "/api/match-preview"] }
      }
    },
    "/api/player-intel": {
      "get": {
        "summary": "Player intelligence \u2014 goals, assists, xG, injury status, market value, FPL value, card risk",
        "operationId": "playerIntel",
        "parameters": [
          { "name": "player", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "team", "in": "query", "schema": { "type": "string" } },
          { "name": "league", "in": "query", "schema": { "type": "string" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Player profile with betting and fantasy value" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "100000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/match-preview", "/api/corner-cards"] }
      }
    },
    "/api/corner-cards": {
      "get": {
        "summary": "Specialty markets \u2014 corner statistics, booking points, referee tendencies, over/under probability",
        "operationId": "cornerCards",
        "parameters": [
          { "name": "home", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "away", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "referee", "in": "query", "schema": { "type": "string" } },
          { "name": "competition", "in": "query", "schema": { "type": "string" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Corner and booking point analysis" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "100000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/match-preview", "/api/player-intel"] }
      }
    },
    "/api/clean-sheet": {
      "get": {
        "summary": "Clean sheet probability \u2014 GK stats, defensive metrics, BTTS probability, under 2.5 market analysis",
        "operationId": "cleanSheet",
        "parameters": [
          { "name": "team", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "league", "in": "query", "schema": { "type": "string" } },
          { "name": "home_away", "in": "query", "schema": { "type": "string", "enum": ["home", "away", "both"], "default": "both" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Clean sheet probability with market analysis" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "100000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/match-preview", "/api/value-bets"] }
      }
    },
    "/api/transfer-watch": {
      "get": {
        "summary": "Transfer market intelligence \u2014 rumours with credibility ratings, squad impact, market valuations",
        "operationId": "transferWatch",
        "parameters": [
          { "name": "team", "in": "query", "schema": { "type": "string" } },
          { "name": "player", "in": "query", "schema": { "type": "string" } },
          { "name": "league", "in": "query", "schema": { "type": "string" } },
          { "name": "window", "in": "query", "schema": { "type": "string", "enum": ["summer", "winter", "current"], "default": "current" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "default": "en" } }
        ],
        "responses": { "200": { "description": "Transfer intelligence with credibility ratings" }, "402": { "description": "x402 payment required" } },
        "x-payment": { "amount": "100000", "asset": "USDC", "network": "eip155:8453" },
        "x-agent-chaining": { "next_endpoints": ["/api/player-intel", "/api/league-pulse"] }
      }
    }
  }
}
