{"openapi":"3.1.0","info":{"title":"Stacks API","version":"1.0.0","description":"Uncover the frameworks, hosting, analytics and CDNs behind any website, and check its metadata and security headers."},"servers":[{"url":"https://stacks.danpoj.site"}],"components":{"schemas":{"AnalyzeResult":{"type":"object","properties":{"url":{"type":"string"},"blocked":{"$ref":"#/components/schemas/Blocked"},"technologies":{"type":"array","items":{"$ref":"#/components/schemas/Technology"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"security":{"$ref":"#/components/schemas/Security"}},"required":["url","technologies","metadata","security"]},"Blocked":{"type":"object","properties":{"vendor":{"type":"string","example":"DataDome"},"reason":{"type":"string","example":"DataDome served a bot challenge page with HTTP 403 Forbidden instead of the real site."}},"required":["reason"],"description":"Present when the site answered with a bot challenge, block or error page instead of the real page. Results then describe that page, so most of the site's stack is likely missing."},"Technology":{"type":"object","properties":{"name":{"type":"string","example":"Next.js"},"categories":{"type":"array","items":{"type":"string"},"example":["JavaScript frameworks"]},"version":{"type":"string","example":"15.3.0"},"confidence":{"type":"integer","minimum":0,"maximum":100,"example":100},"evidence":{"type":"string","description":"The first signal that matched"},"website":{"type":"string"},"icon":{"type":"string","description":"Icon file name. The image is served at /icons/{icon}.","example":"Next.js.svg"},"dnsOnly":{"type":"boolean","description":"Detected only from DNS records: likely a service the organization uses rather than part of the site itself"}},"required":["name","categories","confidence","evidence","dnsOnly"]},"Metadata":{"type":"object","properties":{"url":{"type":"string","description":"Final URL after redirects"},"title":{"type":"string"},"description":{"type":"string"},"canonical":{"type":"string"},"lang":{"type":"string"},"charset":{"type":"string"},"viewport":{"type":"string"},"robots":{"type":"string","description":"<meta name=\"robots\"> combined with the X-Robots-Tag header"},"themeColor":{"type":"string"},"manifest":{"type":"string"},"webManifest":{"type":"object","properties":{"error":{"type":"string","description":"Why the linked manifest could not be read","example":"HTTP 404"},"name":{"type":"string"},"icons":{"type":"array","items":{"type":"object","properties":{"src":{"type":"string"},"sizes":{"type":"string"},"purpose":{"type":"string"}},"required":["src"]}}},"required":["icons"],"description":"The linked web app manifest, fetched and parsed"},"icons":{"type":"array","items":{"type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string"},"sizes":{"type":"string"}},"required":["rel","href"]}},"faviconIco":{"type":"boolean","description":"Whether /favicon.ico is served. Only checked when the page has no <link rel=\"icon\">"},"openGraph":{"type":"object","additionalProperties":{"type":"string"},"example":{"og:title":"Vercel","og:type":"website"}},"twitter":{"type":"object","additionalProperties":{"type":"string"},"example":{"twitter:card":"summary_large_image"}},"alternates":{"type":"array","items":{"type":"object","properties":{"hreflang":{"type":"string"},"href":{"type":"string"}},"required":["hreflang","href"]}},"headings":{"type":"object","properties":{"h1":{"type":"array","items":{"type":"string"}},"counts":{"type":"array","items":{"type":"integer"},"description":"Number of h1 to h6 elements, in order"}},"required":["h1","counts"]},"structuredData":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"},"description":"JSON-LD @type values","example":["Organization"]},"invalid":{"type":"integer","description":"JSON-LD blocks that failed to parse"}},"required":["types","invalid"]},"images":{"type":"object","properties":{"total":{"type":"integer"},"missingAlt":{"type":"integer"}},"required":["total","missingAlt"]},"checks":{"type":"array","items":{"$ref":"#/components/schemas/MetaCheck"}}},"required":["url","icons","openGraph","twitter","alternates","headings","structuredData","images","checks"]},"MetaCheck":{"type":"object","properties":{"id":{"type":"string","example":"title"},"label":{"type":"string","example":"Title"},"status":{"type":"string","enum":["pass","warn","fail"]},"detail":{"type":"string","example":"42 characters."}},"required":["id","label","status","detail"]},"Security":{"type":"object","properties":{"url":{"type":"string","description":"Final URL after redirects"},"https":{"type":"boolean"},"grade":{"type":"string","enum":["A+","A","B","C","D","F"],"example":"A"},"score":{"type":"integer","minimum":0,"maximum":100,"description":"100 minus the weight of each failed check and half the weight of each warning","example":88},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"description":"Security-related response headers that were sent","example":[{"name":"x-frame-options","value":"DENY"}]},"checks":{"type":"array","items":{"$ref":"#/components/schemas/MetaCheck"}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"secure":{"type":"boolean"},"httpOnly":{"type":"boolean"},"sameSite":{"type":"string"},"issues":{"type":"array","items":{"type":"string"},"example":["no HttpOnly"]}},"required":["name","secure","httpOnly","issues"]}}},"required":["url","https","grade","score","headers","checks","cookies"]},"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"StackResult":{"type":"object","properties":{"url":{"type":"string"},"blocked":{"$ref":"#/components/schemas/Blocked"},"technologies":{"type":"array","items":{"$ref":"#/components/schemas/Technology"}}},"required":["url","technologies"]},"Snapshot":{"type":"object","properties":{"url":{"type":"string","maxLength":8192,"example":"https://www.nytimes.com/"},"html":{"type":"string","maxLength":4000000,"description":"The rendered DOM (document.documentElement.outerHTML)"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Response headers of the document","example":{"server":"Fastly"}},"cookies":{"type":"object","additionalProperties":{"type":"string"},"description":"Cookies readable from document.cookie"},"scriptSrc":{"type":"array","items":{"type":"string"},"maxItems":5000,"description":"Script URLs loaded by the page, including ones added after load. Entries that aren't http(s) URLs or are longer than 2048 characters are ignored."},"xhr":{"type":"array","items":{"type":"string"},"maxItems":5000,"description":"Hostnames the page sent XHR / fetch requests to","example":["ib.adnxs.com"]},"js":{"type":"object","additionalProperties":{"type":"string"},"description":"Values of the paths from /api/stack/globals that exist on the page","example":{"pbjs.version":"v11.22.0"}}},"required":["url","html","headers","cookies","scriptSrc","xhr","js"]},"GlobalsResult":{"type":"object","properties":{"globals":{"type":"array","items":{"type":"string"},"example":["pbjs.version"]}},"required":["globals"]},"MetadataResult":{"type":"object","properties":{"url":{"type":"string"},"blocked":{"$ref":"#/components/schemas/Blocked"},"metadata":{"$ref":"#/components/schemas/Metadata"}},"required":["url","metadata"]},"SecurityResult":{"type":"object","properties":{"url":{"type":"string"},"blocked":{"$ref":"#/components/schemas/Blocked"},"security":{"$ref":"#/components/schemas/Security"}},"required":["url","security"]}},"parameters":{}},"paths":{"/api/analyze":{"get":{"summary":"Analyze a site's tech stack, metadata and security headers","description":"Detects the technologies a site uses from its HTML, response headers, cookies, JS/CSS files and DNS records. Results are sorted by category priority, most important first. Also includes the page's metadata and security check, the same as /metadata and /security. The page is fetched once for all three.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Site to analyze. If the scheme is omitted, https:// is used.","example":"vercel.com"},"required":true,"description":"Site to analyze. If the scheme is omitted, https:// is used.","name":"url","in":"query"}],"responses":{"200":{"description":"Analysis result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeResult"}}}},"400":{"description":"Invalid url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Could not fetch the target site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/stack":{"get":{"summary":"Detect a site's tech stack","description":"Detects the technologies a site uses from its HTML, response headers, cookies, JS/CSS files and DNS records. Results are sorted by category priority, most important first.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Site to analyze. If the scheme is omitted, https:// is used.","example":"vercel.com"},"required":true,"description":"Site to analyze. If the scheme is omitted, https:// is used.","name":"url","in":"query"}],"responses":{"200":{"description":"Analysis result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackResult"}}}},"400":{"description":"Invalid url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Could not fetch the target site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Detect a site's tech stack from a browser snapshot","description":"Detects technologies from a page already rendered in a browser, as captured by the Stacks Chrome extension. Unlike GET /stack this sees scripts added after load, JavaScript globals and XHR requests, and isn't affected by bot protection. JS and CSS files listed by the snapshot are fetched by the server.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"responses":{"200":{"description":"Analysis result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackResult"}}}},"400":{"description":"Invalid snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/stack/globals":{"get":{"summary":"List the JavaScript globals a snapshot should read","description":"Property paths on window (for example pbjs.version) that fingerprints check. A snapshot reports the value of each one that exists on the page.","responses":{"200":{"description":"Global variable paths","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalsResult"}}}}}}},"/api/metadata":{"get":{"summary":"Read a site's metadata","description":"Returns the page's metadata (title, description, canonical, Open Graph, X/Twitter cards, JSON-LD, headings, icons and the web app manifest) with SEO checks. Only the HTML document is fetched, so this is much faster than /analyze or /stack.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Site to analyze. If the scheme is omitted, https:// is used.","example":"vercel.com"},"required":true,"description":"Site to analyze. If the scheme is omitted, https:// is used.","name":"url","in":"query"}],"responses":{"200":{"description":"Analysis result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataResult"}}}},"400":{"description":"Invalid url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Could not fetch the target site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/security":{"get":{"summary":"Check a site's security headers","description":"Checks the page's security headers (HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COOP), version disclosure and cookie flags, and grades the result from A+ to F. Only the HTML document is fetched, so this is much faster than /analyze or /stack.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Site to analyze. If the scheme is omitted, https:// is used.","example":"vercel.com"},"required":true,"description":"Site to analyze. If the scheme is omitted, https:// is used.","name":"url","in":"query"}],"responses":{"200":{"description":"Analysis result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityResult"}}}},"400":{"description":"Invalid url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Could not fetch the target site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}