# Website SEO Audit & Broken Link Checker (`nordic-data/website-seo-audit`) Actor

Crawl any website and audit every page: 0-100 SEO score, prioritized issues, titles, meta descriptions, headings, canonicals, noindex, structured data, alt text, redirects and broken links. No browser. $0.039/page.

- **URL**: https://apify.com/nordic-data/website-seo-audit.md
- **Developed by:** [Niklas Bergström](https://apify.com/nordic-data) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$39.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 & Broken Link Checker

Crawl any website and get a **technical and on-page SEO audit for every page**: a **0-100 SEO score**, a prioritized list of **issues (error / warning / notice)**, all key meta data, and **broken links** with the page and anchor text where they were found. It works over plain HTTP (no browser), so audits are fast and cheap, and it respects robots.txt.

### What it checks on every page

- **HTTP:** status code, redirect chains, response time, HTML size, HTTP vs HTTPS
- **Indexability:** meta robots and X-Robots-Tag noindex, canonical (missing or pointing elsewhere), in sitemap.xml or not
- **Content:** title (missing / too long / too short / duplicate), meta description (missing / length / duplicate), H1 (missing / multiple), H2 count, word count (thin content), html lang, hreflang
- **Social & rich results:** Open Graph title/image, Twitter card, JSON-LD structured data types (Organization, Product, Article…)
- **Images:** images without alt attribute (with their URLs)
- **Links:** internal / external / nofollow counts and **every broken link** (4xx, 5xx, DNS or timeout errors), internal and external
- **Mobile:** viewport meta tag

Plus a **site summary** (average score, pages with errors, broken links, issue counts) in the key-value store record `SITE_SUMMARY`.

### Input

```json
{
  "startUrls": ["https://books.toscrape.com"],
  "maxPagesPerSite": 50,
  "maxDepth": 5,
  "useSitemap": true,
  "includeSubdomains": false,
  "respectRobotsTxt": true,
  "checkBrokenLinks": true,
  "checkExternalLinks": true,
  "onlyPagesWithIssues": false,
  "maxLinkChecksPerSite": 300,
  "excludeUrlPatterns": [],
  "maxResults": 0
}
```

- Several sites in one run: each is crawled separately with its own summary.
- **Only pages with errors or warnings** gives you (and charges you for) only the pages that need fixing.
- **Exclude URLs containing** skips faceted or tag pages (`?sort=`, `/tag/`).

### Output sample (shortened)

```json
{
  "site": "crawler-test.com",
  "url": "https://crawler-test.com/",
  "statusCode": 200,
  "seoScore": 67,
  "issueCount": 8, "errorCount": 1, "warningCount": 1,
  "issues": [
    {"code": "viewport_missing", "severity": "warning", "message": "No viewport meta tag (not mobile-friendly)."},
    {"code": "broken_links", "severity": "error", "message": "8 broken link(s)."}
  ],
  "title": "Crawler Test Site",
  "metaDescription": "Default description XIbwNE7SSUJciq0/Jyty",
  "h1": ["Crawler Test Site"],
  "canonical": null,
  "wordCount": 1576,
  "brokenLinks": [
    {"url": "https://crawler-test.com/robots_protocol/non_200_with_noindex", "status": 404, "anchor": "...", "internal": true}
  ],
  "responseTimeMs": 1195,
  "inSitemap": true
}
```

Dataset views: **Overview**, **Issues** (one row per issue) and **Broken links** (one row per broken link), ready to export to CSV, Excel or Google Sheets.

### Score

Each page starts at 100. Every error costs 15 points, every warning 6, every notice 2 (minimum 0). Use it to rank pages; the `issues` list says what to fix.

### Pricing

**$0.039 per audited page.** No start fee. Link checks, unreachable pages and site summaries are free. The Actor never crawls more pages than your *Max charge per run* can pay for, so set that to cap your spend.

### Notes

- Pages that need JavaScript to render their content are audited as served (most SEO-relevant tags are in the raw HTML, which is also what many crawlers see first).
- Keep the request delay at 0.25 s or higher for small sites. Audit sites you own or have permission to crawl.

# Changelog

This Actor's version history is a separate document: https://apify.com/nordic-data/website-seo-audit/changelog.md

# Actor input Schema

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

Home page (or any start page) of each site, e.g. https://example.com. Bare domains work too. Each site is crawled separately and gets its own summary.

## `maxPagesPerSite` (type: `integer`):

Stop crawling a site after this many pages. Each delivered page is one charged result.

## `maxDepth` (type: `integer`):

How many clicks away from the start page to follow links. Sitemap URLs count as depth 1.

## `useSitemap` (type: `boolean`):

Also seed the crawl from the sitemaps listed in robots.txt (or /sitemap.xml) and flag which pages are in the sitemap.

## `includeSubdomains` (type: `boolean`):

Treat blog.example.com, shop.example.com etc. as part of example.com. www is always included.

## `respectRobotsTxt` (type: `boolean`):

Skip URLs that robots.txt disallows. Turn off only for sites you own.

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

Check the status of every link found on the crawled pages (internal pages beyond the crawl limit and, optionally, external links).

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

Also check links that point to other websites. Requires 'Check broken links'.

## `maxLinkChecksPerSite` (type: `integer`):

Upper limit of extra HTTP checks for links that were not crawled. Link checks are free.

## `onlyPagesWithIssues` (type: `boolean`):

Deliver (and pay for) only pages that have at least one error or warning. Site summaries still cover all pages.

## `excludeUrlPatterns` (type: `array`):

Skip URLs that contain any of these strings, e.g. /tag/, ?sort=, /wp-admin/.

## `maxResults` (type: `integer`):

Stop after this many delivered pages across all sites. 0 = no limit.

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

Politeness delay per site. Raise it for small or slow servers.

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

How many pages of one site are fetched at the same time (1-5).

## Actor input object example

```json
{
  "startUrls": [
    "https://books.toscrape.com"
  ],
  "maxPagesPerSite": 50,
  "maxDepth": 5,
  "useSitemap": true,
  "includeSubdomains": false,
  "respectRobotsTxt": true,
  "checkBrokenLinks": true,
  "checkExternalLinks": true,
  "maxLinkChecksPerSite": 300,
  "onlyPagesWithIssues": false,
  "excludeUrlPatterns": [],
  "maxResults": 0,
  "requestDelaySecs": 0.25,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

All page audits (views: Overview, Issues, Broken links).

## `siteSummary` (type: `string`):

Per site: pages crawled, average SEO score, broken links, issue counts.

## `runStats` (type: `string`):

Totals for the run.

# 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": [
        "https://books.toscrape.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nordic-data/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": ["https://books.toscrape.com"] }

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

```

## MCP server setup

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