{
  "openapi": "3.1.0",
  "info": {
    "title": "AnswerPlume citation API",
    "version": "1.0.0",
    "description": "Read-only API over AnswerPlume's 10 published AI-search citation studies (CC BY 4.0). No key.",
    "license": {
      "name": "CC BY 4.0 (data)",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://answerplume.venturesites.workers.dev"
    }
  ],
  "paths": {
    "/api/v1/studies": {
      "get": {
        "operationId": "listStudies",
        "summary": "List studies",
        "responses": {
          "200": {
            "description": "Studies",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/v1/study": {
      "get": {
        "operationId": "getStudy",
        "summary": "One study summary",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Study",
            "content": {
              "application/json": {}
            }
          },
          "404": {
            "description": "Unknown slug"
          }
        }
      }
    },
    "/api/v1/domain": {
      "get": {
        "operationId": "lookupDomain",
        "summary": "Citations of a domain (substring match)",
        "parameters": [
          {
            "name": "d",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matches",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/v1/top": {
      "get": {
        "operationId": "topCitedDomains",
        "summary": "Most-cited domains",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top domains",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP Streamable HTTP endpoint (JSON-RPC 2.0)",
        "requestBody": {
          "content": {
            "application/json": {}
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          },
          "202": {
            "description": "Notification accepted"
          }
        }
      }
    }
  }
}