# SEO Audit & Broken Link Checker (Site Crawler) (`scraper-forge/seo-audit`) Actor

Crawl a website and audit every page: title, meta description, headings, canonical, noindex, Open Graph, structured data, images alt, duplicate titles, slow pages and broken links. Score per page and a site summary.

- **URL**: https://apify.com/scraper-forge/seo-audit.md
- **Developed by:** [Scraper Forge](https://apify.com/scraper-forge) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 pages

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

## SEO Audit & Broken Link Checker (Site Crawler)

Crawl a website and get an **SEO score and a clear list of issues for every page**, plus a site summary and an optional **broken-link report** showing exactly which pages contain each dead link.

### What it checks (per page)

| Area | Checks |
|---|---|
| Basics | HTTP status, HTTPS, redirects, response time |
| Title | missing, too short, too long, **duplicate across pages** |
| Meta description | missing, too short/long, **duplicate across pages** |
| Headings | missing H1, multiple H1, H2 count |
| Indexability | meta robots / X-Robots-Tag noindex, canonical (missing, invalid, pointing elsewhere) |
| Mobile & i18n | viewport meta, `lang` attribute, hreflang alternates |
| Social | Open Graph title/image, Twitter card |
| Rich results | JSON-LD structured data types (and invalid JSON-LD) |
| Content | word count (thin content), images without alt text |
| Links | internal/external/nofollow counts, **broken links** (optional) |

Each issue has a severity (**error / warning / notice**), and each page gets a **score from 0 to 100**. Results are sorted **worst page first**, so you know where to start.

### Broken links done right

- Only real failures count as broken: **404, 410, 5xx and dead domains**
- Links that block bots, need a login or rate-limit (403, 401, 429, timeouts) go to a separate **"could not verify"** list instead of false alarms
- **Polite checking**: at most 4 requests at a time per host, so you don't hammer anyone's server (including yours)
- A link cap and a time budget keep runs predictable; anything not checked is counted in the summary

### Output

- **Dataset**: one row per page (score, error/warning/notice counts, issue list, title, meta, H1, canonical, indexable, word count, links, broken links on the page…)
- **SITE_SUMMARY**: average score, most common issues across the site, robots.txt and sitemap presence
- **BROKEN_LINKS**: every broken link with status code and the pages it appears on, plus the "could not verify" list

```json
{
  "url": "https://example.com/pricing",
  "score": 62,
  "errors": 1, "warnings": 3, "notices": 2,
  "issueCodes": ["broken-links", "title-too-long", "missing-meta-description", "images-missing-alt", "missing-open-graph", "no-structured-data"],
  "title": "Pricing plans for teams of every size | Example – the best example product",
  "titleLength": 72,
  "h1": "Pricing", "h1Count": 1,
  "canonical": "https://example.com/pricing",
  "indexable": true,
  "wordCount": 845,
  "brokenLinks": [{ "link": "https://example.com/old-plan", "statusCode": 404 }]
}
```

### Input example

```json
{
  "startUrls": [{ "url": "https://example.com" }],
  "maxPages": 200,
  "checkBrokenLinks": true
}
```

Turn off **Crawl the whole site** to audit only the URLs you list (e.g. a set of landing pages).

### Good to know

- No browser: fast and efficient. Pages that render their content only with JavaScript will be audited on their initial HTML.
- The crawler respects `robots.txt`.
- Schedule it weekly to catch regressions (new 404s, accidental noindex, duplicate titles).

# Actor input Schema

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

Start URL(s). The crawler follows internal links from here (same hostname).

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

How many pages to audit in total.

## `crawlSite` (type: `boolean`):

Follow internal links. Turn off to audit only the URLs you entered.

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

Check every link found on the audited pages and report 404s and dead links (with the pages that contain them). Slower.

## `checkExternalLinks` (type: `boolean`):

Also check links pointing to other websites.

## `maxLinksToCheck` (type: `integer`):

Upper limit on links verified for the broken-link check.

## `linkCheckTimeLimitSecs` (type: `integer`):

Stop checking links after this long; unchecked links are counted in the summary.

## `includeLinkLists` (type: `boolean`):

Add every internal and external link URL to each page row (larger output).

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

Usually not needed. Use for sites that block data-center traffic.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxPages": 100,
  "crawlSite": true,
  "checkBrokenLinks": false,
  "checkExternalLinks": true,
  "maxLinksToCheck": 1000,
  "linkCheckTimeLimitSecs": 300,
  "includeLinkLists": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per page with score and issues, worst first.

## `summary` (type: `string`):

Average score, most common issues, robots/sitemap checks.

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

Every broken link and the pages it appears on (when enabled).

# 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://apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraper-forge/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://apify.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("scraper-forge/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://apify.com"
    }
  ]
}' |
apify call scraper-forge/seo-audit --silent --output-dataset

```

## MCP server setup

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