{
  "openapi": "3.1.0",
  "info": {
    "title": "GhostedByAI API",
    "description": "AI visibility scanner API. Measure how visible your brand is across ChatGPT, Perplexity, Gemini, and Claude.",
    "version": "1.0.0",
    "contact": {
      "name": "GhostedByAI",
      "url": "https://ghostedbyai.co"
    }
  },
  "servers": [
    {
      "url": "https://ghostedbyai.co/api",
      "description": "Production"
    }
  ],
  "paths": {
    "/scan": {
      "post": {
        "operationId": "scanBrand",
        "summary": "Scan a brand for AI visibility",
        "description": "Submit a URL to scan across ChatGPT, Perplexity, Gemini, and Claude. Returns a Ghost Score (0-100) with per-platform breakdown.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["url"],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The URL or brand website to scan",
                    "example": "https://notion.so"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scan initiated successfully"
          },
          "401": {
            "description": "Authentication required"
          }
        }
      }
    },
    "/agent-accessibility/scan": {
      "post": {
        "operationId": "agentReadinessScan",
        "summary": "Scan a website for AI agent readiness",
        "description": "Audit a website for agent readiness signals: robots.txt AI directives, llms.txt, structured data, semantic HTML, MCP discovery, and security headers.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["url"],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The URL to audit for agent readiness",
                    "example": "https://example.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Agent readiness audit results"
          }
        }
      }
    }
  }
}
