# SEO Site Audit & Change Monitor: Orphans, Depth, Fixes (`use_scraper/seo-site-audit`) Actor

SEO audit crawler for whole websites: scores every page, lists each issue with a fix, maps internal links (orphan pages, click depth), writes a shareable HTML report and alerts you when a later run finds changes. Plain HTTP, compact JSON for AI agents.

- **URL**: https://apify.com/use_scraper/seo-site-audit.md
- **Developed by:** [Idan Muallem](https://apify.com/use_scraper) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 pages audited

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/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 & Change Monitor: Orphans, Depth, Fixes

Crawl a website, audit every page for technical and on-page SEO, map its internal-link structure
(click depth, orphan pages, weak pages) and, on repeat runs, see exactly what changed since the
last audit. You get a **shareable HTML report** for people and **compact JSON** for AI agents,
spreadsheets and automations. It uses plain HTTP, with no browser, so it is fast and cheap: the
default 25-page audit takes about a minute.

Made for SEO freelancers and agencies, site owners, developers who want an SEO check in CI or
n8n, and AI agents that need a site audit as a tool.

### What you get

- **A full per-page audit.** Status, redirects, indexability, canonical, title, meta description,
  headings, language, viewport, thin content, duplicate titles and descriptions, image alt text,
  Open Graph and Twitter tags, JSON-LD, broken internal links, mixed content, nofollow links and
  link counts. Every issue has an id, a severity, a message and a fix.
- **An internal-link graph.** Click depth from your start page, in-links, out-links, top anchor
  texts, dead ends, top hub pages and **orphan candidates**: pages that are in your sitemap, return
  200 and are indexable, but that no crawled page links to.
- **A change report.** Run it again and get one record per changed page: new or removed pages, status
  and indexability changes, title/description/H1/canonical changes, new and fixed issues, new
  orphans and pages that got deeper.
- **A score from 0 to 100 per page** and a **site summary** with the numbers that matter.
- **An HTML report** you can open from the run's Output tab, send to a client or print to PDF:
  scores, every issue with its fix and example pages, what changed, and the link structure.
- **Alerts.** Paste a Slack or Discord webhook URL, schedule the Actor, and hear about a site only
  when something changed or broke.

### Use cases

- **Client audits.** Run it on a prospect's or client's site and send the HTML report.
- **Weekly regression monitoring.** Schedule it and get an alert when a page starts returning 404,
  becomes noindex, loses its title, or a release adds new errors.
- **Release and migration checks.** Audit before and after a deploy; the change report is the diff.
- **Internal-link cleanup.** Find orphan pages, pages more than three clicks deep and dead ends.
- **AI agents.** Give an agent a site-audit tool through Apify's MCP server; `issuesOnly` output
  keeps the answer small.

### How it works

1. Starts from your URLs and follows same-site links over plain HTTP, up to `maxPagesPerSite`
   pages (default 25), honouring `robots.txt` and a per-host delay.
2. Reads the sitemaps listed in `robots.txt` and `/sitemap.xml`. When the crawl covered the whole
   site, it status-checks the sitemap URLs it did not visit (for orphan detection). Those checks
   are not audited and not charged. When `maxPagesPerSite` cut the crawl short they are skipped,
   because an orphan cannot be verified on a partial crawl.
3. Runs the checks, builds the link graph and writes one `page` record per crawled page.
4. Compares with the snapshot saved by the previous run of the same site and settings and writes
   `change` records, then one `siteSummary` per site.
5. Writes the HTML report and, if you gave a webhook URL, sends the alert.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `startUrls` | array | crawlee.dev demo | Required. Each start URL defines a site (scheme + registrable domain). The first start URL of a site is the click-depth root. |
| `maxPagesPerSite` | integer | 25 | Hard cost guard, maximum 5,000. |
| `useSitemap` | boolean | true | Read `robots.txt` sitemaps and `/sitemap.xml`. Needed for orphans. |
| `maxSitemapUrls` | integer | 500 | Cap on sitemap URLs that are status-checked. |
| `includeSubdomains` | boolean | false | |
| `excludeUrlPatterns` | array | `[]` | Substring, or a regular expression written as `/regex/`. |
| `respectRobotsTxt` | boolean | true | |
| `maxConcurrency` | integer | 5 | Polite default. |
| `requestDelayMs` | integer | 250 | Minimum delay between requests to one host. |
| `compareWithPrevious` | boolean | true | Produce a change report. The history is saved either way. |
| `monitorName` | string | `""` | Keeps several independent histories of one site apart. |
| `outputMode` | `full` / `issuesOnly` / `summaryOnly` | `full` | See below. |
| `maxCostUsd` | number | none | Stops cleanly when reached and still writes the summary. |
| `htmlReport` | boolean | true | Write `report.html` to the run's key-value store. |
| `alertWebhookUrl` | string | none | Slack or Discord incoming-webhook URL, or any URL that accepts a JSON POST. Stored as a secret. |
| `alertOn` | `changes` / `errors` / `always` | `changes` | When to send the alert. |

Non-http(s) URLs are rejected with a clear message. If no valid URL remains, the run fails before
anything is fetched or billed.

#### Example input

```json
{
  "startUrls": [{ "url": "https://crawlee.dev" }],
  "maxPagesPerSite": 100,
  "useSitemap": true,
  "excludeUrlPatterns": ["/blog/page/", "/regex-example/"],
  "compareWithPrevious": true,
  "monitorName": "weekly",
  "outputMode": "issuesOnly",
  "maxCostUsd": 2,
  "alertWebhookUrl": "https://hooks.slack.com/services/XXX/YYY/ZZZ",
  "alertOn": "changes"
}
```

More ready-to-use inputs are in [`examples/`](./examples).

#### Output modes

- `full` writes every page record, change record and the summary.
- `issuesOnly` drops page records without issues and trims text fields (title, description,
  headings, issue messages) to 200 characters. URLs are never trimmed. The summary still counts
  every page. Use this for agents and automations.
- `summaryOnly` writes only the site summary (and no change records).

### The HTML report

Every run writes `report.html` to its key-value store; it is shown in the run's **Output** tab and
linked from each `siteSummary` as `reportUrl`. It is one self-contained file (no scripts, no
external requests) with a section per audited site:

- the average score, pages audited, errors, warnings, notices, non-indexable pages, orphan
  candidates and deep pages;
- what changed since the previous audit;
- every issue type, worst first, with how to fix it and example pages;
- the 100 lowest-scoring pages;
- click-depth distribution, most linked pages, orphan candidates, deep pages and dead ends.

To get a PDF, open the report and print it from the browser. Set `htmlReport` to `false` to skip it.

### Monitor a site and get alerts

1. Run the Actor once on your site. This saves the **baseline**.
2. In Apify Console, open **Schedules** and schedule the same input, for example weekly.
3. Optional: set `alertWebhookUrl` to a
   [Slack](https://api.slack.com/messaging/webhooks) or Discord incoming-webhook URL.

Each scheduled run compares the site with the previous audit. With `alertOn` set to `changes`
(the default) you get a message only when a page changed; `errors` only when new errors appeared;
`always` after every audit. The first audit of a site sends one confirmation message. Example:

```
SEO audit of https://example.com: 3 page(s) changed (1 new error(s), 0 fixed, average score 84.6/100 (+1.7)).
Report: https://api.apify.com/v2/key-value-stores/<store-id>/records/report.html
```

Slack gets `{"text": ...}` and Discord gets `{"content": ...}`. Any other URL gets a JSON body
with `text`, `site`, `changeType`, `pagesCrawled`, `avgScore`, `scoreDelta`, `changedPages`,
`newErrors`, `fixedErrors`, `previousRunAt` and `reportUrl`, which is easy to route in n8n, Make or
Zapier. A failed alert is logged and never fails the audit.

The history lives in a named key-value store (`seo-audit-history`) in **your own** Apify account.
Use `monitorName` to keep separate histories of one site, and keep `maxPagesPerSite` and the other
crawl settings the same between runs: changing them starts a new baseline.

### Output

The dataset has three record types, told apart by `recordType`. **Field names are frozen after
publish.** A change to a name needs a version bump and a changelog note.

#### `page`

```json
{
  "recordType": "page",
  "url": "https://crawlee.dev/",
  "finalUrl": "https://crawlee.dev/",
  "statusCode": 200,
  "redirectChain": [],
  "indexable": true,
  "indexabilityReason": "indexable",
  "title": "Crawlee · Build reliable crawlers. Fast.",
  "titleLength": 40,
  "metaDescription": "Crawlee helps you build and maintain your crawlers. It's open source, but built by developers who scrape millions of pages every day for a living.",
  "metaDescriptionLength": 146,
  "h1": ["Build reliable web scrapers. Fast."],
  "wordCount": 358,
  "lang": "en",
  "canonical": "https://crawlee.dev/",
  "jsonLdTypes": [],
  "images": { "total": 14, "missingAlt": 0 },
  "links": { "internal": 9, "external": 9, "brokenInternal": [] },
  "clickDepth": 0,
  "inlinks": 2,
  "outlinks": 2,
  "isOrphanCandidate": false,
  "score": 99,
  "issues": [
    {
      "id": "on_page.description_duplicate",
      "category": "on-page",
      "severity": "notice",
      "message": "The meta description is shared by 3 pages.",
      "fix": "Write a unique meta description for each page.",
      "value": 3
    }
  ],
  "crawledAt": "2026-11-12T10:28:20+00:00"
}
```

`clickDepth` is `null` when no crawled path leads to the page.

#### `change`

One record per changed page. `changeType` is the most severe change and `changeTypes` lists all of
them. `before` and `after` hold only the fields that changed. Possible types: `newPage`,
`removedPage`, `statusChanged`, `becameNonIndexable`, `becameIndexable`, `titleChanged`,
`descriptionChanged`, `h1Changed`, `canonicalChanged`, `newIssues`, `fixedIssues`, `newOrphan`,
`depthIncreased`. If nothing changed, no change records are written (page records follow
`outputMode`; use `issuesOnly` or `summaryOnly` to keep such runs small and cheap).

```json
{
  "recordType": "change",
  "url": "https://example.com/pricing",
  "changeType": "statusChanged",
  "changeTypes": ["statusChanged", "newIssues"],
  "severity": "error",
  "before": { "status": 200, "issueIds": [] },
  "after": { "status": 404, "issueIds": ["status.client_error"] },
  "summary": "Changed: statusChanged, newIssues.",
  "newIssues": ["status.client_error"],
  "fixedIssues": [],
  "scoreDelta": -10
}
```

`scoreDelta` is the page score change (a whole number) and is `null` when the score did not
change. `newIssues` and `fixedIssues` are issue ids. A score change alone does not create a record.
Titles, descriptions and headings are compared by hash, so `before` and `after` show hashes for
those fields rather than the text.

#### `siteSummary`

One per site. Shortened example:

```json
{
  "recordType": "siteSummary",
  "site": "https://crawlee.dev",
  "pagesCrawled": 3,
  "graphComplete": false,
  "avgScore": 95.0,
  "issuesByType": {
    "on_page.description_duplicate": { "count": 3, "sampleUrls": ["https://crawlee.dev/", "https://crawlee.dev/js"] }
  },
  "duplicates": { "titles": [], "descriptions": [{ "value": "Crawlee helps you build…", "urls": ["https://crawlee.dev/", "https://crawlee.dev/js"] }] },
  "depthHistogram": { "0": 1, "1": 2 },
  "orphans": ["https://crawlee.dev/blog/archive"],
  "orphanCount": 1,
  "deepPages": [],
  "deadEnds": [],
  "topHubs": [{ "url": "https://crawlee.dev/", "inlinks": 2 }],
  "stoppedBy": "maxPages",
  "changeType": "baseline",
  "changedPages": 0,
  "newErrors": 0,
  "fixedErrors": 0,
  "scoreDelta": null,
  "previousRunAt": null,
  "reportUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/report.html"
}
```

- `stoppedBy` is `complete`, `maxPages`, `maxCost` or `timeout`.
- `graphComplete` is `false` when the crawl stopped early. Click depths, in-link counts and orphans
  are then **unverified**: a page may look orphaned only because the page that links to it was
  never crawled.
- `changeType` is `baseline` on a first run, `compared` when a previous snapshot was used and
  `skipped` when `compareWithPrevious` is off or the run stopped early.
- `orphans` lists up to 100 URLs; `orphanCount` is the full count. Sitemap-only URLs are checked
  and listed only when the crawl covered the whole site.
- `reportUrl` links to the run's HTML report (`null` when `htmlReport` is off).
- `scoreDelta` here is the change in `avgScore` (one decimal). `newErrors` counts error issues that
  appeared on existing pages and on new pages; `fixedErrors` counts errors fixed on pages that are
  still present.

### The page score

Every page starts at 100. Each issue subtracts points by severity: **10 for an error, 4 for a
warning, 1 for a notice**. The score never goes below 0. Every issue counts, so the same issues
always give the same score, and the formula is stable across versions.

### What it checks

| Category | Checks |
|---|---|
| Status | 4xx, 5xx, timeout, fetch failure, redirect, redirect chain over one hop, redirect loop, HTTP not redirected to HTTPS |
| Indexability | meta robots and `X-Robots-Tag` noindex/nofollow, robots.txt disallow, canonical missing, pointing elsewhere, to a non-200 page or to a noindex page; final `indexable` and `indexabilityReason` |
| On-page | title and meta description missing, short or long; H1 missing or multiple; skipped heading level; `lang` and viewport missing; thin content; duplicate title or description across the site |
| Media | images without `alt` (count and ratio in the message) |
| Social | Open Graph title, description and image; Twitter card |
| Structured data | JSON-LD types found; JSON-LD that does not parse |
| Links | broken internal links, mixed content on HTTPS pages, nofollow on internal links, too many links |
| Link graph | orphan candidate, click depth over 3, only one in-link, dead end |

Thresholds: title 30–60 characters, meta description 70–160, thin content under 200 words, more than
200 links on a page.

### Pricing

Pay per event:

| Event | Price | When |
|---|---|---|
| `page-audited` | $0.02 ($20 per 1,000 pages) on the Free and Starter plans, $0.018 on Scale, $0.015 on Business | Each HTML page record written |
| `site-report` | $0.02 | Once per site per run |

Platform usage is included: you pay only these events. Error pages, redirects, skipped files and
sitemap URLs that are only status-checked are free. The HTML report and alerts are included in
the site report. The Store's **Pricing** tab always shows the current prices and any discount for
your Apify plan; the Actor reads its prices from the platform, so `maxCostUsd` follows them.

Worked examples at the Free and Starter price:

| Run | Events | Cost |
|---|---|---|
| Default run, 25 pages | 25 pages + 1 report | $0.52 |
| One 500-page site | 500 pages + 1 report | $10.02 |
| Weekly monitor of a 100-page site | 100 pages + 1 report, 4 or 5 times a month | about $8.10 to $10.10 a month |
| 10 client sites, 200 pages each | 2,000 pages + 10 reports | $40.20 |

Two ways to cap the cost: `maxPagesPerSite` (default 25) limits the pages per site, and
`maxCostUsd` stops the run cleanly at a dollar amount, keeping the price of one site report in
reserve so the summary is still written.

### Use it from n8n

Use an **HTTP Request** node that runs the Actor and returns the dataset in one call:

```
Method: POST
URL: https://api.apify.com/v2/actors/use_scraper~seo-site-audit/run-sync-get-dataset-items
Authentication: your Apify API token (Authorization: Bearer <APIFY_TOKEN>)
Body (JSON):
{
  "startUrls": [{ "url": "https://example.com" }],
  "outputMode": "issuesOnly",
  "monitorName": "weekly"
}
```

Follow it with an **IF** node on `{{ $json.recordType === 'change' && $json.severity === 'error' }}`
to alert on regressions, or schedule the run in Apify and use the Apify trigger node. A synchronous call returns HTTP 408 after
300 seconds, so for crawls that may take longer use the asynchronous run endpoint and fetch the
dataset when the run has finished.

### Use it from an AI agent (MCP)

Apify exposes Actors as tools through its MCP server. Add this Actor to your MCP client and ask in
plain language ("audit example.com and list the errors"):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=use_scraper/seo-site-audit",
      "headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
    }
  }
}
```

Use `"outputMode": "issuesOnly"` (or `"summaryOnly"`) so the answer stays small enough for the
agent's context.

### Limits and what is not included

- No JavaScript rendering: pages are fetched over plain HTTP, so content added by scripts is not seen.
- No Core Web Vitals or performance measurement.
- No accessibility audit.
- No backlinks.
- No keyword data.
- No hreflang reciprocity check.
- No external broken-link checks.
- No PDF file: print the HTML report to PDF from the browser.

Other things to know:

- The link graph covers the pages the crawl visited. Raise `maxPagesPerSite` for a complete graph.
- Page records are produced for crawled pages only; sitemap-only URLs are status-checked and appear
  just in the summary's `orphans` list.
- The crawler identifies itself as `SeoSiteAuditBot` and follows `robots.txt` unless you turn that off.
  If `robots.txt` answers with a server error (5xx) or 429, nothing is crawled, as search engines do.
  Only audit sites you are allowed to crawl.
- Memory is chosen for you from `maxPagesPerSite`: 1 GB up to 100 pages, 2 GB up to 200 and 4 GB
  above that. More memory also means more CPU, so larger crawls run faster. A 400-page audit takes
  roughly 10 to 20 minutes; most of that is per-page bookkeeping, not crawling.

### FAQ

**How is this different from other SEO audit Actors?** It audits the whole site, not single URLs,
and adds three things on top of the checks: the internal-link graph (orphans, click depth), a
change report between runs, and an HTML report you can hand to someone.

**Does it render JavaScript?** No. It reads the HTML the server returns, which is what a crawler
sees first. A site that builds its content only in the browser (a client-side single-page app)
will look thin; server-rendered and static sites are audited fully.

**Why are there no orphan pages in my result?** Orphans need a sitemap and a complete crawl. If
`stoppedBy` is `maxPages`, raise `maxPagesPerSite` until the summary says `graphComplete: true`.

**Why is my second run a baseline again?** The history key is the site, `monitorName` and the
settings that change which pages are crawled (`maxPagesPerSite`, sitemap, subdomains, exclude
patterns, robots). Keep them the same between runs.

**What does a scheduled run with no changes cost?** The same as any run of that size: you pay per
audited page. Use a smaller `maxPagesPerSite` or `maxCostUsd` to bound it.

**Can I audit several sites in one run?** Yes, add several start URLs. Each site gets its own
records, summary and report section, and its own change history.

**Will it get my site into trouble?** It is a polite crawler: it follows `robots.txt`, waits
between requests (`requestDelayMs`), uses at most `maxConcurrency` connections and identifies
itself. It does not log in, solve CAPTCHAs or work around blocking.

**The run stopped early. Was I charged for everything?** No. You pay only for page records that
were written, plus one site report. A restarted run never charges a page twice.

### Support

Found a bug, a false positive, or a check you miss? Open an issue on the Actor's **Issues** tab in
Apify Store and include the run ID. Every issue is read and answered.

### Legal and responsible use

The Actor reads only public pages over plain HTTP, the same way a search-engine crawler does, and
honours `robots.txt` by default. It does not collect personal data on purpose; page titles and
descriptions are stored as they appear on the site. You are responsible for having the right to
crawl the sites you audit and for complying with their terms of use. Audit your own sites, your
clients' sites, or sites whose terms allow automated access.

### Changelog

See [CHANGELOG.md](./CHANGELOG.md).

# Changelog

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

# Actor input Schema

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

One or more website URLs to audit. Each start URL defines a site (scheme and domain); the first start URL of a site is the root for click depth.

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

Hard limit on audited pages per site, and so on the cost: you pay per audited page. Raise it to cover a whole site (a complete crawl also gives verified orphan pages and click depths).

## `maxCostUsd` (type: `number`):

Optional spending limit for this run in USD. When it is reached the run stops cleanly and still writes the site summaries. Leave empty for no limit.

## `compareWithPrevious` (type: `boolean`):

Produce a change report against the previous run of the same site and settings. The first run is a baseline.

## `monitorName` (type: `string`):

Optional key that keeps several independent histories of the same site apart.

## `alertWebhookUrl` (type: `string`):

Optional. A Slack or Discord incoming-webhook URL, or any URL that accepts a JSON POST. After each audit that found changes, a short message with the numbers and the report link is sent there. The first audit of a site sends one confirmation message.

## `alertOn` (type: `string`):

changes: when any page changed since the previous audit. errors: only when new errors appeared. always: after every audit.

## `outputMode` (type: `string`):

full: every record. issuesOnly: pages without issues are dropped and text fields are trimmed to 200 characters. summaryOnly: only site summaries.

## `htmlReport` (type: `boolean`):

Write a shareable HTML report of the run (report.html in the key-value store, shown in the Output tab): scores, issues with fixes, what changed, and the link structure. It can be printed to PDF from the browser.

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

Read the sitemaps listed in robots.txt and /sitemap.xml. Required for orphan page detection.

## `maxSitemapUrls` (type: `integer`):

Cap on the number of sitemap URLs that are status-checked for orphan detection. These checks are free and only run when the crawl covered the whole site.

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

Also crawl subdomains of each start URL's domain.

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

URLs matching any of these patterns are skipped. Each pattern is a plain substring, or a regular expression written as /regex/.

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

Do not fetch URLs that robots.txt disallows.

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

Maximum number of parallel requests. The default is deliberately polite.

## `requestDelayMs` (type: `integer`):

Minimum delay between two requests to the same host, in milliseconds.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://crawlee.dev"
    }
  ],
  "maxPagesPerSite": 25,
  "compareWithPrevious": true,
  "monitorName": "",
  "alertOn": "changes",
  "outputMode": "full",
  "htmlReport": true,
  "useSitemap": true,
  "maxSitemapUrls": 500,
  "includeSubdomains": false,
  "excludeUrlPatterns": [],
  "respectRobotsTxt": true,
  "maxConcurrency": 5,
  "requestDelayMs": 250
}
```

# Actor output Schema

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

Shareable report of the run: scores, issues with fixes, what changed since the previous audit, and the internal-link structure. Printable to PDF.

## `overview` (type: `string`):

Page, change and siteSummary records of the run (told apart by recordType).

## `issues` (type: `string`):

Pages with their issues; each issue has an id, a severity, a message and a fix.

## `changes` (type: `string`):

What changed since the previous audit of the same site (change records).

# 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://crawlee.dev"
        }
    ],
    "excludeUrlPatterns": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("use_scraper/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://crawlee.dev" }],
    "excludeUrlPatterns": [],
}

# Run the Actor and wait for it to finish
run = client.actor("use_scraper/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://crawlee.dev"
    }
  ],
  "excludeUrlPatterns": []
}' |
apify call use_scraper/seo-site-audit --silent --output-dataset

```

## MCP server setup

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