# SitemapGuard – Website SEO Audit (`soruvalab/sitemapguard-apify`) Actor

Audit website SEO, detect missing metadata, broken pages, duplicate titles, and H1 issues. Discover URLs via XML sitemaps and export structured JSON/CSV reports for automated SEO monitoring.

- **URL**: https://apify.com/soruvalab/sitemapguard-apify.md
- **Developed by:** [SoruvaLab](https://apify.com/soruvalab) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 seo audit results

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

## SitemapGuard – Website SEO Audit

Audit website pages, detect common technical SEO issues, and export structured results for reporting and automation.

SitemapGuard is an Apify Actor designed for website owners, SEO professionals, agencies, and developers who need a straightforward way to inspect website metadata, page status, and links.

### Key Features

- **SEO metadata auditing** — Extract page titles, meta descriptions, and canonical URLs.
- **H1 validation** — Detect missing or multiple H1 headings.
- **Broken page detection** — Identify HTTP 404 and 410 responses.
- **Internal and external link analysis** — Count links and discover additional internal pages.
- **XML sitemap discovery** — Find additional pages from standard `/sitemap.xml` URL lists.
- **Duplicate metadata detection** — Flag duplicate titles and meta descriptions encountered during a crawl.
- **Structured results** — Export audit data from Apify datasets as JSON or CSV.
- **Configurable crawl limits** — Control the maximum number of pages inspected.

### Who Is It For?

- SEO agencies performing initial website assessments
- Website owners checking common SEO problems
- Developers validating website changes
- E-commerce teams auditing public storefront pages
- Automation builders creating recurring SEO workflows

### How to Use

1. Enter one or more website URLs.
2. Set the maximum number of pages to audit.
3. Start the Actor.
4. Review the results in the Apify dataset.
5. Export the data as JSON or CSV.

#### Example Input

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "maxRequestsPerCrawl": 10
}
```

#### Example Output

```json
{
  "url": "https://example.com/",
  "referringUrl": null,
  "statusCode": 200,
  "title": "Example Domain",
  "description": "",
  "canonical": "",
  "h1Count": 0,
  "internalLinkCount": 0,
  "externalLinkCount": 0,
  "issues": [
    "MISSING_DESCRIPTION",
    "MISSING_CANONICAL",
    "MISSING_H1"
  ],
  "issueCount": 3
}
```

### Detected Issues

Depending on the page and crawl results, SitemapGuard can report:

| Issue | Meaning |
|---|---|
| `MISSING_TITLE` | Page title is missing |
| `MISSING_DESCRIPTION` | Meta description is missing |
| `MISSING_CANONICAL` | Canonical URL is missing |
| `MISSING_H1` | No H1 heading detected |
| `MULTIPLE_H1` | More than one H1 heading detected |
| `DUPLICATE_TITLE` | Duplicate page title encountered |
| `DUPLICATE_DESCRIPTION` | Duplicate meta description encountered |
| `BROKEN_PAGE` | HTTP 404 or 410 page detected |
| `REQUEST_FAILED` | Page request could not be completed |

### XML Sitemap Support

SitemapGuard checks the standard `/sitemap.xml` location and adds discovered same-host URLs to the crawl queue.

Current limitations:

- Supports standard XML `<urlset>` sitemaps.
- Sitemap index files are not yet supported.
- Sitemap discovery is limited to 500 URLs per sitemap.
- Sitemap downloads are limited to 2 MB.
- Crawl limits still apply to all discovered pages.

### Important Notes

- SitemapGuard analyzes publicly accessible website pages.
- JavaScript-rendered content may not be fully captured because the Actor uses CheerioCrawler.
- Some websites may restrict automated access.
- SEO issue detection is based on configurable technical checks and does not guarantee search engine rankings.
- Duplicate metadata checks apply to pages encountered within a crawl, not necessarily the entire website.

### Automation and Export

Use Apify datasets to export results as JSON or CSV, or integrate the Actor with other tools through the Apify API.

SitemapGuard can be used as part of scheduled website monitoring and SEO reporting workflows.

### Support

If you encounter a problem, please use the Issues or support options available on the Actor's Apify Store page.

# Actor input Schema

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

Enter the website URLs you want to audit.

## `maxRequestsPerCrawl` (type: `integer`):

Maximum number of pages to crawl. Start with 10 for a low-cost test.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "maxRequestsPerCrawl": 10
}
```

# Actor output Schema

## `results` (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": [
        {
            "url": "https://example.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("soruvalab/sitemapguard-apify").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://example.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("soruvalab/sitemapguard-apify").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://example.com"
    }
  ]
}' |
apify call soruvalab/sitemapguard-apify --silent --output-dataset

```

## MCP server setup

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

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/f9eaDFU4n3wdlW09g/builds/hghW2ShrAd6fCGEA3/openapi.json
