Security & delivery
/api/v1/http-headersPacketFlo HTTP Headers Checker API
Status, redirects, caching, and security headers.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Full URL to fetch (https:// included). |
Example request
curl "https://packetflo.io/api/v1/http-headers?url=https://example.com&api_key=YOUR_API_KEY"
Example response
{ "ok": true, "data": { "requestedUrl": "https://example.com", "statusCode": 200, "statusText": "OK", "responseTime": 1210, "finalUrl": "https://example.com/", "redirectChain": ["https://example.com/"], "headers": { "content-type": "text/html; charset=utf-8", "cache-control": "max-age=10", "strict-transport-security": "max-age=31536000; includeSubDomains", "server": "cloudflare" // ... every other response header }, "security": { "score": 5, "total": 5, "present": ["strict-transport-security", "x-frame-options", "x-content-type-options", "referrer-policy", "content-security-policy"], "missing": [] } }, "meta": { "tool": "http-headers", "version": "v1" } }
Reading the result
An HTTP error from the target, such as 404 or 500, can still produce ok: true. Read statusCode for the target's status and headers for its response.
Response fields
| Field | What it tells you |
|---|---|
requestedUrl / finalUrl / redirectChain | Input, final inspected URL and visited URL chain. The chain includes the initial URL even without a redirect. |
statusCode / statusText / headers | Target HTTP status and response headers. |
responseTime | Elapsed milliseconds through response headers, including resolution and redirects. |
security | Presence summary for selected security headers; not validation of policy values or a comprehensive security score. |
Scope and limits
Uses GET with up to six HTTP requests and a three-second fetch timeout per request. A missing Location header or redirect limit can leave a 3xx final response. Results reflect PacketFlo's server request, without browser cookies or JavaScript.
Authentication and errors
Send your key in the x-api-key header, or the supported api_key query parameter. Each request uses 2 credits from the key's shared 300-credit rolling 24-hour budget. Credits are charged before parameter validation. Successful responses and quota errors include usage headers; GET and OPTIONS support CORS.
| API status | Meaning |
|---|---|
200 | The diagnostic returned a result in data, with ok: true and version information in meta. Read the diagnostic fields to determine the target's condition. |
400 | Invalid or blocked input, or a lookup/check failure that could not be returned as a diagnostic result. Read error for details. |
401 | Missing, invalid or revoked API key. |
429 | The request would exceed the key's available credit budget. |