{"openapi":"3.1.0","info":{"title":"SiteForensic Autonomous Forensic API","version":"2.2.0","description":"Autonomous AI-powered forensic agent for deep-dive technical, SEO, performance, and security analysis. Payable via the x402 payment protocol on Base USDC.","contact":{"name":"SiteForensic Support","url":"https://siteforensic.tech","email":"support@siteforensic.tech"},"license":{"name":"Proprietary","url":"https://siteforensic.tech/terms-and-conditions"}},"servers":[{"url":"https://siteforensic.tech","description":"Canonical Production Server"}],"paths":{"/.well-known/x402":{"get":{"summary":"x402 Service Discovery","description":"Returns standard x402 discovery metadata, supported networks, live modular endpoints, and facilitator URL.","operationId":"getX402WellKnown","responses":{"200":{"description":"Discovery metadata for x402 payment protocol"}}}},"/api/v1/tech-stack":{"get":{"summary":"Technology Stack Intelligence","description":"Deep-dive technology detection covering CMS, frontend & backend frameworks, JS libraries, CDN, cloud hosting, analytics, and e-commerce from 3,230+ technologies. (Price: 0.003 USDC via x402 on Base)","operationId":"get_tech_stack","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"totalDetected":{"type":"integer"},"technologies":{"type":"array"},"categories":{"type":"object"},"architecture":{"type":"string"}}}}}},"402":{"description":"Payment required: 0.003 USDC on Base via x402 protocol"}}}},"/api/v1/preflight":{"get":{"summary":"AI Crawler & Pre-Flight Scraper Clearance","description":"Audits robots.txt permissions for leading AI agents (GPTBot, ClaudeBot, PerplexityBot), detects /llms.txt, and assesses WAF bot friction before an agent initiates scraping. (Price: 0.002 USDC via x402 on Base)","operationId":"get_preflight","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"aiScrapingAllowed":{"type":"boolean"},"frictionIndex":{"type":"string","enum":["LOW","MEDIUM","HIGH","BLOCKED"]},"llmsTxt":{"type":"object"},"robotsAiPermissions":{"type":"object"},"scrapingRecommendation":{"type":"object"}}}}}},"402":{"description":"Payment required: 0.002 USDC on Base via x402 protocol"}}}},"/api/v1/security":{"get":{"summary":"Security Posture & Headers Audit","description":"Evaluates HTTP security headers (HSTS, CSP, X-Frame-Options, Permissions-Policy), SSL enforcement, and generates structured, git-patchable remediation tasks. (Price: 0.005 USDC via x402 on Base)","operationId":"get_security","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"securityScore":{"type":"integer"},"grade":{"type":"string"},"headersCheck":{"type":"object"},"actionItems":{"type":"array"},"httpsEnforced":{"type":"boolean"}}}}}},"402":{"description":"Payment required: 0.005 USDC on Base via x402 protocol"}}}},"/api/v1/score":{"get":{"summary":"SiteForensic Score & Quick Verdict","description":"Ultra-fast quality score (0-100), letter grade (A+ to F), percentile benchmark, and browsing safety verdict for high-volume URL screening. (Price: 0.002 USDC via x402 on Base)","operationId":"get_score","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"score":{"type":"integer"},"grade":{"type":"string"},"rating":{"type":"string"},"percentile":{"type":"integer"},"verdict":{"type":"object"},"keyInsights":{"type":"array"}}}}}},"402":{"description":"Payment required: 0.002 USDC on Base via x402 protocol"}}}},"/api/v1/dns":{"get":{"summary":"DNS Records & Infrastructure Resolution","description":"Resolves complete DNS record sets (A, AAAA, MX, NS, TXT, CAA) and analyzes DNS infrastructure configuration in sub-100ms. (Price: 0.002 USDC via x402 on Base)","operationId":"get_dns","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"records":{"type":"object"},"health":{"type":"object"}}}}}},"402":{"description":"Payment required: 0.002 USDC on Base via x402 protocol"}}}},"/api/v1/whois":{"get":{"summary":"Domain WHOIS & Registration Intelligence","description":"Audits domain registration, registrar, creation date, domain age in days, expiration date, and privacy protection status. (Price: 0.003 USDC via x402 on Base)","operationId":"get_whois","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"registrar":{"type":"string"},"registrationDate":{"type":"string"},"expirationDate":{"type":"string"},"domainAgeDays":{"type":"integer"},"daysUntilExpiry":{"type":"integer"},"isNewlyRegistered":{"type":"boolean"}}}}}},"402":{"description":"Payment required: 0.003 USDC on Base via x402 protocol"}}}},"/api/v1/risk":{"get":{"summary":"Threat Intelligence & Risk Assessment","description":"Audits phishing risk heuristics, punycode anomalies, Web3 crypto wallet drainer patterns, and overall threat level for autonomous financial and browsing agents. (Price: 0.005 USDC via x402 on Base)","operationId":"get_risk","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"riskScore":{"type":"integer"},"riskLevel":{"type":"string"},"verdict":{"type":"string"},"signals":{"type":"object"},"trustIndicators":{"type":"array"},"riskFactors":{"type":"array"}}}}}},"402":{"description":"Payment required: 0.005 USDC on Base via x402 protocol"}}}},"/api/v1/diff":{"get":{"summary":"Continuous Monitoring & Change Detection","description":"Audits differences between a prior baseline and a fresh scan, highlighting security regressions, new analytics trackers, and infrastructure drift. (Price: 0.01 USDC via x402 on Base)","operationId":"get_diff","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"summary":{"type":"string"},"totalChanges":{"type":"integer"},"regressionsCount":{"type":"integer"},"improvementsCount":{"type":"integer"},"changes":{"type":"array"}}}}}},"402":{"description":"Payment required: 0.01 USDC on Base via x402 protocol"}}}},"/api/v1/dom-forensics":{"get":{"summary":"DOM Integrity & AI Readiness Forensics","description":"Audits DOM tree geometry, client-side supply-chain attack surface, SRI enforcement, and AI-agent extraction efficiency. (Price: 0.003 USDC via x402 on Base)","operationId":"get_dom_forensics","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"The target website URL to analyze"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["minimal","compact","full","markdown"],"default":"compact"},"description":"Response verbosity format"},{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["live","1h","6h","24h","7d"],"default":"1h"},"description":"Maximum acceptable cache age. Cached hits within this window are FREE."}],"responses":{"200":{"description":"Successful analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"overallScore":{"type":"integer"},"grade":{"type":"string"},"scoreBreakdown":{"type":"object"},"geometry":{"type":"object"},"security":{"type":"object"},"aiReadiness":{"type":"object"},"structuredData":{"type":"object"},"findings":{"type":"array"}}}}}},"402":{"description":"Payment required: 0.003 USDC on Base via x402 protocol"}}}},"/api/v1/analyze":{"get":{"summary":"Probe x402 Payment Requirements","description":"Agent probe endpoint returning HTTP 402 with Bazaar schema metadata, required tokens, and recipient wallet address.","operationId":"probeAnalyzeEndpoint","responses":{"402":{"description":"Payment Required"}}},"post":{"summary":"Run Forensic Technical Audit","description":"Executes full autonomous forensic audit of any target website using the x402 payment protocol.","operationId":"analyzeWebsite","security":[{"x402Payment":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"The full URI of the website to analyze","example":"https://example.com"},"options":{"type":"object","properties":{"includePageSpeed":{"type":"boolean","default":true},"includeWhois":{"type":"boolean","default":true}}}}}}}},"responses":{"200":{"description":"Successful forensic analysis report"},"402":{"description":"Payment Required"}}}}},"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 standard payment header containing base64-encoded EIP-3009 transfer authorization"},"x402PaymentV1":{"type":"apiKey","in":"header","name":"X-PAYMENT","description":"x402 v1 fallback payment header"}}}}