# Crawl Coverage Audit: Sitemap vs Crawl Export (`opaline_opah/crawl-coverage-audit`) Actor

Find missing URLs, failed fetches, thin pages and duplicate rows before importing a crawl to RAG, a knowledge base or site search. Compare a sitemap URL set or URL list with crawler JSON. Get coverage and a URL-level report to guide retries.

- **URL**: https://apify.com/opaline_opah/crawl-coverage-audit.md
- **Developed by:** [Nima jebraeili](https://apify.com/opaline_opah) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$100.00 / 1,000 completed coverage reports

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/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

## Crawl Coverage Audit

Find the pages missing from a web crawl before importing it into a search index, knowledge base, or chatbot. Compare the URL inventory you expected with the crawl rows you received. Get the URLs to retry and a report with an explicit coverage denominator.

### Quick start

1. Export crawler results as JSON. Apify Website Content Crawler exports can use the existing url, text, markdown, and crawl.httpStatusCode fields.
2. Paste the JSON array into **Crawl export rows**. Paste URLs into **Expected page URLs**, or paste one XML URL set into **Sitemap XML**.
3. Set the character threshold if needed, then run. Open **Output** and export JSON for the full issue list.

Example input:

```json
{"expectedUrls":["https://docs.apify.com/account/settings","https://docs.apify.com/storage/dataset"],"crawlRows":[{"url":"https://docs.apify.com/account/settings","text":"Account settings and preferences."}],"minContentChars":10}
```

This returns one ready page, one missing page, 50% coverage, and 50% readiness. The missing page appears in issues.

### What the report shows

- **Coverage** counts all expected URLs present in the export. **Readiness** counts expected URLs with at least one successful, sufficiently long result.
- **Missing** URLs are absent. **Failed** URLs have only non-2xx responses or error rows. **Thin** URLs have insufficient content. **Unexpected** URLs are outside your inventory.
- The issues list includes duplicate counts, available HTTP status, and content length. If a URL has multiple rows, the best row determines its classification. The report preserves the number of failed attempts.

### Limits and troubleshooting

- Up to 1,000 expected URL entries and 1,000 crawl rows with a combined 2 MB input limit. Split larger exports by matching paths or hostnames.
- Supply absolute HTTP(S) URLs. Fragments and standard ports are ignored. Query strings, path spelling, redirects, and canonical aliases remain distinct unless you normalize them upstream.
- For a sitemap index, combine URLs from its child maps into the URL list. Use an empty crawl array to audit an export containing no rows.
- Without an HTTP status, the Actor classifies the row from the supplied content and error field. The Actor never requests the supplied URLs, and it does not reproduce page text. Remove sensitive URLs from the inputs.
- Under paid pricing, one completed report is the intended billable unit. Refer to the Pricing tab for the live price. Check Output before starting another run after a timeout.
- Report problems in the **Issues** tab with a run ID and a redacted sample.

# Actor input Schema

## `expectedUrls` (type: `array`):

One to 1,000 absolute URLs. Clear this list if you use Sitemap XML.

## `sitemapXml` (type: `string`):

Paste one sitemap URL set and clear the expected URLs list. Use expected page URLs for combined sitemap indexes.

## `crawlRows` (type: `array`):

Paste a JSON array. Each row needs url and should contain text or markdown. Optional statusCode, crawl.httpStatusCode, and error fields are recognized. Use \[] to audit an empty export.

## `minContentChars` (type: `integer`):

Pages with less content than this are marked thin. The included example uses 40 characters.

## Actor input object example

```json
{
  "expectedUrls": [
    "https://docs.apify.com/account/settings",
    "https://docs.apify.com/storage/dataset",
    "https://docs.apify.com/actors/publishing/publish"
  ],
  "crawlRows": [
    {
      "url": "https://docs.apify.com/account/settings",
      "text": "Your Apify account settings allow you to configure your profile, manage API tokens, and set your preferences."
    },
    {
      "url": "https://docs.apify.com/storage/dataset",
      "text": "Actors can define a dataset schema that describes the structure of each dataset item and controls how data appears in the Output tab."
    }
  ],
  "minContentChars": 40
}
```

# 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 = {
    "expectedUrls": [
        "https://docs.apify.com/account/settings",
        "https://docs.apify.com/storage/dataset",
        "https://docs.apify.com/actors/publishing/publish"
    ],
    "crawlRows": [
        {
            "url": "https://docs.apify.com/account/settings",
            "text": "Your Apify account settings allow you to configure your profile, manage API tokens, and set your preferences."
        },
        {
            "url": "https://docs.apify.com/storage/dataset",
            "text": "Actors can define a dataset schema that describes the structure of each dataset item and controls how data appears in the Output tab."
        }
    ],
    "minContentChars": 40
};

// Run the Actor and wait for it to finish
const run = await client.actor("opaline_opah/crawl-coverage-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 = {
    "expectedUrls": [
        "https://docs.apify.com/account/settings",
        "https://docs.apify.com/storage/dataset",
        "https://docs.apify.com/actors/publishing/publish",
    ],
    "crawlRows": [
        {
            "url": "https://docs.apify.com/account/settings",
            "text": "Your Apify account settings allow you to configure your profile, manage API tokens, and set your preferences.",
        },
        {
            "url": "https://docs.apify.com/storage/dataset",
            "text": "Actors can define a dataset schema that describes the structure of each dataset item and controls how data appears in the Output tab.",
        },
    ],
    "minContentChars": 40,
}

# Run the Actor and wait for it to finish
run = client.actor("opaline_opah/crawl-coverage-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 '{
  "expectedUrls": [
    "https://docs.apify.com/account/settings",
    "https://docs.apify.com/storage/dataset",
    "https://docs.apify.com/actors/publishing/publish"
  ],
  "crawlRows": [
    {
      "url": "https://docs.apify.com/account/settings",
      "text": "Your Apify account settings allow you to configure your profile, manage API tokens, and set your preferences."
    },
    {
      "url": "https://docs.apify.com/storage/dataset",
      "text": "Actors can define a dataset schema that describes the structure of each dataset item and controls how data appears in the Output tab."
    }
  ],
  "minContentChars": 40
}' |
apify call opaline_opah/crawl-coverage-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,opaline_opah/crawl-coverage-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/eASC9HzZ0ZUHh7DYT/builds/0DB4rdVgtf8EKezqT/openapi.json
