# Service Area Page Coverage Auditor (`junipr/service-area-page-coverage-auditor`) Actor

Map service-area pages against target cities/counties/services and find missing, duplicate, weak, or cannibalized local coverage

- **URL**: https://apify.com/junipr/service-area-page-coverage-auditor.md
- **Developed by:** [junipr](https://apify.com/junipr) (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

from $6.50 / 1,000 service area page scanneds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Service Area Page Coverage Auditor

Map service-area pages against target locations and services, then identify missing, thin, duplicate, and cannibalized coverage with URL-level evidence.

### What you get

- Create a cross-product of target service areas and target services, or accept an explicit coverage matrix.
- Match combinations against URLs, page titles, headings, and visible body text.
- Classify each pair as covered, missing, thin, duplicate, or source unavailable.
- Flag cannibalization when multiple reachable pages target the same configured pair.
- Prioritize build, consolidation, and content-strengthening work in exportable reports.

### Input

```json
{
  "startUrls": [
    "https://example.com/services"
  ],
  "sitemapUrls": [
    "https://example.com/sitemap.xml"
  ],
  "allowedDomains": [
    "example.com"
  ],
  "maxPages": 10,
  "maxDepth": 1,
  "maxTargetLocations": 10,
  "maxTargetServices": 10,
  "targetServiceAreas": [
    "Austin",
    "Dallas"
  ],
  "targetServices": [
    "Roof Repair",
    "Gutter Cleaning"
  ],
  "coverageMatrix": [],
  "urlPatternRules": [
    {
      "name": "service pages",
      "pattern": "/services/"
    }
  ],
  "minimumContentThresholds": 250,
  "detectCannibalization": true,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 250,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "maxChargeUsd": 15,
  "includeReport": true
}
```

Use `htmlInputs` when you already have source HTML or need deterministic recurring analysis. URL runs accept normal public HTTP(S) pages. Private-network and unsupported URL targets are rejected.

### Dataset output

Each dataset item is a complete, schema-defined record. Fields that are not present in the source remain `null` rather than being guessed.

```json
{
  "sourceUrl": "https://example.com/services/austin-roof-repair",
  "recordType": "service_area_coverage",
  "issueCode": "service_area_page_coverage_auditor_covered",
  "serviceArea": "Austin",
  "serviceName": "Roof Repair",
  "matchingUrls": [
    "https://example.com/services/austin-roof-repair"
  ],
  "coverageStatus": "covered",
  "contentWordCount": 620,
  "localModifierFound": true,
  "cannibalizationRisk": false,
  "coveragePriority": "low"
}
```

### Reports

A successful run can write:

- `service-area-page-coverage-auditor-summary-report.md`
- `service-area-page-coverage-auditor-records.csv`
- `service-area-page-coverage-auditor-issues.json`
- `service-area-page-coverage-auditor-evidence-samples.json`
- `service-area-page-coverage-auditor-run-metadata.json`

Reports include row counts, issue severities, evidence references, recommendations, and the input fields consumed by the run.

### Pricing and cost controls

This actor uses pay-per-event pricing with Apify platform usage pass-through off:

- actor-start — $0.01000 per run
- service-area-page-scanned — $0.00650 per page
- coverage-gap-emitted — $0.00295 per gap
- record-extracted — $0.00295 per record
- audit-report-generated — $0.08000 per report

The default `maxChargeUsd` is $15. The runtime checks the local budget and the Apify charge result before every paid dataset item. If either limit is reached, it stops before emitting unpaid output and writes billing diagnostics to key-value storage.

### Safe crawling behavior

- Public HTTP(S) sources only.
- Private-network, localhost, and unsupported protocol targets are rejected.
- `allowedDomains`, `maxPages`, actor-specific caps, `maxDepth`, `timeoutMs`, and `requestDelayMs` bound discovery.
- Supplied HTML is processed without an external request.
- Protected or authenticated sources are outside the supported public-data scope.

### Limitations

- Coverage is evaluated only against configured area/service names.
- Word count is based on visible HTML text, not rendered client-side content.
- Multiple matching URLs are a cannibalization signal for review, not an automatic canonicalization decision.

### Common use cases

- Find missing city/service combinations.
- Detect thin or competing service-area pages.
- Prioritize local landing-page buildouts.

# Actor input Schema

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

Public site roots or known service-area pages.

## `sitemapUrls` (type: `array`):

Optional public XML sitemaps used to discover service-area pages.

## `htmlInputs` (type: `array`):

Optional source-backed service-area page snapshots.

## `allowedDomains` (type: `array`):

Optional domain allowlist for discovery.

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

Maximum pages fetched or analyzed.

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

Internal-link discovery depth from each start URL.

## `maxTargetLocations` (type: `integer`):

Maximum target areas included in the coverage matrix.

## `maxTargetServices` (type: `integer`):

Maximum services included in the coverage matrix.

## `includeEvidence` (type: `boolean`):

Include source URLs and visible evidence in output rows.

## `includeRawSnapshots` (type: `boolean`):

Reserve raw snapshots in run artifacts when enabled.

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

Delay between public HTTP requests in milliseconds.

## `timeoutMs` (type: `integer`):

Per-request timeout in milliseconds.

## `userAgentMode` (type: `string`):

Normal HTTP user-agent profile.

## `targetServiceAreas` (type: `array`):

City, county, neighborhood, or region names to map.

## `targetServices` (type: `array`):

Service names expected across target areas.

## `coverageMatrix` (type: `array`):

Optional exact area/service pairs; overrides the cross-product.

## `urlPatternRules` (type: `array`):

Optional path patterns used to prioritize service-area URLs.

## `minimumContentThresholds` (type: `integer`):

Pages below this visible-word threshold are classified as thin.

## `detectCannibalization` (type: `boolean`):

Flag target combinations matched by more than one reachable page.

## `maxChargeUsd` (type: `number`):

Maximum estimated PPE spend before a graceful stop.

## `includeReport` (type: `boolean`):

Write the coverage matrix and evidence reports to key-value storage.

## Actor input object example

```json
{
  "startUrls": [
    "https://example.com/"
  ],
  "sitemapUrls": [],
  "htmlInputs": [],
  "allowedDomains": [],
  "maxPages": 1,
  "maxDepth": 1,
  "maxTargetLocations": 10,
  "maxTargetServices": 10,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 250,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "targetServiceAreas": [
    "Nashville"
  ],
  "targetServices": [
    "Roof Repair"
  ],
  "coverageMatrix": [],
  "urlPatternRules": [],
  "minimumContentThresholds": 250,
  "detectCannibalization": true,
  "maxChargeUsd": 15,
  "includeReport": true
}
```

# Actor output Schema

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

No description

## `report` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("junipr/service-area-page-coverage-auditor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("junipr/service-area-page-coverage-auditor").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 '{}' |
apify call junipr/service-area-page-coverage-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,junipr/service-area-page-coverage-auditor"
        }
    }
}

```

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/aO8djAoanYaqIlgdf/builds/zblwDum8rYmNcT2Lv/openapi.json
