HTTP Headers
Inspect HTTP response headers for any URL. Follows redirects and returns the final URL, status code, and all response headers.
GET /api/http-headers
Try it
{
"ok": true,
"input_url": "https://example.com",
"final_url": "https://www.example.com/",
"status": 200,
"headers": {
"content-type": "text/html; charset=UTF-8",
"cache-control": "max-age=604800",
"server": "ECAcc (dcb/7F84)"
},
"headers_truncated": false,
"meta": {
"responseTimeMs": 123,
"cached": false,
"rateLimitedScope": "global"
},
"error": null
}What it returns
- •ok - whether the request succeeded
- •input_url - the URL you submitted
- •final_url - the URL after following any redirects
- •status - HTTP status code of the final response
- •headers - all response headers as key/value pairs
- •headers_truncated - whether any response headers were omitted or truncated
- •meta.responseTimeMs - total time including redirects
- •meta.cached - whether the result came from cache
Use cases
- •Debug caching headers (Cache-Control, ETag, Expires)
- •Inspect Content-Type before processing a remote resource
- •Validate CORS headers (Access-Control-Allow-Origin)
- •Check CDN behaviour - detect Cloudflare, Varnish, or Fastly
- •Verify security headers (Strict-Transport-Security, X-Frame-Options)
- •Automate header audits across your infrastructure
Quick API examples
curl
curl "https://tinyutils.dev/api/http-headers?url=https://example.com"
JavaScript (fetch)
const res = await fetch( "https://tinyutils.dev/api/http-headers?url=https://example.com" ); const data = await res.json(); console.log(data.headers["content-type"]); console.log(data.headers["cache-control"]);