# Security Headers Checker — Grade Website Headers (`hipersoft/security-headers-checker`) Actor

Check and grade the HTTP security headers of any website in bulk: HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy. Returns an A+..F grade and the missing headers. For security and SEO audits. One row per site as JSON, CSV or Excel.

- **URL**: https://apify.com/hipersoft/security-headers-checker.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00025 / site checked

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Security Headers Checker — Grade Website Headers

Check and **grade the HTTP security headers** of any website in bulk with the **Security Headers Checker**. Paste a list of sites and get each one's grade, the value of every key security header, and a list of what's missing — exported as **JSON, CSV or Excel**.

Built for **security audits, SEO and site-quality reviews, compliance checks and monitoring**, it turns a list of URLs into a clear security-header scorecard.

### What it does

- 🛡️ **Grades each site** — an A+ to F grade based on the key security headers present.
- 🔎 **Per-header detail** — HSTS, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy values.
- ❌ **Missing list** — exactly which recommended headers are absent.
- 🔐 **Extras** — HTTPS status, server banner, `Secure` cookie flag, legacy X-XSS-Protection and X-Powered-By.
- ⚡ **Bulk & fast** — check many sites in parallel with a per-site timeout.
- 📤 **Export anywhere** — JSON, CSV or Excel, or straight into a dashboard or report.

### Example output

```json
{
  "url": "https://github.com",
  "status": 200,
  "grade": "A",
  "score": 5,
  "https": true,
  "hsts": "max-age=31536000; includeSubdomains; preload",
  "contentSecurityPolicy": "default-src 'none'; ...",
  "xFrameOptions": "deny",
  "missing": ["permissions-policy"]
}
```

### How to use it

1. Paste a list of **website URLs** (or bare domains).
2. Tune **concurrency** and the **per-site timeout** if needed.
3. Run, and download the scorecard as **JSON, CSV or Excel**.

### Input fields

| Field | Description |
|-------|-------------|
| **Website URLs** | Full URLs or bare domains (checked over HTTPS). |
| **Concurrency** | Sites to check at once (1–20). |
| **Per-site timeout (seconds)** | How long to wait before marking a timeout. |
| **Max sites** | Maximum sites to check (0 = no limit). |

### Output fields

`url`, `ok`, `status`, `finalUrl`, `server`, `https`, `grade`, `score`, `missing`, `hsts`, `contentSecurityPolicy`, `xFrameOptions`, `xContentTypeOptions`, `referrerPolicy`, `permissionsPolicy`, `xXssProtection`, `setCookieSecure`, `poweredBy`.

### Popular use cases

- **Security audits** — score a portfolio of sites and flag weak configurations.
- **SEO & site quality** — headers are part of a healthy, trustworthy site.
- **Compliance** — evidence which security headers are (or aren't) in place.
- **Monitoring** — schedule runs and catch regressions when headers change.
- **Agencies** — produce client-ready security-header reports at scale.

### FAQ

**Do I need an account or key?**
No. Paste your URLs and run.

**How is the grade calculated?**
From the presence of six recommended security headers (HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy) — more present means a higher grade.

**Can I check bare domains?**
Yes — bare domains are checked over HTTPS automatically.

**Can I export to Excel or Google Sheets?**
Yes — results download as JSON, CSV or Excel and integrate with Sheets, dashboards and reports.

***

Bulk **website security-header grading** — HSTS, CSP, X-Frame-Options and more — clean and export-ready for security and SEO audits.

# Actor input Schema

## `urls` (type: `array`):

Sites to check — full URLs or bare domains (e.g. 'github.com', 'https://example.com'). Bare domains are checked over HTTPS.

## `concurrency` (type: `integer`):

How many sites to check in parallel (1–20).

## `requestTimeoutSecs` (type: `integer`):

How long to wait for each site before marking it as a timeout.

## `maxItems` (type: `integer`):

Maximum number of sites to check (0 = no limit).

## Actor input object example

```json
{
  "urls": [
    "github.com",
    "example.com"
  ],
  "concurrency": 8,
  "requestTimeoutSecs": 20,
  "maxItems": 0
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# 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 = {
    "urls": [
        "github.com",
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/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 = { "urls": [
        "github.com",
        "example.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/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 '{
  "urls": [
    "github.com",
    "example.com"
  ]
}' |
apify call hipersoft/security-headers-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/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/zIGfgbACtbx64fLpp/builds/BQgkEyBUxpIBhYsaB/openapi.json
