{
  "openapi": "3.1.0",
  "info": {
    "title": "QuantaFeed Post-Quantum Cryptography Scanner API",
    "version": "0.1.0",
    "description": "Free, read-only public API for auditing TLS 1.3 RFC 10024 ML-KEM key exchange, hidden subdomains, DNSSEC/MTA-STS/DKIM, SaaS vendor endpoints, GitHub SSH keys, and public repositories against NSA Advisory PP-26-4956 (Dec 2, 2026).",
    "contact": {
      "url": "https://github.com/harsh-mr/check-vuln-in-keys"
    },
    "license": {
      "name": "MIT",
      "url": "https://github.com/harsh-mr/check-vuln-in-keys/blob/main/LICENSE"
    }
  },
  "servers": [
    {
      "url": "https://www.quantafeed.com",
      "description": "Production QuantaFeed API"
    }
  ],
  "paths": {
    "/api/scan/domain": {
      "get": {
        "operationId": "scanDomain",
        "summary": "Run a full Post-Quantum Cryptography & NSA PP-26-4956 audit on a public domain",
        "description": "Pass format=json for a single JSON ExposureReport response (recommended for AI agents and scripts). Omit format for live Server-Sent Events (SSE).",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "google.com" },
            "description": "Public domain name to audit (e.g. google.com, cloudflare.com, stripe.com)."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": { "type": "string", "enum": ["json"], "default": "json" },
            "description": "Set to 'json' to receive a single JSON ExposureReport instead of SSE."
          },
          {
            "name": "maxSubdomains",
            "in": "query",
            "required": false,
            "schema": { "type": "integer", "minimum": 1, "maximum": 15 },
            "description": "Maximum live subdomains to probe (default 8, max 15)."
          }
        ],
        "responses": {
          "200": {
            "description": "Full ExposureReport including apex TLS 1.3 ML-KEM trace, subdomains, email/DNSSEC, SaaS vendors, and prioritized remediation diffs."
          },
          "400": { "description": "Invalid domain or SSRF-blocked private/reserved host." },
          "429": { "description": "Rate limit exceeded (25 scan tokens/minute)." }
        }
      }
    },
    "/api/quick": {
      "get": {
        "operationId": "quickProbeHost",
        "summary": "Fast single-host RFC 10024 TLS 1.3 ML-KEM probe",
        "parameters": [
          {
            "name": "host",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "cloudflare.com" }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": { "type": "string", "enum": ["0", "1"] },
            "description": "Set to '1' to bypass the 10-minute probe cache."
          }
        ],
        "responses": {
          "200": { "description": "QuickHostResult with verdict, negotiatedGroup, cdnProvider, and latencyMs." },
          "400": { "description": "Invalid or SSRF-blocked hostname." }
        }
      }
    },
    "/api/compare": {
      "get": {
        "operationId": "compareDomains",
        "summary": "Compare two public domains side-by-side for Post-Quantum readiness",
        "parameters": [
          {
            "name": "a",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "flipkart.com" }
          },
          {
            "name": "b",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "google.com" }
          }
        ],
        "responses": {
          "200": { "description": "CompareReport containing full ExposureReports for left and right domains." },
          "400": { "description": "Invalid domain input." }
        }
      }
    },
    "/api/scan/github-user": {
      "get": {
        "operationId": "scanGithubUserKeys",
        "summary": "Audit a GitHub user's public SSH keys against NSA PP-26-4956",
        "parameters": [
          {
            "name": "user",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "torvalds" }
          }
        ],
        "responses": {
          "200": { "description": "GithubUserKeysResult listing each public key type, bit length, and PQC verdict." }
        }
      }
    },
    "/api/scan/github-repo": {
      "get": {
        "operationId": "scanPublicGithubRepo",
        "summary": "Audit a public GitHub repository for legacy crypto configs (TLS, JWT, WireGuard, IaC)",
        "parameters": [
          {
            "name": "repo",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "harsh-mr/check-vuln-in-keys" }
          }
        ],
        "responses": {
          "200": { "description": "LocalAndRepoAudit with codeFindings, filesScanned, partial flag, and remediations." }
        }
      }
    },
    "/badge/{domain}.svg": {
      "get": {
        "operationId": "getStatusBadgeSvg",
        "summary": "Live embeddable SVG Post-Quantum status badge for any public domain",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "example": "www.quantafeed.com" }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG badge image.",
            "content": { "image/svg+xml": {} }
          }
        }
      }
    },
    "/api/leaderboard": {
      "get": {
        "operationId": "getBenchmarkLeaderboard",
        "summary": "List reference benchmark sites illustrating Post-Quantum readiness and the CDN Illusion",
        "responses": {
          "200": {
            "description": "JSON object containing benchmark entries array."
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service health and version check",
        "responses": {
          "200": {
            "description": "JSON health payload with ok, version, and mode."
          }
        }
      }
    }
  }
}
