# Own-Site SEO Audit (robots.txt-respecting, no browser) (`wrentools/own-site-seo-audit`) Actor

Crawls your own site on one host, obeying robots.txt, and reports per-page on-page SEO issues: titles, meta descriptions, headings, canonicals, image alt text, JSON-LD validity, duplicate titles and broken links, with a 0-100 score.

- **URL**: https://apify.com/wrentools/own-site-seo-audit.md
- **Developed by:** [WrenTools](https://apify.com/wrentools) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 page auditeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Own-Site SEO Audit (robots.txt-respecting, no browser)

Audit **your own website's** on-page SEO in minutes. The Actor crawls one host, obeys your robots.txt, and returns
one row per page with the problems search engines care about, each with a severity, plus a 0-100 score and a
site-wide summary.

It does not check your sitemap files. [Sitemap Validator](https://apify.com/wrentools/sitemap-validator) does,
and can also report the listed URLs that are broken or redirect.

### What it checks on every page

| Check | Severity |
|---|---|
| Missing `<title>`, several `<title>` tags, title over 60 or under 10 characters | high / medium / low |
| Missing meta description, or one outside 50-160 characters | medium / low |
| No `<h1>`, or several | medium / low |
| Images without an `alt` attribute (`alt=""` is accepted as decorative) | medium |
| JSON-LD structured data that does not parse, and the schema.org types found | high |
| Broken internal links (pages on your site answering 4xx/5xx) | high |
| Broken outbound links (optional) | medium |
| Duplicate titles and duplicate meta descriptions across the site | medium / low |
| `noindex`, a canonical pointing elsewhere, redirects | info |
| Missing `lang` on `<html>`, missing mobile viewport | low / medium |

### How it crawls

- Starts at your URL and follows links **on the same host only**.
- Reads robots.txt first and never requests a disallowed URL. If robots.txt forbids the start page, the run ends
  without crawling. A robots.txt that answers with a server error is treated as "disallow everything".
- Waits between requests (500 ms by default) to keep the load on your server low.
- With `checkExternalLinks`, each outbound link is requested once, after reading that site's robots.txt; a link
  it disallows is skipped and counted, never reported broken.
- Fetches only public internet addresses: a URL or redirect into a private, loopback or link-local network is
  refused.
- Plain HTTP, no headless browser: fast and cheap, but pages that build their content with JavaScript are audited as
  the server sends them.

Use it only on sites you own or are authorized to audit.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `startUrl` | string | (required) | Your home page. |
| `maxPages` | integer | `50` | Up to 2,000. Each page is one charged event. |
| `checkExternalLinks` | boolean | `false` | Request each outbound link once to find broken ones. |
| `maxExternalLinks` | integer | `200` | Cap on outbound checks. |
| `requestDelayMs` | integer | `500` | Pause between requests. |

### Output

Dataset: one item per URL fetched.

```json
{
  "url": "https://www.example.com/about",
  "status": 200,
  "title": "About",
  "titleLength": 5,
  "metaDescription": null,
  "h1Count": 2,
  "canonical": null,
  "imagesMissingAlt": 1,
  "jsonLdTypes": [],
  "brokenInternalLinks": ["https://www.example.com/old-page"],
  "issues": [
    {"code": "title-too-short", "severity": "low", "detail": 5},
    {"code": "missing-meta-description", "severity": "medium"},
    {"code": "multiple-h1", "severity": "low", "detail": 2},
    {"code": "broken-internal-links", "severity": "high", "detail": 1}
  ],
  "score": 72
}
```

Key-value store record `SUMMARY`: pages audited, average score, issue counts across the site, URLs skipped because
of robots.txt, and why the crawl stopped.

### Pricing

Pay per event, no start fee:

| Event | Price | Per 1,000 |
|---|---|---|
| `page-audited` (one URL fetched and reported) | $0.005 | $5.00 |

Set `maxPages` and a maximum charge per run; the Actor never audits more pages than the charge limit allows.

### Limits

- One host per run (`www.example.com` and `example.com` are different hosts).
- No JavaScript rendering, no Core Web Vitals.
- Scores are a simple weighted count of findings, meant for tracking progress, not a search-engine ranking signal.
- Memory: 256 MB by default, 512 MB at most. The audit spends its time waiting on your server, so more memory does
  not make it faster.
- A run stops early, with what it has audited saved and the reason in `SUMMARY.stoppedReason`, when its timeout
  is near or when your site answers very slowly (on average over a minute per page).

### Support

Report problems in the **Issues** tab. We aim to respond within a few days.

# Actor input Schema

## `startUrl` (type: `string`):

Home page of a site you own or are authorized to audit. Only pages on this exact host are crawled.

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

Stop after this many pages (each page is one charged event).

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

Also request each external link once to report broken ones. Off by default.

## `maxExternalLinks` (type: `integer`):

Cap on outbound link checks per run.

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

Pause between requests to keep load on your server low.

## Actor input object example

```json
{
  "startUrl": "https://api.apify.com/v2/key-value-stores/uM2zEXblvgf0s1cES/records/index.html",
  "maxPages": 5,
  "checkExternalLinks": false,
  "maxExternalLinks": 200,
  "requestDelayMs": 500
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "startUrl": "https://api.apify.com/v2/key-value-stores/uM2zEXblvgf0s1cES/records/index.html",
    "maxPages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("wrentools/own-site-seo-audit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrl": "https://api.apify.com/v2/key-value-stores/uM2zEXblvgf0s1cES/records/index.html",
    "maxPages": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("wrentools/own-site-seo-audit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrl": "https://api.apify.com/v2/key-value-stores/uM2zEXblvgf0s1cES/records/index.html",
  "maxPages": 5
}' |
apify call wrentools/own-site-seo-audit --silent --output-dataset

```

## MCP server setup

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

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JLnOP0aBbngwTXp8m/builds/kl1tS4fwxO2zhNOfn/openapi.json
