# 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
- **Features:** Limited permissions
- **Stats:** 2 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# 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(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,q_services/http-security-headers-checker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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