{
  "openapi": "3.1.0",
  "info": {
    "title": "AEO Auditor — AI Search, Schema AST & Agent Readiness API",
    "version": "2.0.0",
    "description": "Edge API and MCP Server for auditing website Answer Engine Optimization (AEO), Generative Engine Optimization (GEO), JSON-LD Schema Graphs, and AI Crawler Readiness."
  },
  "x-service-info": {
    "categories": [
      "seo",
      "aeo",
      "developer-tools",
      "ai-agents"
    ],
    "provider": "AEO Auditor (CodeWays)",
    "homepage": "https://aeoauditing.com",
    "mcpEndpoint": "https://api.aeoauditing.com/mcp"
  },
  "servers": [
    {
      "url": "https://api.aeoauditing.com",
      "description": "Production Cloudflare V8 Edge API"
    }
  ],
  "paths": {
    "/api/audit/scan": {
      "post": {
        "operationId": "auditDomain",
        "summary": "Run a live 4-pillar AEO & GEO diagnostic scan on any URL",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Domain or URL to audit"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Audit scorecard and 4-pillar diagnostic report"
          }
        }
      }
    },
    "/api/billing/create-checkout-session": {
      "post": {
        "operationId": "createRemediationCheckoutSession",
        "summary": "Create a Stripe checkout session for the $2 Single-Domain Fix Kit, $5/mo Pro Plan, or $15/mo Agency Suite",
        "x-payment-info": {
          "intent": "session",
          "method": "stripe",
          "amount": "2.00",
          "currency": "USD",
          "description": "Unlock 24-Hour Single-Domain Deep AI Corpus & Competitor Outrank Kit ($2.00 USD one-time)"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tier"
                ],
                "properties": {
                  "tier": {
                    "type": "string",
                    "enum": [
                      "single",
                      "pro",
                      "agency"
                    ]
                  },
                  "targetDomain": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stripe Checkout session URL"
          }
        }
      }
    },
    "/api/pseo/directory": {
      "get": {
        "operationId": "getBenchmarkDirectory",
        "summary": "List audited industry benchmark domains and AEO scores",
        "responses": {
          "200": {
            "description": "Directory leaderboard response"
          }
        }
      }
    }
  }
}