# SEO Audit Crawler: Site Audit, Broken Links, Redirects, Orphans (`zhtech/seo-audit-crawler`) Actor

Technical SEO site audit: crawls links and sitemap.xml, one row per page (status, redirects, title, meta, canonical, robots, hreflang, headings, alt text, schema, indexability, issues) plus a client ready summary: broken links with sources, duplicates, orphans.

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

## Pricing

from $1.50 / 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 Crawler: Technical Site Audit, Broken Links, Redirect Chains and Orphan Pages

**SEO Audit Crawler** is a fast technical SEO audit tool and website crawler. Give it a domain and it crawls the site the way a search engine does (internal links plus `sitemap.xml`), then returns **one row per URL** with every on-page and technical SEO field, plus **one summary record per site** with broken links and the pages that contain them, redirect chains, duplicate titles and descriptions, orphan sitemap URLs and non-indexable pages. It also writes a ready to send **HTML client report** and a **Markdown report** that an AI agent can read in one call.

It is a plain HTTP crawler (no headless browser), so a 500 page audit takes minutes and costs a fraction of browser based audit tools. No login, no API key, no proxy needed for most sites.

### What does SEO Audit Crawler do?

- Crawls a website from one or more start URLs or plain domains (`example.com` works).
- Finds pages by following internal links, by reading `sitemap.xml` (sitemap indexes and `.gz` included), or both. You can also audit an exact list of URLs.
- Audits every HTML page: status code, full redirect chain, title and length, meta description and length, canonical, meta robots and `X-Robots-Tag`, hreflang (HTML tags and HTTP `Link` header), H1 and H2 lists, word count, internal and external link counts, images missing alt text, page size, response time, Open Graph and Twitter Card tags, structured data types (JSON-LD, microdata, RDFa), mixed content, viewport, language, meta refresh and an **indexability verdict with the reason**.
- Lists every issue on a page with a code, a severity (`error`, `warning`, `notice`) and a plain English message.
- Builds a per site summary: issue counts with how to fix text, duplicate titles, descriptions and H1s, broken links with every linking page and its anchor text, redirects and redirect chains with the pages that link to them, orphan sitemap URLs, sitemap URLs that redirect, fail or are noindex, indexable pages missing from the sitemap, non-indexable pages, hreflang return link errors, and a health score.
- Optionally checks external links and internal links beyond the page limit.

### Why use it?

| | SEO Audit Crawler | Typical browser based audit | Typical cheap crawler |
|---|---|---|---|
| Broken links | Every link on every crawled page, inverted to "broken URL > all pages that link to it, with anchor text" | First few links per page | Per page counts only |
| Redirects | Every hop with its status code, plus the pages linking to the redirecting URL | Final URL only | Final URL only |
| Orphan sitemap URLs | Yes, with a flag that says whether the crawl was complete | No | Rarely |
| Sitemap hygiene | Redirecting, 4xx/5xx and noindex URLs in the sitemap, indexable pages missing from it | No | Rarely |
| Client report | HTML report and Markdown report in the key-value store | Sometimes | No |
| User agent | Chrome desktop, Chrome mobile, honest bot, custom | Fixed | Fixed |
| Speed and price | HTTP crawler, low per page price | Slow, expensive | Fast, shallow |
| False broken links | 401/403/429 and bot walls are reported as "unverified", never as broken | Varies | Common complaint |

### Use cases

- **SEO agencies and freelancers:** run a technical audit for a client or a prospect and hand over the HTML report, or paste the Markdown report into your own template.
- **Website owners and developers:** find broken links, redirect chains and noindex mistakes before and after a redesign or migration.
- **Content teams:** find duplicate titles and descriptions, thin pages and missing H1s.
- **Lead generation:** audit prospects' sites and open with concrete findings ("your sitemap lists 40 URLs that return 404").
- **AI agents and automations:** call the Actor via the API or MCP and give the Markdown report or the summary JSON to an LLM to write recommendations.
- **Monitoring:** schedule a weekly run and compare the health score and issue counts over time.

### How to use it

1. Enter one or more websites in **Websites to audit**. A plain domain such as `example.com` is fine.
2. Set **Max URLs per site**. 20 is a quick check, 500 to 5,000 is a full audit of most small business sites.
3. Pick **How to find pages**: Links + sitemap (default, best for orphan detection), Links only, Sitemap only, or Only the start URLs.
4. Optional: include or exclude URL patterns, turn on external link checking, pick a mobile user agent.
5. Click **Start**. When the run finishes, open the **Output** tab: pages, site summary, HTML report, Markdown report, summary JSON.

### Input example

```json
{
    "startUrls": ["https://www.example.com", "example.org"],
    "maxPages": 500,
    "crawlMode": "links-and-sitemap",
    "excludeUrlPatterns": ["?sort=", "/tag/", "/wp-json/"],
    "checkExternalLinks": true,
    "checkUncrawledInternalLinks": true,
    "maxLinkChecks": 1000,
    "userAgent": "chrome-mobile",
    "respectRobotsTxt": true,
    "maxConcurrency": 3
}
```

| Field | Default | What it does |
|---|---|---|
| `startUrls` | required | URLs or plain domains. Each site gets its own crawl, budget and summary. `www` and the bare domain count as the same site. |
| `maxPages` | 20 | Max URLs crawled per site. Redirects and error URLs count toward it, but only successfully audited HTML pages are charged. |
| `crawlMode` | `links-and-sitemap` | `links-and-sitemap`, `links`, `sitemap` or `list`. In `links` mode the sitemap is still read for coverage checks. |
| `maxDepth` | 0 (no limit) | Max clicks from the start URL. |
| `includeUrlPatterns` / `excludeUrlPatterns` | none | Plain text (`/blog/`), globs (`https://example.com/blog/*`, `/docs/*`) or regex in slashes (`/\/p\/\d+/`). |
| `includeSubdomains` | false | Also crawl other subdomains of the start domain. |
| `checkExternalLinks` | false | Check every outbound link (HEAD, then GET when HEAD is refused). |
| `checkUncrawledInternalLinks` | false | Check internal links that were not crawled (page limit, patterns, depth) so the broken link list covers the whole site. |
| `maxLinkChecks` | 500 | Budget for the two link check options, most linked targets first. |
| `userAgent` | `chrome-desktop` | `chrome-desktop`, `chrome-mobile`, `bot` (honest `SEOAuditCrawler/1.0` token) or `custom` with `customUserAgent`. |
| `respectRobotsTxt` | true | Disallowed URLs are not requested and `Crawl-delay` is honored. Turn off only for a site you own or are authorized to audit. |
| `maxConcurrency` | 3 | Parallel requests per site. Lowered automatically on 429/503 answers. |
| `requestDelayMs` | 200 | Minimum gap between requests to the same host. |
| `requestTimeoutSecs` | 20 | Timeout per response. |
| `maxSitemapUrls` | 10000 | Cap on URLs read from sitemaps per site. |
| `pushSummaryToDataset` | true | Adds the summary record(s) at the end of the dataset. |
| `proxyConfiguration` | off | Optional. Not needed for most sites. |

### Output

#### Page rows (`rowType: "page"`)

One row per crawled URL. A URL that redirects gets its own row (with the full chain) and the destination is audited as its own row.

```json
{
    "rowType": "page",
    "site": "crawler-test.com",
    "url": "https://crawler-test.com/encoding/page_titles_character_encoded",
    "finalUrl": "https://crawler-test.com/encoding/page_titles_character_encoded",
    "statusCode": 200,
    "redirectChain": [],
    "redirectCount": 0,
    "contentType": "text/html;charset=utf-8",
    "depth": 1,
    "foundOn": "https://crawler-test.com/",
    "inSitemap": false,
    "indexable": true,
    "indexabilityReason": "Indexable",
    "title": "Some title with & encoded & characters %26",
    "titleLength": 42,
    "metaDescription": "Default description VPDYgJHGzMCe2w7s3bsm",
    "metaDescriptionLength": 40,
    "h1": ["Some title with & encoded & characters %26"],
    "h1Count": 1,
    "h2": [],
    "canonicalUrl": null,
    "canonicalStatus": "missing",
    "robotsMeta": null,
    "xRobotsTag": null,
    "hreflang": [],
    "wordCount": 12,
    "internalLinks": 1,
    "externalLinks": 0,
    "nofollowLinks": 0,
    "imagesTotal": 0,
    "imagesMissingAlt": 0,
    "pageSizeBytes": 1822,
    "ttfbMs": 78,
    "loadTimeMs": 78,
    "openGraph": { "title": null, "description": null, "image": null, "type": null, "url": null, "siteName": null },
    "twitterCard": { "card": null, "title": null, "description": null, "image": null, "site": null },
    "structuredDataTypes": [],
    "issues": [
        { "code": "missing_viewport", "severity": "warning", "message": "No viewport meta tag, the page may not be mobile friendly." },
        { "code": "meta_description_too_short", "severity": "notice", "message": "Meta description is only 40 characters (under 70)." },
        { "code": "missing_canonical", "severity": "notice", "message": "No canonical tag." }
    ],
    "issueCount": 3,
    "errorCount": 0,
    "warningCount": 1,
    "noticeCount": 2,
    "crawledAt": "2026-11-17T04:21:03.484Z"
}
```

A redirecting URL looks like this (shortened):

```json
{
    "url": "https://crawler-test.com/redirects/redirect_2",
    "statusCode": 301,
    "finalUrl": "https://crawler-test.com/redirects/redirect_target",
    "finalStatusCode": 200,
    "redirectChain": [
        { "url": "https://crawler-test.com/redirects/redirect_2", "statusCode": 301, "location": "https://crawler-test.com/redirects/redirect_1" },
        { "url": "https://crawler-test.com/redirects/redirect_1", "statusCode": 301, "location": "https://crawler-test.com/redirects/redirect_target" }
    ],
    "issues": [
        { "code": "redirect", "severity": "notice", "message": "Redirects (301 > 301) to https://crawler-test.com/redirects/redirect_target" },
        { "code": "redirect_chain", "severity": "warning", "message": "2 redirect hops before the final URL." }
    ]
}
```

#### Summary record (`rowType: "summary"`, one per site)

Also saved as `SUMMARY` (JSON) in the key-value store. Shortened example from a real run:

```json
{
    "rowType": "summary",
    "site": "crawler-test.com",
    "healthScore": 85,
    "textSummary": "Crawled 150 URLs on crawler-test.com and audited 127 HTML pages; 110 are indexable. Health score 85/100. Found 18 errors, 324 warnings and 1023 notices. 7 broken internal and 6 broken external link targets. 6 redirect chains or loops. 2 groups of duplicate titles. ...",
    "pagesCrawled": 150,
    "pagesAudited": 127,
    "indexablePages": 110,
    "statusCodes": { "200": 127, "301": 6, "302": 4, "404": 5 },
    "issueTotals": { "errors": 18, "warnings": 324, "notices": 1023 },
    "issues": [
        { "code": "http_4xx", "severity": "error", "description": "Page returns a 4xx client error.", "howToFix": "Restore the page or 301 redirect the URL ...", "count": 7, "examples": ["..."] }
    ],
    "topActions": ["Page returns a 4xx client error. (7) Fix: ..."],
    "duplicateTitles": [{ "value": "Duplicate title", "count": 4, "urls": ["https://crawler-test.com/titles/duplicate_title", "..."] }],
    "duplicateMetaDescriptions": [],
    "brokenLinks": [
        { "url": "https://crawler-test.com/robots_protocol/non_200_with_noindex", "internal": true, "statusCode": 404, "reason": "HTTP 404", "linkedFromCount": 1, "linkedFrom": [{ "url": "https://crawler-test.com/", "anchor": "Non-200 with Noindex" }] }
    ],
    "unverifiedLinks": [],
    "internalLinksToRedirects": [],
    "redirectChains": [
        { "url": "https://crawler-test.com/redirects/redirect_2", "finalUrl": "https://crawler-test.com/redirects/redirect_target", "hops": 2, "chain": [{ "url": "...", "statusCode": 301 }, { "url": "...", "statusCode": 301 }], "loop": false, "linkedFromCount": 1 }
    ],
    "orphanSitemapUrls": ["https://crawler-test.com/urls/url_with_mobile_rel_alt"],
    "orphanCheckComplete": false,
    "sitemapIssues": [{ "url": "https://crawler-test.com/redirects/redirect_1", "problem": "redirects", "detail": "Redirects to ..." }],
    "indexableNotInSitemap": ["..."],
    "nonIndexablePages": [{ "url": "https://crawler-test.com/robots_protocol/meta_noindex", "statusCode": 200, "reason": "noindex in meta robots" }],
    "hreflangErrors": [],
    "blockedByRobotsTxt": [],
    "robotsTxt": { "found": true, "statusCode": 200, "sitemaps": ["..."], "crawlDelay": null },
    "sitemap": { "urlsListed": 23, "filesRead": ["..."] },
    "averages": { "ttfbMs": 85, "loadTimeMs": 86, "pageSizeKb": 2, "wordCount": 61 },
    "crawlStopReason": "Reached the page limit (150) for this site",
    "crawlComplete": false
}
```

#### Reports

- `REPORT_HTML`: a clean one page HTML report per run (health score cards, priority fixes, all issues with fixes, broken links with linking pages, redirect chains, duplicates, orphans). Light and dark mode. Send it to a client as is.
- `REPORT`: the same content as Markdown, ideal for an LLM, a ticket or an email.

Links to both are in the run's **Output** tab.

#### Health score

Average page score. Each audited page starts at 100 and loses 25 points per error and 5 per warning (a broken internal link on the page counts as an error, a duplicate title or description as a warning). Notices cost nothing. Crawled URLs that fail (4xx, 5xx, unreachable) score 0. The exact rule is repeated in `healthScoreExplained`.

#### Issue codes

Page level: `http_4xx`, `http_5xx`, `fetch_failed`, `redirect`, `redirect_chain`, `redirect_loop`, `too_many_redirects`, `temporary_redirect`, `redirect_without_location`, `blocked_by_bot_protection`, `missing_title`, `title_too_long`, `title_too_short`, `multiple_titles`, `missing_meta_description`, `meta_description_too_long`, `meta_description_too_short`, `multiple_meta_descriptions`, `missing_h1`, `multiple_h1`, `empty_h1`, `low_word_count`, `images_missing_alt`, `missing_canonical`, `invalid_canonical`, `multiple_canonicals`, `canonical_points_elsewhere`, `canonical_cross_domain`, `canonical_to_http`, `noindex`, `nofollow_page`, `not_https`, `mixed_content`, `invalid_json_ld`, `missing_viewport`, `missing_lang`, `meta_refresh`, `missing_open_graph`, `missing_twitter_card`, `no_structured_data`, `invalid_hreflang`, `hreflang_missing_self`, `slow_response`, `slow_download`, `large_html`, `html_truncated`, `long_url`, `too_many_links`, `possible_soft_404`, `non_html`.

Site level (in the summary): `duplicate_title`, `duplicate_meta_description`, `duplicate_h1`, `broken_internal_link`, `broken_external_link`, `internal_link_to_redirect`, `orphan_sitemap_url`, `sitemap_url_not_200`, `sitemap_url_redirects`, `sitemap_url_not_indexable`, `indexable_not_in_sitemap`, `no_sitemap`, `sitemap_error`, `no_robots_txt`, `robots_txt_error`, `hreflang_no_return_link`, `canonical_to_non_200`.

### How much does it cost?

The Actor uses pay per event pricing:

- **Actor start**: a small flat fee once per run.
- **Page audited**: charged once for each URL that returned a successful (2xx) HTML page and was fully audited.

Never charged: redirects, 4xx and 5xx URLs, unreachable URLs, non-HTML files, bot protection pages, pages blocked by robots.txt, link checks, the summary record and the reports. The current per event prices are shown on the Pricing tab.

`maxPages` is your cost control, and the run also respects the **maximum total charge** you set in the run options: when it is reached, the crawl stops cleanly and the summary and reports are still written for the pages already audited.

### Integrations and API

Run it from the Apify API, a schedule, Zapier, Make, n8n, or any HTTP client:

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

Fetch the reports from the run's default key-value store: `.../key-value-stores/{storeId}/records/REPORT` (Markdown) and `.../records/REPORT_HTML`.

#### Use with AI agents (MCP)

The Actor works through the Apify MCP server, so Claude, ChatGPT, Cursor and other MCP clients can call it as a tool: "audit example.com and tell me the top fixes". For an agent the best inputs are a small `maxPages` (20 to 100) and the `REPORT` Markdown record or the summary row, which already contain the prioritized fixes, so the agent does not need to read every page row.

### FAQ

**Does it render JavaScript?**
No. It reads the HTML the server sends, like most search engine crawlers do on the first pass. Content that only appears after client side JavaScript runs (some single page apps) is not seen. This is also why it is fast and cheap.

**Does it respect robots.txt?**
Yes, by default. Disallowed URLs are not requested and are listed in `blockedByRobotsTxt`, and `Crawl-delay` is honored. Rules are matched for the `SEOAuditCrawler` token with the usual fallback to `*`. Turn `respectRobotsTxt` off only for a site you own or are authorized to audit, for example a staging site that disallows everything.

**What about Cloudflare or other bot protection?**
The Actor does not bypass bot protection, CAPTCHAs or logins. When a site answers with a challenge page, that URL is marked `blockedBy`, it is not charged, and after the start page or three such answers the site is skipped with a clear message. To audit your own protected site, allow the crawler through your firewall or CDN for the run.

**Why is a link "unverified" and not "broken"?**
A 401, 403, 429 or a bot wall means the server refused the check, not that the page is gone. Reporting those as broken is the main source of false positives in link checkers, so they are listed separately in `unverifiedLinks`.

**What does "orphan" mean here?**
A URL listed in the sitemap that no crawled page links to. Orphans are only counted as an issue when the crawl saw every reachable page (`orphanCheckComplete: true`). If the page limit was hit, they are listed as candidates.

**Why does `maxPages` count redirects and 404s?**
So the crawl time is predictable. They are free rows, only successfully audited pages are charged.

**Can I audit several sites in one run?**
Yes. Each site gets its own budget, summary record and section in the reports.

### Limitations

- No JavaScript rendering (see FAQ). Core Web Vitals are not measured; `ttfbMs` and `loadTimeMs` are server response and HTML download times.
- HTML larger than 5 MB and sitemap files larger than 10 MB are only partly read.
- hreflang return links are checked among crawled pages only.
- Soft 404 detection is a heuristic based on the title and H1.
- Sites behind a login or bot protection cannot be audited.

### Support

Found a bug or need a check that is missing? Open an issue on the Issues tab with the input you used and the URL, and it will be looked at.

# Actor input Schema

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

Home page URLs or plain domains, one per line, e.g. "https://example.com" or "example.com". Each site gets its own crawl, page budget and summary. Several URLs on the same domain share one site.

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

Crawl budget per site. Every crawled URL counts (pages, redirects, 404s). Only successfully audited HTML pages are charged. 20 for a quick check, 500+ for a full audit.

## `crawlMode` (type: `string`):

Links + sitemap: follow internal links, then audit sitemap URLs not reached by links (best for orphan detection). Links only: follow links (the sitemap is still read for coverage checks). Sitemap only: audit the URLs listed in sitemap.xml. List only: audit exactly the start URLs.

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

How many clicks away from the start URL to follow. 0 = no limit.

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

Optional. Plain text ("/blog/"), globs ("https://example.com/blog/*" or "/docs/*") or regex in slashes ("//products/\d+/"). Start URLs are always crawled.

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

Same syntax as above. Useful for crawl traps and archives, e.g. "?sort=", "/tag/", "/wp-json/".

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

Also crawl blog.example.com, shop.example.com and so on. www and the bare domain are always treated as the same site.

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

Request every outbound link (HEAD, then GET if refused) to find broken external links. Free, but adds time. Bot walls and 401/403/429 answers are reported as unverified, never as broken.

## `checkUncrawledInternalLinks` (type: `boolean`):

Status check internal links that were not crawled because of Max URLs, patterns or depth, so the broken link list covers the whole site. Free.

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

Upper limit for the two link check options above. Links found on the most pages are checked first.

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

How the crawler identifies itself. Mobile is useful for sites that serve different HTML to phones. robots.txt rules are evaluated for the SEOAuditCrawler token (falls back to the \* group).

## `customUserAgent` (type: `string`):

Used when User agent is Custom.

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

On by default: URLs disallowed by robots.txt are not requested and Crawl-delay is honored. Turn off ONLY for a site you own or are authorized to audit (for example a staging site that disallows everything).

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

Polite default of 3. Lowered automatically on 429/503 answers or when robots.txt sets a Crawl-delay.

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

Minimum gap between request starts on the same host.

## `requestTimeoutSecs` (type: `integer`):

Time allowed for each response.

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

Cap on URLs read from sitemap.xml files (sitemap indexes and .gz supported).

## `pushSummaryToDataset` (type: `boolean`):

Adds one row with rowType "summary" per site at the end of the dataset (free). The same summary is always saved as SUMMARY in the key-value store, with REPORT (Markdown) and REPORT_HTML.

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

Not needed for most sites, off by default (auditing your own site directly is cheaper). The crawler never tries to bypass bot protection.

## Actor input object example

```json
{
  "startUrls": [
    "https://crawler-test.com/"
  ],
  "maxPages": 20,
  "crawlMode": "links-and-sitemap",
  "maxDepth": 0,
  "includeSubdomains": false,
  "checkExternalLinks": false,
  "checkUncrawledInternalLinks": false,
  "maxLinkChecks": 500,
  "userAgent": "chrome-desktop",
  "respectRobotsTxt": true,
  "maxConcurrency": 3,
  "requestDelayMs": 200,
  "requestTimeoutSecs": 20,
  "maxSitemapUrls": 10000,
  "pushSummaryToDataset": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

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

No description

## `reportHtml` (type: `string`):

No description

## `reportMarkdown` (type: `string`):

No description

## `summaryJson` (type: `string`):

No description

# 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://crawler-test.com/"
    ],
    "maxPages": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhtech/seo-audit-crawler").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://crawler-test.com/"],
    "maxPages": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("zhtech/seo-audit-crawler").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://crawler-test.com/"
  ],
  "maxPages": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call zhtech/seo-audit-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zhtech/seo-audit-crawler"
        }
    }
}
```

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/XdLM1am73dmfGzICn/builds/DbyEusIffESGq8BfH/openapi.json
