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

Use cases

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"]);