# Website SEO Audit: Sitemap, Broken Links & On-Page Checks (`magenta_waterwheel/website-seo-audit`) Actor

Audit a website for SEO basics: discover pages from the sitemap, flag broken links (4xx/5xx), and check title, meta description and H1 signals. Optional PageSpeed Insights when a Google API key is set. Pay per page audited.

- **URL**: https://apify.com/magenta_waterwheel/website-seo-audit.md
- **Developed by:** [Magenta Waterwheel](https://apify.com/magenta_waterwheel) (community)
- **Categories:** SEO tools, Developer tools, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 page auditeds

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

## Website SEO Audit: Sitemap, Broken Links & On-Page Checks

**Website SEO Audit** finds pages via the site's sitemap (when present), checks outbound links for **4xx/5xx** failures, and scores basic **on-page SEO signals** (title, meta description, H1). Optional **Google PageSpeed Insights** scores when you set a free Google API key on the Actor. Built for agencies, SEO ops and AI agents that need a structured JSON audit without a monthly suite.

### Why use this SEO audit Actor?

| | Website SEO Audit | Manual Chrome audits | Full SEO suites |
| --- | --- | --- | --- |
| Sitemap discovery | Yes (`/sitemap.xml`, indexes) | Manual | Yes |
| Broken link scan | Per audited page | Extensions / crawl tools | Yes |
| Title / meta / H1 issues | Structured `issues[]` | Manual | Yes |
| PageSpeed Insights | Optional (your Google key) | Manual | Often bundled |
| Price | **Pay per page audited** | Time | $100+/mo |

### What you get

- 🗺️ **Sitemap discovery** for `/sitemap.xml` and common index paths, including nested sitemap indexes.
- 🔗 **Broken link checks** on outbound `http(s)` links (status + error), with free `broken-link` detail rows.
- Cloudflare-internal links under `/cdn-cgi/` (like email protection) are skipped, so they never show up as false broken links.
- 📝 **On-page signals**: title, meta description, H1 count/text, canonical, robots meta.
- 🚨 **Structured issues** with `code`, `severity` (`error` / `warning` / `info`) and human-readable `message`.
- ⚡ **Optional PageSpeed Insights** (performance / accessibility / best-practices / SEO scores). Skipped cleanly when no API key is configured.
- 🆓 **Broken-link detail rows are not charged.** You pay for page audits only.

### How to run

1. Click **Try for free**.
2. Paste a website URL into **Website URLs**.
3. Set **Max pages to audit** (start small, e.g. 20).
4. Click **Start**, then download JSON/CSV from the **Output** tab.

### Input example

```json
{
    "startUrls": [{ "url": "https://example.com" }],
    "maxPages": 20,
    "checkBrokenLinks": true,
    "checkOnPage": true,
    "sameOriginOnly": true,
    "includePageSpeed": false
}
```

### Output example

```json
{
    "recordType": "page",
    "url": "https://example.com/",
    "finalUrl": "https://example.com/",
    "statusCode": 200,
    "ok": true,
    "fromSitemap": true,
    "onPage": {
        "title": "Example Domain",
        "titleLength": 14,
        "metaDescription": null,
        "metaDescriptionLength": 0,
        "h1Count": 1,
        "h1Texts": ["Example Domain"],
        "canonical": null,
        "robotsMeta": null
    },
    "outboundLinkCount": 1,
    "brokenLinks": [],
    "issues": [
        {
            "code": "missing_meta_description",
            "severity": "warning",
            "message": "Page is missing a meta description."
        }
    ],
    "pageSpeed": null,
    "auditedAt": "2026-10-28T14:00:00.000Z"
}
```

### Pricing (proposed)

Pay-per-event (set in Console before publish):

| Event | Proposed price | Notes |
| --- | --- | --- |
| `page` | **$0.02** per audited page | Undercuts common Store audits (~$0.04/page) |
| `broken-link` | **$0** | Detail rows, free |

Zero external COGS unless you enable PageSpeed (your Google quota).

### PageSpeed Insights (optional)

Set one of these Actor environment variables:

- `GOOGLE_PAGESPEED_API_KEY`
- `PAGESPEED_API_KEY`
- `GOOGLE_PSI_API_KEY`

Then turn on **Include PageSpeed Insights**. If no key is present, the Actor still finishes and records `pageSpeed.skipped = true` with a clear `skipReason`.

### Limitations

- Public pages only (no login walls).
- JavaScript-rendered content is not executed; checks use the raw HTML response.
- Proxy configuration is reserved for a later pass; most public sites work without it.
- Very large sites: raise `maxPages` carefully — each page is billed.

### Related Magenta tools

| Actor | What it does | Price |
| --- | --- | --- |
| [Keyword Search Volume](https://apify.com/magenta_waterwheel/keyword-search-volume) | Google Ads search volume, CPC, competition | $1.50 / 1,000 keywords |
| [AI Search Visibility](https://apify.com/magenta_waterwheel/ai-search-visibility) | Brand mentions across AI answers | See Store |
| [Document & PDF to Markdown](https://apify.com/magenta_waterwheel/document-to-markdown) | PDF/Office to LLM-ready Markdown | $3 / 1,000 pages |

If this saved you time, a quick rating on the Store helps a lot: [leave a review](https://apify.com/magenta_waterwheel/website-seo-audit/reviews).

# Actor input Schema

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

Sites to audit. Use a homepage or any page on the domain. The Actor looks for /sitemap.xml first, then audits discovered URLs (and the start URL as fallback).

## `maxPages` (type: `integer`):

Maximum number of pages to fetch and score per run (from the sitemap and/or start URLs).

## `checkBrokenLinks` (type: `boolean`):

Follow outbound links on each audited page and flag 4xx/5xx or unreachable URLs.

## `maxLinksPerPage` (type: `integer`):

Cap how many outbound links are status-checked on each page (keeps runs fast and cheap).

## `checkOnPage` (type: `boolean`):

Extract title, meta description, H1, canonical and robots meta, and raise structured issues when missing or weak.

## `sameOriginOnly` (type: `boolean`):

Only audit sitemap URLs and check links that stay on the same origin as the start URL.

## `includePageSpeed` (type: `boolean`):

Call Google PageSpeed Insights for each audited page. Requires GOOGLE_PAGESPEED_API_KEY (or PAGESPEED_API_KEY) in Actor environment variables. Skipped cleanly when unset.

## `pageSpeedStrategy` (type: `string`):

Device strategy for PageSpeed Insights.

## `maxConcurrency` (type: `integer`):

How many page/link requests to run in parallel.

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

Timeout for each HTTP request.

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

Optional. Not required for most public sites. Reserved for future proxy-aware fetching.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "maxPages": 20,
  "checkBrokenLinks": true,
  "maxLinksPerPage": 50,
  "checkOnPage": true,
  "sameOriginOnly": true,
  "includePageSpeed": false,
  "pageSpeedStrategy": "mobile",
  "maxConcurrency": 5,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `pages` (type: `string`):

No description

## `brokenLinks` (type: `string`):

No description

## `allRecords` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# 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": [
        {
            "url": "https://example.com"
        }
    ],
    "maxPages": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("magenta_waterwheel/website-seo-audit").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": [{ "url": "https://example.com" }],
    "maxPages": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("magenta_waterwheel/website-seo-audit").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": [
    {
      "url": "https://example.com"
    }
  ],
  "maxPages": 20
}' |
apify call magenta_waterwheel/website-seo-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,magenta_waterwheel/website-seo-audit"
        }
    }
}
```

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/WIkqx3meXylaFikyb/builds/yBQ2zoAQqfC4pSDWf/openapi.json
