{"openapi":"3.0.3","info":{"title":"SEO Analyzer API","version":"1.1.0","description":"Full-page SEO audit: meta tags, heading hierarchy, links, alt text, Open Graph, Schema.org, and content — scored and graded in one call. Compare two URLs side-by-side. MCP-compatible (JSON-RPC 2.0).","contact":{"url":"https://api.lazy-mac.com"},"license":{"name":"MIT"}},"servers":[{"url":"https://api.lazy-mac.com/seo","description":"Production"}],"paths":{"/seo":{"get":{"summary":"API info","operationId":"getInfo","tags":["meta"],"responses":{"200":{"description":"API information","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"endpoints":{"type":"object"}}}}}}}}},"/seo/health":{"get":{"summary":"Health check","operationId":"healthCheck","tags":["meta"],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"service":{"type":"string","example":"seo-analyzer"},"ts":{"type":"string","format":"date-time"}}}}}}}}},"/seo/version":{"get":{"summary":"Version info","operationId":"getVersion","tags":["meta"],"responses":{"200":{"description":"Version","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string"},"version":{"type":"string","example":"1.1.0"},"ts":{"type":"string","format":"date-time"}}}}}}}}},"/seo/api/v1/analyze":{"get":{"summary":"Analyze SEO of a webpage","operationId":"analyzeSeoGet","tags":["analyze"],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"URL to analyze","example":"https://example.com"}],"responses":{"200":{"description":"SEO analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/"},"analyzedAt":{"type":"string","format":"date-time"},"statusCode":{"type":"integer","example":200},"fetchTimeMs":{"type":"integer","example":120},"overallScore":{"type":"integer","minimum":0,"maximum":100,"example":74},"grade":{"type":"string","enum":["A","B","C","D","F"],"example":"C"},"scores":{"type":"object","properties":{"title":{"type":"integer"},"metaDescription":{"type":"integer"},"headings":{"type":"integer"},"images":{"type":"integer"},"links":{"type":"integer"},"openGraph":{"type":"integer"},"technical":{"type":"integer"},"schema":{"type":"integer"},"content":{"type":"integer"}}},"summary":{"type":"object","properties":{"totalIssues":{"type":"integer"},"issues":{"type":"array","items":{"type":"string"}},"recommendations":{"type":"array","items":{"type":"string"}}}}}}}}},"400":{"description":"Missing URL parameter","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Analysis failed (fetch error, timeout, etc.)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"summary":"Analyze SEO of a webpage (POST)","operationId":"analyzeSeoPost","tags":["analyze"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","example":"https://example.com"}}}}}},"responses":{"200":{"description":"SEO analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/"},"analyzedAt":{"type":"string","format":"date-time"},"statusCode":{"type":"integer","example":200},"fetchTimeMs":{"type":"integer","example":120},"overallScore":{"type":"integer","minimum":0,"maximum":100,"example":74},"grade":{"type":"string","enum":["A","B","C","D","F"],"example":"C"},"scores":{"type":"object","properties":{"title":{"type":"integer"},"metaDescription":{"type":"integer"},"headings":{"type":"integer"},"images":{"type":"integer"},"links":{"type":"integer"},"openGraph":{"type":"integer"},"technical":{"type":"integer"},"schema":{"type":"integer"},"content":{"type":"integer"}}},"summary":{"type":"object","properties":{"totalIssues":{"type":"integer"},"issues":{"type":"array","items":{"type":"string"}},"recommendations":{"type":"array","items":{"type":"string"}}}}}}}}},"400":{"description":"Missing URL in body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Analysis failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/seo/api/v1/compare":{"post":{"summary":"Compare SEO of two webpages","description":"Runs a full analysis on both URLs in parallel and returns a category-by-category comparison with a winner per category.","operationId":"compareSeo","tags":["analyze"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url1","url2"],"properties":{"url1":{"type":"string","format":"uri","example":"https://example.com"},"url2":{"type":"string","format":"uri","example":"https://competitor.com"}}}}}},"responses":{"200":{"description":"Side-by-side SEO comparison","content":{"application/json":{"schema":{"type":"object","properties":{"comparedAt":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/"},"analyzedAt":{"type":"string","format":"date-time"},"statusCode":{"type":"integer","example":200},"fetchTimeMs":{"type":"integer","example":120},"overallScore":{"type":"integer","minimum":0,"maximum":100,"example":74},"grade":{"type":"string","enum":["A","B","C","D","F"],"example":"C"},"scores":{"type":"object","properties":{"title":{"type":"integer"},"metaDescription":{"type":"integer"},"headings":{"type":"integer"},"images":{"type":"integer"},"links":{"type":"integer"},"openGraph":{"type":"integer"},"technical":{"type":"integer"},"schema":{"type":"integer"},"content":{"type":"integer"}}},"summary":{"type":"object","properties":{"totalIssues":{"type":"integer"},"issues":{"type":"array","items":{"type":"string"}},"recommendations":{"type":"array","items":{"type":"string"}}}}}}},"comparison":{"type":"object","description":"Per-category scores and winner"},"overallWinner":{"type":"string","description":"URL of the overall winner, or 'tie'"}}}}}},"400":{"description":"Missing url1 or url2","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Comparison failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/seo/mcp":{"get":{"summary":"MCP endpoint info","operationId":"getMcpInfo","tags":["mcp"],"responses":{"200":{"description":"MCP server info for browser/agent discovery","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"protocol":{"type":"string"},"transport":{"type":"string"},"method":{"type":"string"},"jsonrpc":{"type":"string"}}}}}}}},"post":{"summary":"MCP JSON-RPC 2.0 endpoint","operationId":"mcpRpc","tags":["mcp"],"description":"Supports methods: initialize, tools/list, tools/call. Tools: analyze_seo, compare_seo.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"type":"integer"},"method":{"type":"string","enum":["initialize","tools/list","tools/call"],"example":"tools/call"},"params":{"type":"object"}}}}}},"responses":{"200":{"description":"JSON-RPC 2.0 response"},"400":{"description":"Invalid JSON-RPC request"},"500":{"description":"Internal error"}}}}}}