# SiteCheck Security Headers Audit

> SiteCheck Security Headers Audit is a paid API for AI agents from api.sitecheck-api.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-18).

Analyzes a website's HTTP security headers, returning a grade, score, header presence/advice, cookie flags, and information leakage for a given URL.

## Facts

- Endpoint: GET https://api.sitecheck-api.workers.dev/api/headers?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-security-headers-audit-3d7430e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uMeZNaVYGo0zAClcAloe5

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sitecheck-security-headers-audit-3d7430e1
```

Example prompt: Can you audit the security headers on https://mycompany.com and tell me what grade it gets, which headers are missing, and whether it's leaking any server version info?

## When to prefer this

Choose this endpoint when you need a structured, graded audit of a website's HTTP security headers including CSP, HSTS, cookie flags, and server information leakage — especially when you want actionable advice per header rather than just raw header values. Prefer it over generic HTTP fetch tools when you need a security score and per-header remediation guidance in a single call.

## Known failure modes

- Invalid or unreachable URL returns error or non-200 status
- Timeout if the target domain is slow or unresponsive
- Redirect loops may result in unexpected finalUrl
- Non-HTTP URLs (e.g. FTP) are not supported
- Private/intranet URLs may not be accessible from the audit worker

## How this service works

Security headers of a URL's final response: Strict-Transport-Security, Content-Security-Policy, X-Frame-Options (or CSP frame-ancestors), X-Content-Type-Options, Referrer-Policy, Permissions-Policy, Cross-Origin-Opener-Policy and Cross-Origin-Resource-Policy, each with present, value, ok and advice. Also cookies missing Secure, HttpOnly or SameSite (names only), version leaks in Server or X-Powered-By, and a grade from A to F.

## Output

Returns a JSON object with the final URL, an overall letter grade (e.g. A–F), a numeric score, HTTP status, a list of information leaks (e.g. server version strings), a breakdown of specific security headers (CSP, HSTS, etc.) each with present/ok/value/advice fields, and a cookie analysis including count and cookies missing Secure or SameSite flags.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Page URL or domain, e.g. example.com"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/",
  "grade": "D",
  "leaks": [
   {
    "value": "nginx/1.25.3",
    "header": "server"
   }
  ],
  "score": 4,
  "status": 200,
  "cookies": {
   "count": 1,
   "withoutFlags": [
    {
     "name": "session",
     "missing": [
      "Secure",
      "SameSite"
     ]
    }
   ]
  },
  "headers": {
   "contentSecurityPolicy": {
    "ok": false,
    "value": null,
    "advice": "add a Content-Security-Policy with default-src",
    "present": false
   },
   "strictTransportSecurity": {
    "ok": true,
    "value": "max-age=31536000",
    "advice": "ok",
    "present": true
   }
  },
  "finalUrl": "https://example.com/",
  "checkedAt": "2026-10-13T09:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-security-headers-audit-3d7430e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.sitecheck-api.workers.dev](https://www.zero.xyz/host/api.sitecheck-api.workers.dev/llms.txt)
