# SEO Site Audit: Crawl Any Website, Score Every Page (`anupambaruah/seo-site-audit`) Actor

Give it a website and get one SEO audit row per page: title, meta description, headings, canonical, links, images, structured data, issues and a 0-100 score, plus a site summary. You pay only for pages audited; failed and blocked pages are free.

- **URL**: https://apify.com/anupambaruah/seo-site-audit.md
- **Developed by:** [Anupam Baruah](https://apify.com/anupambaruah) (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.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

## SEO Site Audit: crawl a website and score every page

Give it a website. It crawls the pages, checks the on-page SEO basics and returns **one row per page** with the facts (title, meta description, headings, canonical, links, images, structured data), a list of **issues** and a **0-100 score**. A **site summary** with the worst pages is saved alongside.

No browser, no setup, no login. It reads the HTML your site sends, the same way a simple crawler does.

### Who it is for

- **Freelancers and agencies** who need a fast first-pass audit of a client site, or a monthly check across many sites.
- **Site owners and marketers** who want a to-do list of fixes sorted by page.
- **Developers** who want SEO checks in a pipeline: run it on staging, fail the build if the score drops.

### What you get for each page

| Field | Example |
|---|---|
| `url`, `finalUrl` | `https://quotes.toscrape.com/` |
| `status` | `audited`, `skipped` or `error` |
| `statusCode`, `redirectChainLength`, `responseTimeMs` | `200`, `0`, `784` |
| `title`, `titleLength` | `Quotes to Scrape`, `16` |
| `metaDescription`, `metaDescriptionLength` | `null`, `0` |
| `h1Count`, `firstH1` | `1`, `Quotes to Scrape` |
| `canonical` | `https://example.com/page` |
| `robotsMeta`, `noindex`, `nofollow` | from the robots meta tag and the `X-Robots-Tag` header |
| `lang` | `en` |
| `wordCount` | `280` |
| `imageCount`, `imagesMissingAlt` | `12`, `3` |
| `internalLinkCount`, `externalLinkCount` | distinct link targets |
| `brokenLinkCount`, `brokenLinks` | internal links that returned HTTP 400 or higher |
| `hreflangCount` | `2` |
| `hasOpenGraph`, `hasJsonLd`, `jsonLdTypes` | `true`, `true`, `["Organization", "Product"]` |
| `hasViewport` | `true` |
| `issues` | `["missing-meta-description", "thin-content"]` |
| `score` | `62` |
| `skipReason`, `error` | why a page was not audited |

#### Issues and score

The score starts at 100 and each issue found on a page subtracts its penalty (never below 0).

| Issue | Penalty | Triggered when |
|---|---|---|
| `missing-title` | 15 | no `<title>` or it is empty |
| `missing-meta-description` | 10 | no meta description |
| `missing-h1` | 10 | no `<h1>` |
| `noindex` | 10 | robots meta or `X-Robots-Tag` says noindex |
| `broken-links` | 10 | the page links to an internal URL that returned 400 or higher |
| `missing-viewport` | 8 | no viewport meta tag |
| `thin-content` | 8 | fewer than 300 words |
| `duplicate-title` | 7 | another audited page on the site has the same title |
| `slow-response` | 6 | HTML took more than 2000 ms |
| `title-too-long` | 5 | title longer than 60 characters |
| `missing-canonical` | 5 | no canonical link |
| `images-missing-alt` | 5 | an `<img>` has no `alt` attribute (`alt=""` is accepted as decorative) |
| `duplicate-meta-description` | 5 | another audited page has the same meta description |
| `multiple-h1` | 4 | more than one `<h1>` |
| `missing-lang` | 4 | no `lang` on `<html>` |
| `meta-description-too-long` | 3 | meta description longer than 160 characters |

The weights are a judgement call, not a Google formula. Use the score to compare pages and track change over time. The `issues` list is the part to act on.

#### Site summary

One record per site in the key-value store as `SUMMARY-<hostname>` (for example `SUMMARY-quotes.toscrape.com`), plus a `SUMMARY` record holding all sites of the run. It contains pages audited, skipped and failed, the average score, the number of pages per issue, and the 10 worst pages. Summaries are free.

### How to use it

1. Add one or more websites to **Websites to audit**.
2. Set **Maximum pages per site**. Every audited page is billed, so this is your cost cap per site.
3. Click **Start**, then download the rows as CSV, Excel or JSON, or read them through the API.

#### Input

| Setting | Default | What it does |
|---|---|---|
| Websites to audit | two sample sites | Start URLs. One crawl per website (www and non-www count as the same site). |
| Maximum pages per site | 50 (max 1000) | Crawl stops here. |
| Stay on the same domain | on | Off also crawls subdomains such as `blog.example.com`. |
| Only crawl URLs matching | empty | Patterns, one per line. With `*` it is a wildcard on the full URL (`https://example.com/blog/*`), without `*` it matches if the URL contains the text. |
| Skip URLs matching | empty | Same rules. Matching URLs are not fetched or billed. |
| Respect robots.txt | on | Skips pages the site owner excluded. |
| Use sitemap.xml | on | Seeds the crawl from `/sitemap.xml` and sitemaps listed in `robots.txt`. |
| Websites in parallel | 5 | Each site is crawled with 3 requests at a time. |
| Page timeout | 20 s | Gives up on slow pages. |
| Proxy | off | Only if many pages come back blocked. |

#### Example output (one page)

```json
{
    "url": "https://quotes.toscrape.com/",
    "finalUrl": "https://quotes.toscrape.com/",
    "status": "audited",
    "statusCode": 200,
    "redirectChainLength": 0,
    "responseTimeMs": 784,
    "site": "quotes.toscrape.com",
    "crawlDepth": 0,
    "issues": ["missing-meta-description", "missing-canonical", "thin-content", "missing-viewport", "duplicate-title"],
    "score": 62,
    "title": "Quotes to Scrape",
    "titleLength": 16,
    "metaDescription": null,
    "metaDescriptionLength": 0,
    "h1Count": 1,
    "firstH1": "Quotes to Scrape",
    "canonical": null,
    "noindex": false,
    "lang": "en",
    "wordCount": 280,
    "imageCount": 0,
    "imagesMissingAlt": 0,
    "internalLinkCount": 47,
    "externalLinkCount": 2,
    "brokenLinkCount": 0,
    "brokenLinks": [],
    "hreflangCount": 0,
    "hasOpenGraph": false,
    "hasJsonLd": false,
    "jsonLdTypes": [],
    "hasViewport": false
}
```

#### Status values

| Status | Meaning | Charged? |
|---|---|---|
| `audited` | The page returned HTML and was checked | Yes |
| `skipped` | Blocked by robots.txt, not an HTML page, or a redirect to another site or to a page already crawled (`skipReason` says which) | No |
| `error` | The page could not be loaded (HTTP 400 or higher, timeout, DNS problem) or the start URL is invalid | No |

### Pricing

**$2.00 per 1,000 pages audited; failed pages are free.** Pages that fail to load, are blocked by robots.txt or are not HTML are not charged, and neither are summaries. Apify's standard start fee per run also applies. Set a maximum cost per run and the crawl stops cleanly when it is reached; pages already audited are kept.

### Limits

- **No JavaScript rendering.** Pages are read as plain HTML. Sites that build their content in the browser (many single-page apps) will show thin or empty pages. What you see is what a non-rendering crawler sees.
- **No Core Web Vitals.** `responseTimeMs` is how long the server took to send the HTML. It is not LCP, CLS or INP.
- **No backlink, ranking or keyword data.**
- **Broken links are checked against the pages the crawl visited.** A link to an internal URL beyond your page limit, excluded by a pattern or blocked by robots.txt is not checked. External links are counted but not checked.
- **Duplicate checks cover the audited pages only,** not the whole site.
- Word count splits on letters and digits, so it is approximate for Chinese, Japanese and Thai.
- Compressed sitemaps (`.xml.gz`) are not read. At most 6 sitemap files and 5,000 sitemap URLs are used.
- Only the first 2 MB of each page is read.
- Pages are crawled breadth-first, so with a page limit you get the pages closest to the start URL, plus sitemap URLs, first.

### Common uses

- Client audits and monthly check-ups for agencies.
- Pre-launch checks on a staging site (use a patterns filter to keep it focused).
- Finding pages missing titles, descriptions or H1s across a large site.
- Tracking the average score over time by running on a schedule.

### Use it from code

```bash
curl -X POST "https://api.apify.com/v2/acts/anupambaruah~seo-site-audit/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": [{"url": "https://example.com"}], "maxPagesPerSite": 100}'
```

### FAQ

**Does it follow robots.txt?** Yes by default, and it identifies itself as `SeoSiteAudit` in the User-Agent. You can turn it off for sites you own.

**Why was a page not charged?** Only pages that returned HTML and were audited are billed. Check `status` and `skipReason`.

**Why is my JavaScript site almost empty?** The Actor does not run JavaScript. Check the page's raw HTML source (View Source): that is what it audits.

**Can it audit pages behind a login?** No.

**Why does every page get `duplicate-title`?** Every page on the site really does share the same title. Fix the template.

**Can I change the thresholds?** Not in the input. The values above are fixed so scores stay comparable between runs.

**Is it fast?** Roughly a few pages per second per site, depending on how quickly the site responds. 1,000 pages usually takes a few minutes.

### Questions or a missing check?

Open an issue on the **Issues** tab with an example URL.

# Actor input Schema

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

One or more websites. Each start URL is crawled on its own, following internal links from that page. Plain domains (example.com) and full URLs both work.

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

Crawling stops after this many pages per website. Every audited page is billed, so this is also your cost cap per site.

## `sameDomainOnly` (type: `boolean`):

On: only pages on the exact host of the start URL (www. and non-www are treated as the same). Off: subdomains such as blog.example.com are crawled too.

## `includeUrlPatterns` (type: `array`):

One pattern per line. A pattern with \* is a wildcard match on the full URL (https://example.com/blog/\*). A pattern without \* matches if the URL contains it. Leave empty to crawl everything. The start URL is always audited.

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

Same pattern rules as above. URLs that match are not fetched and not billed.

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

Skip pages the website owner has asked crawlers not to visit. Recommended.

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

Reads /sitemap.xml and any sitemap listed in robots.txt to find pages that are not linked from other pages.

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

Each website is crawled with a few requests at a time so no single site is overloaded.

## `pageTimeoutSecs` (type: `integer`):

Give up on a page that takes longer than this.

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

Not needed for most websites. Turn on a proxy only if many pages come back blocked.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://quotes.toscrape.com/"
    },
    {
      "url": "https://example.org/"
    }
  ],
  "maxPagesPerSite": 20,
  "sameDomainOnly": true,
  "respectRobotsTxt": true,
  "useSitemap": true,
  "maxConcurrency": 5,
  "pageTimeoutSecs": 20
}
```

# Actor output Schema

## `results` (type: `string`):

One row per page with SEO metrics, issues and a 0-100 score.

## `summaries` (type: `string`):

Page counts per issue, average score and the 10 worst pages for every site in this run.

## `summaryKeys` (type: `string`):

Key list of the key-value store. Each site has its own SUMMARY-<hostname> record.

# 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://quotes.toscrape.com/"
        },
        {
            "url": "https://example.org/"
        }
    ],
    "maxPagesPerSite": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("anupambaruah/seo-site-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://quotes.toscrape.com/" },
        { "url": "https://example.org/" },
    ],
    "maxPagesPerSite": 20,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,anupambaruah/seo-site-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/A9InwZnvEwPZOWRgP/builds/ncPeNfpsrW5gCfXZM/openapi.json
