{"openapi":"3.0.3","info":{"title":"agentgrade","description":"Scan any site for agent capabilities and payment protocols. Produces Lighthouse-like reports for agentic services.","version":"1.0.0"},"servers":[{"url":"https://agentgrade.com"}],"paths":{"/api/scan":{"get":{"operationId":"scanUrl","summary":"Scan a URL for agent capabilities and payment protocols","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The URL to scan (must be http or https)"}],"responses":{"200":{"description":"Scan results. Each score group includes kbSlug (KB article slug). Failing checks include a hint field with fix instructions.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid or missing URL"},"500":{"description":"Scan failed or timed out"}}}},"/api/history":{"get":{"operationId":"scanHistory","summary":"Get scan history (requires DATABASE_URL)","parameters":[{"name":"url","in":"query","schema":{"type":"string"},"description":"Filter by URL"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Max results (up to 100)"}],"responses":{"200":{"description":"Array of past scan summaries"},"501":{"description":"No database configured"}}}},"/api/badge":{"get":{"operationId":"badge","summary":"SVG badge showing scan results for a URL","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"SVG badge image","content":{"image/svg+xml":{}}}}}},"/api/report":{"get":{"operationId":"fullReport","summary":"Full scan report with historical comparison","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Full report with current scan, previous scan, and delta"}}}},"/api/v1/scan":{"get":{"operationId":"compactScan","summary":"Compact machine-to-machine scan (flat JSON, agent-optimized)","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Compact scan result with score"}}}},"/mcp":{"get":{"operationId":"mcpManifest","summary":"MCP tool manifest","responses":{"200":{"description":"JSON manifest listing available MCP tools"}}},"post":{"operationId":"mcpRpc","summary":"JSON-RPC 2.0 tool calls (scan_url, scan_compact, get_history, validate_x402_json)","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON-RPC 2.0 response"}}}},"/health":{"get":{"operationId":"healthCheck","summary":"Health check","responses":{"200":{"description":"Service is healthy"}}}}}}