HTTP headers + security analysis
POST /api/http-headersFetch a URL and return every response header plus a security analysis: HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COOP/CORP/COEP. Scores 0–100 by presence, flags weak HSTS, and warns on Server/X-Powered-By identity leaks. SSRF-protected.
Input
| Field | Type | Description |
|---|---|---|
url * | string | Public http(s) URL to probe |
method | string | GET or HEAD (default GET) |
Example output
{
"url": "https://example.com/",
"finalUrl": "https://example.com/",
"status": 200,
"statusText": "OK",
"redirected": false,
"httpVersion": null,
"headers": {
"content-type": "text/html; charset=UTF-8",
"server": "ECAcc (nyd/D17C)"
},
"security": {
"score": 0,
"findings": [
{
"header": "HSTS",
"present": false,
"value": null
}
],
"warnings": [
"Server header leaks identity: ECAcc (nyd/D17C)"
]
},
"fetchedAt": "2026-06-19T22:00:00.000Z"
}
Try it - see the 402 challenge (free)
curl -i -X POST https://agent402.tools/api/http-headers \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}'
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/http-headers", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"url": "https://example.com"
}),
});
Part of these workflows
This tool is one step in 11 curated multi-tool workflows - agents can fetch the whole sequence as an MCP prompt or call https://agent402.tools/api/skill-packs/{slug}/prompt.
- Security audit - Enumerate a domain's external attack surface in one workflow: certs, DNS posture, email auth, HTTP security headers, and tech stack.
- API investigation - Point at an unknown API endpoint and figure out how to use it: auth scheme, content type, version, rate limits, OpenAPI/Swagger spec discovery, and JSON response structure. The deterministic recon workflow before writing a single line of integration code.
- Convert anything to markdown - Convert anything at a URL - HTML, PDF, or an image - to clean markdown. The 'I have a URL but it might be any content-type, give me markdown either way' workflow: HEAD-detect the content-type, branch to the right deterministic extractor (article extract for HTML, pdf-to-markdown for PDFs, OCR for images), and report token/word stats on the output so the caller can budget the result against an LLM context window.
- Site status snapshot - The 'is this site healthy, addressable, and crawlable - right now?' workflow. DNS resolution → HTTP reachability → security headers → TLS certificate expiry → robots policy. Five tools, one structured status payload an operator (or an uptime bot, or a pre-flight check before an extract/crawl) can act on.
- Technical SEO audit - Can search engines and AI crawlers actually index this page? One pass over reachability, TLS, robots policy, sitemap health, meta/OpenGraph tags, and the on-page link graph.
- Domain intel - Full domain security and SEO intelligence in one call: WHOIS, DNS, TLS cert, HTTP headers, tech stack, robots policy, and certificate transparency.
- SSL audit - TLS/SSL security posture check: live certificate inspection, HTTP security headers, and CAA DNS records.
- Brand protection - Is this domain legitimate? WHOIS age, DNS resolution, scam/phishing search results, and HTTP headers for a quick trust assessment.
- Competitor scan - What's a competitor using? Tech stack, HTTP headers, WHOIS, and page metadata in one call.
- Page audit - Full page SEO + security audit: content extraction, metadata, HTTP headers, robots policy, and sitemap health in one call.
- API health check - Is this API endpoint healthy? Liveness check, response headers, and TLS certificate status in one pass.
Related tools
DNS lookup
GET /api/dnsDNS lookup for a domain. Supported record types: A, AAAA, MX, TXT, NS, CNAME.
HTTP check
POST /api/http-checkCheck any public URL: status code, latency, final URL after redirects, and response headers. The uptime primitive for ag…
TLS certificate
POST /api/tls-certInspect the TLS certificate of any public host: subject, issuer, validity window, days remaining, SANs, and SHA-256 fing…