# Security Headers Grade (`web.security_headers`)

Grade a site's HTTP security headers A to F: HSTS, Content-Security-Policy, framing, nosniff, Referrer-Policy and Permissions-Policy, with a fix for each gap.

- **Route:** `POST /v1/run/web.security_headers`
- **Price:** $0.0005 per request ($0.50 per 1,000) · `cost_usd` on every response
- **Source:** GetAllAPIs network checks (`netcheck`) · failover: no
- **Measured latency:** p50 23 ms · p95 23 ms · p99 23 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `url` | string | yes |  | Public http(s) URL |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `grade` | A to F. |
| `score` | 0 to 100. |
| `headers` | Each checked header: present, value, good/weak/missing and the recommendation. |
| `disclosures` | Headers that reveal software versions. |
| `method` | How the score is computed. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/web.security_headers \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://github.com"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('web.security_headers', {'url': 'https://github.com'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run web.security_headers '{"url":"https://github.com"}'
```

Quote first (free, validates input): `POST /v1/quote/web.security_headers` with the same body.
