# Grade the security headers of online store websites

**Use case:** 

How well do well-known online stores set their security headers? Six store sites graded A+ to F, with the exact issues behind each grade: missing HSTS or Content-Security-Policy, clickjacking protection, a server version in the headers. Paste the shops of a prospect list or of your competitors instead.

## Input

```json
{
  "domains": [
    "allbirds.com",
    "gymshark.com",
    "ikea.com",
    "zalando.de",
    "www.decathlon.com",
    "shopify.com"
  ],
  "checkHeaders": true,
  "expiryWarningDays": 30,
  "maxItems": 0,
  "port": 443,
  "onlyNew": false,
  "stateName": "default",
  "notifyWhenEmpty": false,
  "requestIntervalMs": 1000
}
```

## Output

```json
{
  "host": {
    "label": "Host checked, exactly as written (no www. added or removed)",
    "format": "string"
  },
  "securityGrade": {
    "label": "Grade A+ to F (null when the headers could not be read and the certificate is fine)",
    "format": "string"
  },
  "securityScore": {
    "label": "Score 0 to 100 behind the grade (null when the headers were not read)",
    "format": "integer"
  },
  "validTo": {
    "label": "Certificate valid until (ISO 8601, UTC)",
    "format": "string"
  },
  "daysLeft": {
    "label": "Days until the certificate expires (negative when it already expired)",
    "format": "integer"
  },
  "chainTrusted": {
    "label": "True when the certificate chain leads to a trusted root",
    "format": "boolean"
  },
  "protocol": {
    "label": "TLS protocol negotiated (TLSv1.3, TLSv1.2 ...)",
    "format": "string"
  },
  "hsts": {
    "label": "Strict-Transport-Security header present",
    "format": "boolean"
  },
  "contentSecurityPolicy": {
    "label": "Content-Security-Policy header present",
    "format": "boolean"
  },
  "missingHeaders": {
    "label": "Recommended security headers that are missing, comma-separated (null when none)",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The SSL Certificate and Security Headers Checker API Actor is ready to run with the inputs already set for "Grade the security headers of online store websites". [Sign up or log in](https://console.apify.com/create-task-from-example/W4RXmdb81BUoxQENs) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Grade the security headers of online store websites" task

The SSL Certificate and Security Headers Checker API Actor will start running based on the input automatically. You can also change all the input fields, like domains or urls, also check the security headers, and more, to match your specific use case.

### 3. Receive the "Grade the security headers of online store websites" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as host checked, exactly as written (no www. added or removed), grade a+ to f (null when the headers could not be read and the certificate is fine), score 0 to 100 behind the grade (null when the headers were not read), and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Grade the security headers of online store websites" task via API](https://apify.com/rowcraft/ssl-security-headers-checker.md).

## About this Actor

This example demonstrates how to use [SSL Certificate and Security Headers Checker API](https://apify.com/rowcraft/ssl-security-headers-checker.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/rowcraft/ssl-security-headers-checker.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/rowcraft/ssl-security-headers-checker.md

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`).
