# HTTP Security Headers Checker (`q_services/http-security-headers-checker`) Actor

Audit HSTS, CSP, X-Frame-Options, Referrer-Policy and other HTTP security headers in bulk.

- **URL**: https://apify.com/q\_services/http-security-headers-checker.md
- **Developed by:** [Q Services](https://apify.com/q_services) (community)
- **Categories:** Developer tools
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 checked urls

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## HTTP Security Headers Checker

Audit security headers for any list of websites and get a clean dataset with a grade, score, missing headers and practical recommendations.

**Example result:**

```json
{
    "domain": "apify.com",
    "grade": "A",
    "score": 95,
    "missingHeaders": ["permissions-policy"],
    "hasHsts": true,
    "hasCsp": true,
    "finalUrl": "https://apify.com/",
    "scrapedAt": "2026-07-09T10:30:00.000Z"
}
```

### How to use it

1. Paste one or more domains or URLs.
2. Choose the maximum number of URLs to check.
3. Start the Actor and export the dataset as JSON, CSV or Excel.

### Pricing

Usage-based pricing, no subscription:

| Event | Price |
|---|---:|
| Actor start | $0.005 |
| Checked URL | $0.0005 |

1,000 checked URLs cost about $0.505.

### Output fields

| Field | Type | Always present? |
|---|---|---|
| `domain` | string | Yes |
| `url` | string | Yes |
| `finalUrl` | string | Yes |
| `statusCode` | number | No |
| `grade` | string | Yes |
| `score` | number | Yes |
| `missingHeaders` | array | Yes |
| `recommendations` | array | Yes |
| `headers` | object | Yes |
| `scrapedAt` | ISO date | Yes |

### Limitations

- Checks response headers only; it does not run a browser security scan.
- Follows redirects and grades the final HTTP response.
- A grade is a practical audit signal, not a formal compliance certification.

### Verified automation package

The following reproducible example comes from successful Apify run `cXctz4lpAeBsGlqLH`. See the [full Q Services technical guide](https://q-services.fr/blog/http-security-headers-checker-2026-07-24-growth-guide/) and the [tested n8n automation example](https://github.com/Gasppacho/q-services-automations/tree/main/n8n/http-security-headers-checker).

Auditez une liste bornée de domaines, suivez la réponse finale après redirection et obtenez pour chaque cible un score, une note, les en-têtes absents et des recommandations exploitables. Programmez le contrôle pour détecter les régressions sans présenter le résultat comme une certification.

#### High-value use cases

- Contrôle hebdomadaire d’un portefeuille de domaines
- Détection de régressions HSTS ou CSP après déploiement
- Audit multi-sites pour une agence web
- Transmission des écarts vers un ticket ou un tableau interne
- Vérification des en-têtes après un changement de CDN

**Target audience:** Responsables sécurité, agences web et équipes plateforme qui gèrent plusieurs domaines publics

**Growth hypothesis:** Un positionnement axé sur la surveillance hebdomadaire multi-sites et un workflow n8n relié à une destination opérationnelle feront passer les runs publics sur trente jours de la référence actuelle de 10 à au moins 15 à J+30, en favorisant les usages récurrents plutôt que les audits ponctuels.

#### Tested input

```json
{
  "startUrls": [
    "https://example.com"
  ],
  "maxResults": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

#### Clean output sample

```json
[
  {
    "domain": "\u003cstring\u003e",
    "url": "\u003cstring\u003e",
    "finalUrl": "\u003cstring\u003e",
    "status": "\u003cstring\u003e",
    "statusCode": "\u003cstring\u003e"
  }
]
```

#### API example

```bash
curl --request POST   'https://api.apify.com/v2/acts/GWUbdt1hxWioYEEZA/runs?waitForFinish=120&maxTotalChargeUsd=0.05'   --header "Authorization: Bearer $APIFY_TOKEN"   --header 'Content-Type: application/json'   --data @input.json
```

#### Measured cost and limits

The proof run took 2.61 seconds and reported $0.000598 in platform usage. Actual cost depends on input size and source behavior. Set an Apify maximum charge per run and conservative result limits.

Known limits:

- Public sources can change or become unavailable.
- Output completeness depends on the supplied input.
- The measured proof cost is evidence for one run, not a universal quote.

[Run HTTP Security Headers Checker on the Apify Store](https://apify.com/q_services/http-security-headers-checker).

# Actor input Schema

## `startUrls` (type: `array`):

Domains or URLs to audit for HTTP security headers.

## `maxResults` (type: `integer`):

The Actor stops and stops charging after this many URLs.

## `proxyConfiguration` (type: `object`):

Proxy configuration. The default Apify Proxy works for most websites.

## Actor input object example

```json
{
  "startUrls": [
    "https://apify.com"
  ],
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        "https://apify.com"
    ],
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("q_services/http-security-headers-checker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": ["https://apify.com"],
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("q_services/http-security-headers-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://apify.com"
  ],
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call q_services/http-security-headers-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=q_services/http-security-headers-checker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GWUbdt1hxWioYEEZA/builds/sJ2IgiO93DKnE9sLQ/openapi.json
