# Mozilla Http Observatory Scanner (`real-estate-api/mozilla-http-observatory-scanner`) Actor

Mozilla HTTP Observatory Scanner is a Python tool to extract security grades, scan results, header evaluations, and TLS configurations from the Mozilla HTTP Observatory API. It exports structured web security datasets into clean CSV or JSON formats

- **URL**: https://apify.com/real-estate-api/mozilla-http-observatory-scanner.md
- **Developed by:** [real-estate-api](https://apify.com/real-estate-api) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

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

### Mozilla HTTP Observatory Scanner — Analyze Website Security Headers and Grades

![Mozilla HTTP Observatory Scanner cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/mozilla-http-observatory-scanner-cover.png)

Scan website hosts using the Mozilla MDN HTTP Observatory and collect security grades, scores, scan timestamps, and test results. Export structured scan records to JSON, CSV, Excel, and other supported dataset formats.

### Features

- **Host Scanning:** Submit hostnames for security assessments using the HTTP Observatory.
- **Security Grades:** Retrieve letter grades assigned to scanned hosts.
- **Security Scores:** Collect numerical security scores for comparison and analysis.
- **Test Results:** Capture passed, failed, and total test counts.
- **Scan Metadata:** Retrieve scan identifiers, timestamps, algorithm versions, and status codes.
- **Detailed Results:** Preserve links to individual Observatory analysis pages.
- **Multiple Hosts:** Scan a list of hostnames in one run.
- **Duplicate Prevention:** Avoid duplicate records using scan identifiers and hostnames.
- **Custom Result Limits:** Control the maximum number of records collected.

### Use Cases

- **Security Reviews:** Assess website security grades and scores before launching applications.
- **Security Header Monitoring:** Track changes in security assessment results over time.
- **Vendor Assessments:** Compare security scan results across vendors, partners, and external websites.
- **Developer QA:** Review security posture after website configuration changes.
- **Website Audits:** Build structured reports of security assessment results for multiple hosts.

### Input Parameters

| Parameter | Type | Description | Default |
|---|---|---|---|
| `mode` | String | Select the scanning mode. Currently supports `scan`. | `scan` |
| `hosts` | Array | List of hostnames to scan, such as `google.com`. | — |
| `maxItems` | Integer | Maximum number of scan records to collect. | — |
| `requestDelaySecs` | Number | Delay between scan requests in seconds. | — |

### Example Input

```json
{
  "mode": "scan",
  "hosts": [
    "google.com"
  ],
  "maxItems": 50,
  "requestDelaySecs": 1
}
```

### Extracted Data

| Field | Description |
|---|---|
| `scanId` | Unique identifier for the scan. |
| `details_url` | Link to the detailed Observatory analysis page. |
| `algorithm_version` | Version of the scanning algorithm. |
| `scanned_at` | Date and time when the host was scanned. |
| `grade` | Overall security grade assigned to the host. |
| `score` | Numerical security score. |
| `status_code` | Status code returned for the scan. |
| `tests_failed` | Number of failed security tests. |
| `tests_passed` | Number of passed security tests. |
| `tests_quantity` | Total number of security tests. |
| `host` | Scanned hostname. |
| `scraped_at` | Date and time the record was collected. |

### Example Output

```json
{
  "scanId": 127443396,
  "details_url": "https://developer.mozilla.org/en-US/observatory/analyze?host=google.com",
  "algorithm_version": 6,
  "scanned_at": "2026-10-12T05:20:41.321Z",
  "grade": "C-",
  "score": 45,
  "status_code": 200,
  "tests_failed": 6,
  "tests_passed": 6,
  "tests_quantity": 12,
  "host": "google.com",
  "scraped_at": "2026-10-12T05:30:00+00:00"
}
```

### Working with Dataset

After the actor completes, access your collected scan records through the Apify Dataset.

Export your results in formats such as:

- **JSON** — For structured data processing and automation.
- **CSV** — For spreadsheet analysis and reporting.
- **Excel** — For reviewing and comparing security grades.
- **XML** — For compatible data-processing workflows.

### FAQ

**What does this actor scan?**

It scans the hostnames you provide using the Mozilla MDN HTTP Observatory and collects the resulting security assessment information.

**Who can use this actor?**

Security engineers, developers, website administrators, and analysts who want structured website security assessment results.

**Can I scan multiple hosts in one run?**

Yes. Provide multiple hostnames in the `hosts` array.

**What do the grade and score represent?**

The grade is the overall letter-based assessment, while the score is the numerical result returned by the Observatory.

**Can I run scans automatically?**

Yes. You can configure an Apify schedule to repeat scans at your preferred intervals.

**Are scan results always freshly generated?**

Not necessarily. The Observatory may return cached results, and rescanning the same host may be subject to Mozilla's scanning restrictions. Results should not be assumed to represent a newly initiated scan every time.

### Disclaimer

This is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with Mozilla or MDN. Mozilla, MDN, and related names and trademarks belong to their respective owners. Scan results are provided for informational and security assessment purposes. Only scan websites you own or have permission to assess, and verify important findings before making security decisions.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to run. Scan triggers or returns a cached Mozilla HTTP Observatory grade for each host.

## `hosts` (type: `array`):

Hostnames to scan, one per line (for example google.com).

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

Stop after this many successful rows. Hard max is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between requests. Raise if you see 429; Observatory rescans are limited to about one per host per minute.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

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

Per-request timeout in seconds.

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

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "scan",
  "hosts": [
    "google.com"
  ],
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {
    "hosts": [
        "google.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("real-estate-api/mozilla-http-observatory-scanner").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 = { "hosts": ["google.com"] }

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/mozilla-http-observatory-scanner").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 '{
  "hosts": [
    "google.com"
  ]
}' |
apify call real-estate-api/mozilla-http-observatory-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,real-estate-api/mozilla-http-observatory-scanner"
        }
    }
}
```

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/TOJeeF7bev58pHQRU/builds/BShxegUJHOAZXlFSM/openapi.json
