# SEO Audit & Broken Link Checker: Website Crawler (`ocius-data/seo-site-audit`) Actor

Crawl a site and audit every page: broken links, redirect chains, titles, meta, H1, canonical, noindex and orphan pages. AI agents ready via MCP.

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

## Pricing

from $2.10 / 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.
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

## SEO Audit & Broken Link Checker: Website Crawler

**Every run compares each page with your previous audit of the same site and reports what got better, what got worse, and which fix raises your score the most. The result comes in the run message, a free summary row and a shareable HTML report.** None of the three most-used SEO audit Actors we compared in November 2026 runs this comparison for you.

Crawl a whole website and get a technical SEO audit of every page: broken links (with the page and anchor text where each one appears), redirects and redirect chains, status codes, titles, meta descriptions, H1 headings, canonical tags, noindex, duplicate titles and descriptions, XML sitemap extraction and coverage, orphan pages, response time and page size. Every page gets a 0–100 score and a list of issues with a severity and a fix.

It works with plain HTTP requests (no browser), so it is fast (the example input, 30 pages of apify.com, finished in 19 to 21 seconds on 4 November 2026) and costs a fraction of a cent per page. **You pay only for pages saved in the dataset. The site summary is free. Blocked or failed pages are never charged.**

### What this SEO audit tool does

- **Site-wide crawl.** Starts from your URL(s), follows internal links breadth first up to your page and depth limits, deduplicates URLs (fragments, tracking parameters such as `utm_*` and `gclid`, parameter order) and respects `robots.txt` by default.
- **Broken link checker.** Checks every link found, including internal links beyond your crawl limits and, optionally, external links. Each page lists its broken links with status code, error and anchor text; the summary ranks broken URLs by how many pages link to them.
- **Redirect checker.** Records every redirect without following it blindly, so you see the full chain (`301 → 302 → 200`), loops, chains of more than one hop and temporary redirects.
- **Change detection (new).** Each page row shows `changeStatus` (`IMPROVED`, `WORSE`, `CHANGED`, `UNCHANGED`, `NEW_PAGE` or `FIRST_AUDIT`), `previousScore`, `scoreChange`, `newIssues` and `fixedIssues`. The site summary adds the average score change, pages improved and worse, and the issues that appeared or were fixed. The last audit of each site is kept in a named key-value store in your account (`historyStoreName`). No extra cost.
- **Fix plan and HTML report (new).** The site summary ranks the five fixes with the largest average score gain (`fixPlan`) and gives a score per category (meta, headings, content, indexing, technical, links, images). The `REPORT` record is a ready-to-share HTML page with the same content.
- **On-page SEO.** Title and length, meta description and length, H1 count, canonical (self, other or missing), meta robots and `X-Robots-Tag`, `lang`, hreflang, schema.org types (JSON-LD and microdata), Open Graph tags, word count, images without alt text.
- **Sitemap extractor and coverage.** Finds sitemaps from `robots.txt`, `/sitemap.xml` and `/sitemap_index.xml` (sitemap indexes and `.gz` files included), saves every sitemap URL with its `lastmod`, and reports sitemap URLs that do not return 200, noindex pages in the sitemap, indexable pages missing from it and orphan pages (in the sitemap but not linked from any crawled page).
- **Speed basics.** HTML download time and size per page, with the slowest and largest pages in the summary.

### Use cases

- **Technical SEO audits** for clients or your own sites, exported to Google Sheets, CSV or Excel.
- **Broken link monitoring:** schedule a weekly run and get alerted when new 404s appear.
- **Site migrations:** confirm every old URL redirects in one hop to a page that returns 200.
- **Content teams:** find missing or duplicated titles and descriptions before they cost rankings.
- **Sitemap QA:** make sure the sitemap lists only final, indexable URLs.
- **AI agents and automations:** a flat input and structured issues make it easy to call from MCP clients, Zapier, Make or n8n.

### How to use it

1. Enter one or more **Start URLs** (for example `https://example.com`).
2. Set **Max pages** (the run never audits more, and your maximum cost per run also caps it).
3. Click **Start**. A 30-page audit usually finishes in under a minute.

Main options:

| Option | Default | What it does |
|---|---|---|
| `startUrls` | — | Site(s) to audit. Each start URL gets its own summary row. |
| `maxPages` | 100 | Maximum pages audited (and charged) per run. |
| `maxDepth` | 10 | Clicks away from the start URL. `0` audits only the start URLs. |
| `sameDomainOnly` | true | Off: external pages linked from your site are also audited (one level). |
| `includeSubdomains` | false | Treat `blog.example.com` and similar as part of the site. `www` is always included. |
| `respectRobotsTxt` | true | Skip disallowed URLs and honor `Crawl-delay` (up to 5 s). |
| `checkInternalLinks` | true | Check internal links beyond the crawl limits so broken links are complete. |
| `checkExternalLinks` | false | Check links to other websites. |
| `maxLinkChecks` | 1000 | Upper limit of link checks per run. |
| `useSitemap` | true | Discover sitemaps, compare them with the crawl and audit sitemap-only pages with any budget left. |
| `sitemapUrls` | — | Use these sitemaps instead of auto-discovery. |
| `checkSitemapUrls` | false | Also check the status of every sitemap URL that was not crawled. |
| `userAgent` | browser headers | Custom User-Agent, also used to match `robots.txt` rules. |
| `maxConcurrency` / `maxRequestsPerMinute` | 5 / 600 | Politeness limits for the audited server. |
| `proxyConfiguration` | none | Only if the site blocks the crawl. |

Example input:

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

### Output

The dataset has two kinds of rows. Both carry `recordType` (and the older `type`, kept for compatibility):

- **`recordType: "page"`**: one row per audited page (charged).
- **`recordType: "siteSummary"`**: one row per site with totals, fix plan, changes since the last audit, top issues, broken links, duplicates, sitemap coverage, `robots.txt` and performance (free).

Dataset views (every column labeled): **Overview (pages and site summary)** opens first and works for both row types; then Changes since last audit, Overview (pages only), Issues, Broken links, Titles/meta/headings, Status codes and redirects, Speed and size, and Site summary. The Output tab links to each view, to the overview as CSV (ready for Excel or Google Sheets) and to the HTML report.

Run message from a real second run of the example input (4 November 2026): `Audited 30 pages of apify.com: average score 98 (unchanged since the last audit; 0 new issues, 0 fixed); 1 broken link; 1 error types; top fix: BROKEN_LINKS on 1 page (+0.5 average score). Report: https://api.apify.com/v2/key-value-stores/.../records/REPORT`.

Example page row (shortened):

```json
{
  "type": "page",
  "url": "https://example.com/pricing",
  "statusCode": 200,
  "indexable": true,
  "score": 79,
  "title": "Pricing · Example",
  "titleLength": 17,
  "metaDescription": "Simple plans for every team...",
  "h1Count": 1,
  "canonical": "https://example.com/pricing",
  "canonicalStatus": "self",
  "wordCount": 912,
  "responseTimeMs": 240,
  "sizeKb": 88.4,
  "internalLinks": 59,
  "externalLinks": 12,
  "brokenLinksOnPage": [
    { "url": "https://example.com/old-plan", "statusCode": 404, "error": null, "anchorText": "Legacy plan", "linkType": "internal" }
  ],
  "issues": [
    { "code": "BROKEN_LINKS", "severity": "error", "message": "The page links to URLs that return an error or do not respond.", "detail": "1 broken link", "fix": "Fix or remove the links listed in brokenLinksOnPage." },
    { "code": "TITLE_TOO_SHORT", "severity": "notice", "message": "The title is shorter than 30 characters.", "detail": "17 characters", "fix": "Use a more descriptive title of 30 to 60 characters." }
  ]
}
```

Other records in the key-value store (Storage tab):

- `RUN_SUMMARY`: status of each start URL (`startUrls`), counts of audited, blocked, failed and non-HTML URLs (`counts`), `failureRatePercent`, `pagesCharged` and the reconciliation of charged pages against saved rows (`reconciliationOk`, `reconciliation`), `linksChecked`, `linkCheckLimitReached`, `chargeLimitReached`, `stoppedByTimeout`, `sitemapUrls`, `history` (comparison on or off, store name and status per site), `reportUrl`, `durationSeconds` and `finishedAt`.
- `REPORT`: self-contained HTML report (score, fix plan, category scores, changes since the last audit, every issue type, broken URLs and pages that got worse). Free.
- `SITEMAP_URLS`: every URL found in the sitemaps, with `lastmod` and source sitemap (up to 50,000 URLs). Free.
- `STATE`, `OUTPUT_STATE`, `PAGES_n`, `SITEMAP_INDEX`: internal progress records that let the run resume after a platform migration without duplicating or re-charging pages.

Named key-value store `seo-site-audit-history` (or your `historyStoreName`): one record per site (`site-<hash>`) with the date, average score and the score and issue codes of each page of the last audit (up to 20,000 pages). It is the baseline for the next comparison and stays in your account until you delete it.

#### Field dictionary (page rows)

| Field | Type | Meaning | Null when |
|---|---|---|---|
| `type` | string | Always `page`. | Never |
| `url` | string | Normalized URL that was requested. | Never |
| `site` | string | Site the page belongs to (domain without `www`). | Never |
| `statusCode` | number | HTTP status of this URL (redirects are not followed, so a 301 shows 301). | Never |
| `finalStatusCode` | number | Status at the end of the redirect chain. | Chain end unknown |
| `redirectTarget` | string | `Location` of a redirect. | Not a redirect |
| `redirectChain` | array | Every hop `{url, statusCode}`, ending with the final URL. | Empty if not a redirect |
| `indexable` | boolean | 200, HTML, no noindex and canonical missing or self-referencing. | Never |
| `indexabilityReason` | string | Why the page is not indexable. | Indexable |
| `score` | number | 0–100: 100 minus 15 per error, 5 per warning and 1 per notice type. | Never |
| `issueCount`, `errors`, `warnings`, `notices` | number | Issue counts. | Never |
| `title`, `titleLength` | string, number | Page title (SVG titles ignored) and its length. | No title / not an HTML 2xx page |
| `metaDescription`, `metaDescriptionLength` | string, number | Meta description and its length. | Missing |
| `h1`, `h1Count`, `h2Count` | string, number | First H1 and heading counts. | Not an HTML 2xx page |
| `canonical`, `canonicalStatus` | string | Canonical URL; `self`, `other` or `missing`. | Not an HTML 2xx page |
| `robotsMeta`, `xRobotsTag` | string | Meta robots / googlebot content and the `X-Robots-Tag` header. | Not set |
| `lang` | string | `lang` attribute of the html tag. | Not set |
| `hreflang` | array | `{lang, url}` alternates. | Empty if none |
| `schemaTypes` | array | schema.org types found in JSON-LD and microdata. | Empty if none |
| `ogTags` | object | Open Graph title, description, image, type and url. | Empty if none |
| `wordCount` | number | Words of visible text (scripts and styles excluded). | Not an HTML 2xx page |
| `imagesCount`, `imagesWithoutAlt` | number | Images and images with no alt attribute. | Not an HTML 2xx page |
| `internalLinks`, `externalLinks` | number | Distinct link targets on the page. | Not an HTML 2xx page |
| `inlinks` | number | Crawled pages that link to this URL. | External page |
| `brokenLinksCount`, `brokenLinksOnPage` | number, array | Broken links `{url, statusCode, error, anchorText, linkType}` (first 100 listed). | 0 / empty |
| `redirectingLinksCount` | number | Links on the page that point to redirects. | Never |
| `responseTimeMs` | number | Time to download the HTML, in milliseconds. | Never for crawled pages |
| `sizeKb` | number | HTML size in KB (uncompressed). | Redirects |
| `contentType` | string | Response content type. | Not sent |
| `depth` | number | Clicks from the start URL. | Never |
| `foundVia` | string | `start`, `link`, `redirect` or `sitemap`. | Never |
| `isExternal` | boolean | Audited external page (`sameDomainOnly` off). | Never |
| `inSitemap`, `sitemapLastmod` | boolean, string | Listed in the XML sitemap, and its `lastmod`. | Not listed |
| `recordType` | string | Always `page` (same value as `type`). | Never |
| `issues` | array | `{code, severity, category, message, detail, fix}` sorted by severity. | Empty if none |
| `categoryScores` | object | Score from 0 to 100 per category: `meta`, `headings`, `content`, `indexing`, `technical`, `links`, `images` (same weights as `score`). | Never |
| `changeStatus` | string | Against the previous audit of the site: `IMPROVED`, `WORSE`, `CHANGED` (same score, different issues), `UNCHANGED`, `NEW_PAGE`, `FIRST_AUDIT` or `NOT_COMPARED` (comparison off or external page). | Never |
| `previousScore`, `scoreChange` | number | Score in the previous audit and the difference. | Not compared, first audit or new page |
| `newIssues`, `fixedIssues` | array | Issue codes that appeared or disappeared since the previous audit. | Empty when nothing changed |
| `previousAuditAt` | string | ISO 8601 time of the previous audit. | First audit or not compared |
| `hasViewport`, `hasCharset` | boolean | Viewport meta tag present; character set declared. | Not an HTML 2xx page |
| `titleTagCount`, `metaDescriptionCount`, `canonicalCount` | number | Number of title tags, meta description tags and canonical tags. | Not an HTML 2xx page |
| `metaRefreshUrl` | string | Target of a meta refresh redirect. | No meta refresh |
| `ogTitle`, `ogImage` | string | Open Graph title and image (also inside `ogTags`). | Not set |
| `twitterCard` | string | `twitter:card` meta value. | Not set |
| `nofollowLinks` | number | Links with `rel="nofollow"`. | Not an HTML page |
| `linksNotChecked` | number | Links on the page whose status is unknown because `maxLinkChecks` or the run time ran out. | Not an HTML page |
| `dataQuality` | array | Why a value may be incomplete: `REDIRECT_NO_ON_PAGE_DATA`, `ERROR_PAGE_NO_ON_PAGE_DATA`, `SOME_LINKS_NOT_CHECKED`, `LINKS_CAPPED_AT_1000`, `BROKEN_LINK_LIST_CAPPED_AT_100`, `RESPONSE_TIME_UNKNOWN`, `EXTERNAL_PAGE`. | Empty when complete |
| `startUrl` | string | Start URL of the site. | Never |
| `scrapedAt` | string | ISO 8601 time the page was fetched (UTC). | Never |

#### Site summary row

New in 0.2.3: `recordType` (`siteSummary`); `errors`, `warnings`, `notices` and `brokenLinksCount` (site totals); `categoryScores` (average per category); `fixPlan` (up to five fixes `{priority, code, severity, category, pages, averageScoreGain, message, fix, examples}` with the largest average score gain first) and `topFix` (the first one as text); every `topIssues` entry also has `category` and `averageScoreGain`; `changeStatus` (`COMPARED`, `FIRST_AUDIT` or `NOT_COMPARED`), `previousAverageScore`, `averageScoreChange`, `newIssuesCount`, `fixedIssuesCount`, `pagesImproved`, `pagesWorse`, `previousAuditAt` and `changesSinceLastAudit` (detail: pages compared, improved, worse, changed, unchanged, new pages, previous pages not audited this time, top new and fixed issues, pages that got worse); `reportUrl` (link to the HTML report); `dataQuality` (`CRAWL_LIMITED_BY_MAX_PAGES_OR_DEPTH`, `LINK_CHECK_LIMIT_REACHED`, `STOPPED_BY_TIMEOUT`, `SITEMAP_TRUNCATED`, `SOME_PAGES_BLOCKED_OR_FAILED`, `PREVIOUS_AUDIT_HAD_DIFFERENT_PAGE_COUNT`).

Also: `pagesAudited`, `averageScore`, `indexablePages`, `statusCodes` (count per code), `issuesBySeverity`, `topIssues` (every issue type with pages affected, examples and fix), `brokenLinks` (unique broken URLs, occurrences, top 25 with the pages that link to them), `redirects`, `duplicateTitles` and `duplicateMetaDescriptions` (top 10 groups), `performance` (average and median response time, average size, slowest and largest pages), `sitemap` (files found, URLs in sitemaps, crawled, not 200, coverage, indexable pages not in sitemap, orphan pages), `robotsTxt` (found, crawl delay, declared sitemaps, linked URLs disallowed), `crawl` (budget, URLs discovered, not crawled because of limits, blocked, failed, links checked, `stoppedBy`).

### Issue glossary

| Code | Severity | What it means | How to fix |
|---|---|---|---|
| `PAGE_4XX` | error | The page returns 404, 410 or another 4xx. | Restore it or redirect it (301) and update links. |
| `PAGE_5XX` | error | The page returns a server error (retried once first). | Check server logs. |
| `REDIRECT_LOOP` | error | The redirect never reaches a final page. | Redirect straight to a 200 page. |
| `REDIRECT_TO_ERROR` | error | The redirect ends on an error page. | Point it to a 200 page. |
| `BROKEN_LINKS` | error | Links on the page return 4xx/5xx or do not respond. | See `brokenLinksOnPage`. |
| `MISSING_TITLE` | error | No title tag, or empty. | Add a unique title of 30–60 characters. |
| `CANONICAL_BROKEN` | error | The canonical URL errors or redirects. | Point it to a 200 URL. |
| `NOINDEX_IN_SITEMAP` | error | A noindex page is listed in the sitemap. | Remove it from the sitemap or remove noindex. |
| `SITEMAP_URL_NOT_200` | error | A sitemap URL redirects or errors. | List only final 200 URLs. |
| `REDIRECT_CHAIN` | warning | More than one redirect hop. | Redirect in a single hop. |
| `TITLE_TOO_LONG` | warning | Title over 60 characters. | Shorten it. |
| `MULTIPLE_TITLES` | warning | More than one title tag. | Keep one. |
| `DUPLICATE_TITLE` | warning | Same title as another indexable page. | Make titles unique. |
| `MISSING_META_DESCRIPTION` | warning | No meta description. | Add one of 70–160 characters. |
| `MISSING_H1` | warning | No H1 heading. | Add one H1. |
| `MULTIPLE_CANONICALS` | warning | More than one canonical tag. | Keep one. |
| `NOINDEX` | warning | The page asks not to be indexed. | Remove noindex if it should rank. |
| `ORPHAN_PAGE` | warning | In the sitemap, but no crawled page links to it. | Link to it internally. |
| `SLOW_RESPONSE` | warning | HTML took more than 1.5 s to download. | Check server time, caching and weight. |
| `LARGE_HTML` | warning | HTML larger than 1 MB. | Remove inline bloat. |
| `MISSING_VIEWPORT` | warning | No viewport meta tag (mobile). | Add the viewport tag. |
| `NOT_HTTPS` | warning | Served over plain HTTP. | Move to HTTPS. |
| `TEMPORARY_REDIRECT` | notice | 302, 303 or 307 used. | Use 301/308 if permanent. |
| `LINKS_TO_REDIRECTS` | notice | Links point to redirecting URLs. | Link to the final URL. |
| `TITLE_TOO_SHORT` | notice | Title under 30 characters. | Make it more descriptive. |
| `META_DESCRIPTION_TOO_LONG` / `_TOO_SHORT` | notice | Over 160 or under 70 characters. | Adjust the length. |
| `DUPLICATE_META_DESCRIPTION` | notice | Same description as another indexable page. | Make it unique. |
| `MULTIPLE_H1` | notice | More than one H1. | Use one H1. |
| `MISSING_CANONICAL` | notice | No canonical tag. | Add a self-referencing canonical. |
| `CANONICALIZED` | notice | Canonical points to another URL. | Expected for duplicates. |
| `NOT_IN_SITEMAP` | notice | Indexable page missing from the sitemap. | Add it. |
| `LOW_WORD_COUNT` | notice | Fewer than 200 visible words. | Add useful content if it should rank. |
| `IMAGES_WITHOUT_ALT` | notice | Images without an alt attribute. | Add alt text. |
| `MISSING_LANG` | notice | No `lang` on the html tag. | Add it. |
| `META_REFRESH` | notice | Meta refresh redirect. | Use a server-side 301. |

### Pricing and cost calculator

**Apify Store discounts:** 15% less on Silver and 30% less on Gold and above (USD 0.00255 and USD 0.0021 per page).

This Actor uses pay-per-event pricing with one event:

| Event | Price | When it is charged |
|---|---|---|
| `page` | USD 0.003 | Each audited page saved in the dataset, with every check included (link checks, redirects, sitemap coverage). |

**Typical job cost** (prices read from the Actor's live pricing on 4 November 2026; platform compute is included, you pay only the events below):

- A 30-page audit (the example input) costs about USD 0.09: 30 pages × USD 0.003 plus the one-time Actor start fee of USD 0.00005.
- A 50-page audit costs about USD 0.15; a 500-page audit about USD 1.50.
- The comparison with the previous audit, the fix plan, the HTML report and the site summary add nothing.

**Free plan:** the USD 5 of monthly usage included in the Apify Free plan covers about 1,650 audited pages (USD 0.003 each), for example 8 audits of a typical 200-page site.

Free: the site summary row, the change detection, the fix plan, `REPORT`, `SITEMAP_URLS`, `RUN_SUMMARY`, link checks, and every blocked, failed or non-HTML URL.

| Scenario | Pages | Cost |
|---|---|---|
| Quick check of a small site | 30 | USD 0.09 |
| Typical small business site | 200 | USD 0.60 |
| Weekly broken link monitor, 500 pages, for a month | 2,000 | USD 6.00 |
| Large site audit | 10,000 | USD 30.00 |

Formula: `pages saved × 0.003`. Your maximum cost per run is respected: the crawl never fetches more pages than the limit can pay for, and the summary shows `stoppedBy: "maxCostPerRun"` when it applied.

### Integrations: schedules, API, webhooks, Google Sheets, Zapier, Make and AI agents

- **Schedules.** In Apify Console, open **Schedules**, create a weekly schedule and add this Actor with your saved input. Each run compares itself with the previous one, so the run message and the `changes` view tell you at a glance what got better or worse.

- **API.** Run the audit and get the rows in one call:

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

  Python, with the official `apify-client` package:

  ```python
  from apify_client import ApifyClient

  client = ApifyClient("YOUR_API_TOKEN")
  run = client.actor("ocius-data/seo-site-audit").call(
      run_input={"startUrls": [{"url": "https://example.com"}], "maxPages": 200}
  )
  rows = list(client.dataset(run["defaultDatasetId"]).iterate_items())
  summary = next(r for r in rows if r["type"] == "siteSummary")
  ```

- **Webhooks.** In the **Integrations** tab, add a webhook for `ACTOR.RUN.SUCCEEDED`; the rows are at `/v2/datasets/{defaultDatasetId}/items`. Filter on `brokenLinksCount > 0` to build alerts.

- **Google Sheets.** Use the Google Sheets integration to append each run, or export a view (for example **Broken links**) as CSV or Excel.

- **Zapier, Make and n8n.** Use the official Apify app: trigger on "Actor run finished" and read the dataset items, or start a run from your workflow.

- **MCP and AI agents.** The input is flat and every issue has a code, severity and fix, so it works through the Apify MCP server (`mcp.apify.com`). Ask Claude, ChatGPT, Cursor or another MCP client to run `ocius-data/seo-site-audit` and summarize what to fix first.

### Statuses and errors

Each start URL gets a status in `RUN_SUMMARY`, and the run message shows the counts.

| Status | Meaning | Charged | What to do |
|---|---|---|---|
| `OK` | The page was fetched and audited (including 3xx, 4xx and 5xx pages, which are findings). | Yes | Nothing |
| `BLOCKED` | The site answered with bot protection (Cloudflare challenge, captcha, 429) after retries. | No | Lower the request rate, enable a proxy (residential works best) or set a user agent. |
| `ERROR` | No response (DNS, TLS, timeout). | No | Check the URL and that the site is online. |
| `NON_HTML` | The URL returned a file, not an HTML page. | No | Nothing; it is still used for link checks. |
| `NOT_PROCESSED_COST_LIMIT` | Your maximum cost per run was reached first. | No | Raise the limit. |

Invalid input stops the run within seconds with a message that explains the fix. The run is marked **failed** when no page could be audited, or when more than 20% of the pages were unavailable (blocked, no response or server errors 5xx), so a site that is down never looks like a clean audit. Pages that were audited are still saved, so you never lose data you paid for.

### Known limits

- Pages are fetched as HTML without running JavaScript. Sites that build their content only in the browser (some single-page apps) show little text and few links; server-rendered and statically generated sites are fully covered.
- `responseTimeMs` is the HTML download time from the Apify data center, not Core Web Vitals measured in a browser.
- Sitemap extraction stops at 50 sitemap files or 50,000 URLs per run; `truncated` tells you when that happened.
- `robots.txt` `Crawl-delay` is honored up to 5 seconds per request, so the run can finish.
- Link checks use HEAD requests (GET when the server rejects HEAD). Links that answer 401, 403, 429 or 999 (logins, LinkedIn, rate limits) are treated as access-restricted, not broken, because those sites refuse automated checks while working fine in a browser.
- Each audited run saves its progress, so if Apify moves the run to another server it resumes without duplicating or re-charging pages.

### FAQ

**Is this a Screaming Frog alternative?** For technical audits of server-rendered sites, yes: crawl, status codes, redirects, broken links, titles, descriptions, headings, canonicals, noindex, sitemaps and duplicates, as an API you can schedule, priced per page.

**Can I check only broken links?** Yes. Run it normally and use the **Broken links** view, or filter rows by `brokenLinksCount > 0`. Turn on `checkExternalLinks` to include outbound links.

**Can I just extract a sitemap?** Yes. Every sitemap URL is saved in the `SITEMAP_URLS` record for free. Set `maxPages` to 1 to pay for a single page.

**Why is a 404 page charged?** Because it was audited: a broken page is one of the most valuable findings. Blocked and failed requests are never charged.

**Does it follow nofollow links?** Yes, internal links are followed regardless of `rel="nofollow"`, so the audit covers the whole site.

**Do you offer volume pricing?** For more than 100,000 pages per month, open an issue on the Actor page.

### Related Actors from ocius-data

Built to the same standard: a status for every input in `RUN_SUMMARY`, actionable error messages and flat inputs, so they chain well in one SEO workflow:

- **[Bulk Keyword Search Volume & CPC - Keyword Planner](https://apify.com/ocius-data/keyword-metrics)**: monthly search volume, cost per click and competition for the keywords your pages target.
- **[Bulk Domain Authority & Backlinks Checker API](https://apify.com/ocius-data/domain-authority)**: authority and backlink profile of your domain and your competitors.
- **[Google Autocomplete API: Keyword Ideas & Questions](https://apify.com/ocius-data/google-autocomplete-keyword-ideas)**: long-tail keyword ideas and questions for new content.
- **[Google Trends API: Interest, Related & Trending Now](https://apify.com/ocius-data/google-trends-reliable)**: demand over time and by region for the topics of your site.

### Changelog

- **0.2.3** (4 November 2026) Change detection against the previous audit of each site (page and site level), fix plan ranked by score gain, score per category, HTML report (`REPORT`, linked in the run message with a signed URL that opens without a token), data-quality flags per row, `recordType` on every row, a neutral first view and a "Changes since last audit" view, labels on every column, links to every view and a CSV link in the Output tab, and ten more on-page fields read from the same HTML (no extra requests). Link checks now use the full per-minute request budget instead of an even pace, which makes the example run faster. Nothing was removed or renamed.
- **0.1** (November 2026) First version: site-wide crawl, broken link and redirect checks, on-page SEO, sitemap extraction and coverage, orphan pages, duplicates, speed basics, page score and free site summary.

### Tutorials and examples

**Ready-to-import templates:** [n8n workflow](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/integrations/n8n/seo-site-audit-broken-links-email.json), [Google Sheets](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/tree/main/integrations/google-sheets), [Make](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/integrations/make.md), [Zapier](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/integrations/zapier.md) and a [webhook receiver](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/integrations/webhook/receiver.mjs).

- Tutorial: [Technical SEO audit and broken link checker in Python: a prioritized fix list](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/tutorials/seo-site-audit-broken-links-python.md)
- Example code: [Python: prioritized SEO fixes](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/python/seo_audit_priorities.py)
- All examples: [apify-data-apis-examples on GitHub](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples)

### Rate this Actor

If this Actor saved you time, please consider leaving a rating or a short review on its Apify Store page. It helps other users find it and shows us what to improve. If something does not work as expected, please open an issue first so we can fix it.

### Support

Open an issue on the Actor page. Issues are reviewed every day and fixes are released quickly.

# Changelog

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

# Actor input Schema

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

The website(s) to audit. The crawl starts here and follows internal links. Each start URL defines one site and gets its own site summary row.

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

Maximum number of pages to audit across all sites. You are charged only for pages saved in the dataset. Your maximum cost per run also caps the crawl.

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

How many clicks away from the start URL the crawl goes. 0 audits only the start URLs.

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

When on (recommended), only pages of the start domains are audited. When off, external pages linked from your site are also audited (one level, their links are not followed) and charged as pages.

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

Treat subdomains (for example blog.example.com) as part of the site. www and the bare domain are always the same site.

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

Skip URLs that robots.txt disallows and honor its Crawl-delay (up to 5 seconds). Disallowed URLs are listed in the site summary.

## `checkInternalLinks` (type: `boolean`):

Also check the status of internal links beyond the page or depth limit, so broken links are reported completely. Light HEAD requests, not charged.

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

Check the status of links to other websites and report broken ones. Not charged; counts toward Max link checks.

## `maxLinkChecks` (type: `integer`):

Upper limit of link, canonical, redirect and sitemap URL checks per run (URLs that were not crawled). Raise it for large sites with many links.

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

Find the XML sitemap (robots.txt Sitemap lines, then /sitemap.xml and /sitemap_index.xml), compare it with the crawl and audit sitemap-only pages with any page budget left.

## `sitemapUrls` (type: `array`):

Optional. Sitemap or sitemap index URLs to use instead of auto-discovery. Gzipped sitemaps are supported.

## `checkSitemapUrls` (type: `boolean`):

Also check the status code of sitemap URLs that were not crawled (up to Max link checks), to find sitemap entries that redirect or are broken.

## `compareWithPreviousRun` (type: `boolean`):

Compare every page with the previous audit of the same site and report score changes, new issues and fixed issues (no extra cost). The last audit of each site is kept in a named key-value store in your account.

## `historyStoreName` (type: `string`):

Name of the key-value store that keeps the last audit of each site for the comparison. Letters, numbers and hyphens only. Use a different name to keep separate histories (for example one per client).

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

Optional. Custom User-Agent header, also used to match robots.txt rules. Empty sends realistic browser headers and matches the generic (\*) robots.txt group.

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

Maximum parallel requests. Keep it low for small servers.

## `maxRequestsPerMinute` (type: `integer`):

Rate limit for requests to the audited site (pages and link checks).

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

Optional. Not needed for most sites. Use it only if the site blocks the crawl (blocked pages are never charged).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxPages": 30,
  "maxDepth": 10,
  "sameDomainOnly": true,
  "includeSubdomains": false,
  "respectRobotsTxt": true,
  "checkInternalLinks": true,
  "checkExternalLinks": false,
  "maxLinkChecks": 1000,
  "useSitemap": true,
  "checkSitemapUrls": false,
  "compareWithPreviousRun": true,
  "historyStoreName": "seo-site-audit-history",
  "maxConcurrency": 5,
  "maxRequestsPerMinute": 600
}
```

# Actor output Schema

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

One row per audited page (recordType page) and one free row per site (recordType siteSummary), every field.

## `view_results` (type: `string`):

Neutral overview of both row types: score, changes since the last audit, issue counts and top fix.

## `resultsCsv` (type: `string`):

The overview table as a CSV file, ready for Excel or Google Sheets.

## `report` (type: `string`):

Ready-to-share HTML report: score, fix plan, changes since the last audit, issues and broken URLs.

## `view_changes` (type: `string`):

Dataset view "Changes since last audit".

## `view_overview` (type: `string`):

Dataset view "Overview".

## `view_issues` (type: `string`):

Dataset view "Issues".

## `view_brokenLinks` (type: `string`):

Dataset view "Broken links".

## `view_onPage` (type: `string`):

Dataset view "Titles, meta and headings".

## `view_redirects` (type: `string`):

Dataset view "Status codes and redirects".

## `view_performance` (type: `string`):

Dataset view "Speed and size".

## `view_siteSummary` (type: `string`):

Dataset view "Site summary".

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

Status of each start URL, counts of audited, blocked and failed pages, and charge reconciliation.

## `sitemapUrls` (type: `string`):

Every URL found in the site's XML sitemaps, with lastmod (up to 50,000).

# 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"
        }
    ],
    "maxPages": 30
};

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

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

```

## MCP server setup

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