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. Send POST /api/http-headers with the required field url and pay $0.003 per call over x402 or MPP (there is no free tier). It returns a JSON object with url, finalUrl, status, statusText, redirected and 4 more.
Scores 0–100 by presence, flags weak HSTS, and warns on Server/X-Powered-By identity leaks. SSRF-protected.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | yes | Public http(s) URL to probe Also accepted as link, uri, href, page. |
method | string | no | GET or HEAD (default GET) |
Example request
curl -i -X POST https://agent402.tools/api/http-headers \
-H "Content-Type: application/json" \
-d '{"url":"https://agent402.tools"}'
Without payment this returns HTTP 402 Payment Required with the exact price for http-headers; any x402 v2 or MPP client pays it and retries.
Example response
{
"url": "https://agent402.tools/",
"finalUrl": "https://agent402.tools/",
"status": 200,
"statusText": "OK",
"redirected": false,
"httpVersion": null,
"headers": {
"content-type": "text/html; charset=utf-8",
"server": "railway-hikari",
"x-content-type-options": "nosniff"
},
"security": {
"score": 100,
"findings": [
{
"header": "HSTS",
"present": true,
"value": "max-age=63072000; includeSubDomains; preload"
},
{
"header": "XCTO",
"present": true,
"value": "nosniff"
}
],
"warnings": [
"info: Server header names the platform (railway-hikari); also visible from DNS, low value to hide"
]
},
"fetchedAt": "2026-06-19T22:00:00.000Z"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
url | string | yes | https://agent402.tools/ |
finalUrl | string | yes | https://agent402.tools/ |
status | number | yes | 200 |
statusText | string | yes | OK |
redirected | boolean | yes | false |
httpVersion | null | no | null |
headers | object | yes | 3 fields: content-type, server, x-content-type-options |
security | object | yes | 3 fields: score, findings, warnings |
fetchedAt | string | yes | 2026-06-19T22:00:00.000Z |
From an MCP client
catalog.call {
"slug": "http-headers",
"params": {
"url": "https://agent402.tools"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for http-headers; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
urlis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/http-headers returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
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();
client.setSpendControls?.(false); // keep your own spending ceiling in code
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://agent402.tools"
}),
});
Part of these workflows
HTTP headers + security analysis is one step in these 11 skill packs, each sold as a single call:
- 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
Certificate transparency search
POST /api/cert-transparencySearch public Certificate Transparency logs for every cert issued to a domain. Two independent public CT search services…
Tech stack detection
POST /api/tech-stackDetect the technology stack of a public website: CDN, web server, language/runtime, frontend framework (Next.js, Nuxt, S…
Domain security & deliverability audit (graded)
POST /v1/domain-auditHand over a domain and get one graded security & email-deliverability audit: SPF, DMARC, DKIM and MX (why your mail land…
ASN + IP geolocation
POST /api/asn-infoLook up the Autonomous System (ASN), prefix, country, registry, and allocation date for an IPv4 address - or for a hostn…
Email deliverability check
POST /api/email-deliverabilityEnd-to-end email-auth report for a domain: SPF + DMARC + DKIM (probes common selectors automatically) + MX records + sco…
HTTP check
POST /api/http-checkCheck any public URL: status code, latency, final URL after redirects, and response headers. The uptime primitive for ag…