# Competitor Website Monitor – New Products & Pages, Sitemap (`fast_data_asap/sitemap-change-monitor`) Actor

Get alerted to every new, removed or updated URL on competitor sites: new products, landing pages, blog posts. Schedule daily. $3 per 1,000 checks.

- **URL**: https://apify.com/fast_data_asap/sitemap-change-monitor.md
- **Developed by:** [Fast Data](https://apify.com/fast_data_asap) (community)
- **Categories:** SEO tools, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 domain checks

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

## Competitor Sitemap Monitor – New, Removed & Updated URLs

Find out what changed on any website since your last check: **new products, new landing pages, new blog posts, removed pages and updated content**, straight from the site's XML sitemaps. Add your competitors' domains, schedule the Actor daily or weekly, and get one clean row per change.

### What it does

1. **Finds the sitemaps** of each domain automatically: `Sitemap:` lines in robots.txt, then common paths (`/sitemap.xml`, `/sitemap_index.xml`, `/wp-sitemap.xml`, `.xml.gz`, `/sitemap.txt`). Sitemap indexes (nested), gzip, text, RSS and Atom sitemaps are supported. You can also pass a direct sitemap URL (e.g. only the products sitemap of a Shopify store).
2. **Collects every URL** with its `<lastmod>` date, optionally filtered by URL patterns such as `/products/` or `/blog/`.
3. **Compares** the URL list with the snapshot of the previous run, stored in your own named key-value store `sitemap-change-monitor-state` (one record per `stateKey` + domain).
4. **Outputs** one row per change (`new`, `removed`, `updated`) plus one summary row per domain with total URL count and change counts.

The **first run of a domain is the baseline**: it stores the snapshot and outputs only the summary row (total URLs), not thousands of "new" rows. From the second run on you get the real changes. Set `emitBaseline: true` if you want all URLs on the first run too.

### Who it is for

- **E-commerce teams** tracking competitors' new products, discontinued products and new category pages.
- **SEO and content marketers** watching competitors' new blog posts, landing pages, programmatic SEO pages and site restructures.
- **Market and investor research**: new product lines, careers pages, docs, pricing pages, regional sites.
- **Your own sites**: catch accidentally removed pages or a broken sitemap after a deploy.

### Why this Actor

- **Change rows, not URL dumps** – no spreadsheet diffing; only what is new, removed or updated since the last run.
- **Cheap and fast** – plain HTTP, no browser. A blog with 1,000 URLs is checked in about 3 seconds. You pay **$0.003 per domain checked**, regardless of how many URLs the domain has.
- **Safe "removed" detection** – if a sitemap fails to load or the URL limit is hit, removed URLs are *not* reported for that run (status `partial`) and the old URLs are kept in the snapshot, so a temporary error never floods you with fake removals.
- **Pattern filters** – track only `/products/` or only `/blog/`; changing the patterns automatically starts a fresh baseline.
- **Multiple independent monitors** – use different `stateKey` values (e.g. `shop-weekly`, `blog-daily`) for the same domains.
- **Flat, AI-friendly output** – ideal for Slack/email alerts, Google Sheets, n8n, Make, Zapier or an LLM agent.

### Input

| Field | Description |
|---|---|
| `domains` | Domains, website URLs or direct sitemap URLs. Required. |
| `includePatterns` | Only track URLs matching one of these (plain text or regex), e.g. `/products/`. |
| `excludePatterns` | Ignore URLs matching any of these, e.g. `/tag/`, `/author/`. |
| `stateKey` | Name of the monitor (default `default`). Same key = compare with the previous run of that key. |
| `emitBaseline` | Output all URLs as `new` rows on the first run (default `false`). |
| `trackLastmod` | Report URLs whose `<lastmod>` changed as `updated` (default `true`). |
| `maxUrlsPerDomain` | Safety limit for huge sites (default 100,000). |
| `maxChangeRowsPerDomain` | Cap on change rows per domain and run (default 10,000); the summary always has full counts. |
| `proxyConfiguration` | Optional. By default sitemaps are fetched directly; an Apify proxy is used only as a fallback when a site blocks the request. |

Example:

```json
{
  "domains": ["https://blog.apify.com", "competitor-shop.com"],
  "includePatterns": ["/products/", "/blog/"],
  "stateKey": "competitors-daily",
  "emitBaseline": false
}
```

### Output

Every row has `rowType` (`change` or `summary`), `domain`, `url`, `changeType`, `lastmod`, `previousLastmod`, `detectedAt`, `stateKey` and `isBaseline`. Summary rows additionally have `totalUrls`, `previousTotalUrls`, `newUrls`, `removedUrls`, `updatedUrls`, `previousCheckAt`, `sitemapsRead`, `discovery`, `status` (`ok`, `partial`, `failed`) and `error`.

Real output from a test run on blog.apify.com:

```json
[
  {
    "rowType": "change",
    "domain": "blog.apify.com",
    "url": "https://blog.apify.com/outreacher-linkedin-to-lemlist/",
    "changeType": "new",
    "lastmod": "2026-11-03T14:29:55.000Z",
    "previousLastmod": null,
    "detectedAt": "2026-11-03T16:10:10Z",
    "stateKey": "default",
    "isBaseline": false
  },
  {
    "rowType": "change",
    "domain": "blog.apify.com",
    "url": "https://blog.apify.com/author/magda/",
    "changeType": "updated",
    "lastmod": "2026-11-03T13:08:04.000Z",
    "previousLastmod": "2026-09-01T10:00:00.000Z",
    "detectedAt": "2026-11-03T16:10:10Z",
    "stateKey": "default",
    "isBaseline": false
  },
  {
    "rowType": "summary",
    "domain": "blog.apify.com",
    "url": "https://blog.apify.com",
    "detectedAt": "2026-11-03T16:10:10Z",
    "stateKey": "default",
    "totalUrls": 997,
    "previousTotalUrls": 994,
    "newUrls": 3,
    "removedUrls": 0,
    "updatedUrls": 1,
    "isBaseline": false,
    "previousCheckAt": "2026-11-03T16:09:54Z",
    "sitemapsRead": 5,
    "discovery": "robots.txt",
    "status": "ok",
    "error": null
  }
]
```

The dataset has two views: **Changes** and **Domain summary**. Filter change rows with `rowType = change`.

### Pricing

Pay per event: **$0.003 per domain checked** (all sitemaps of the domain read and compared). Domains whose sitemaps cannot be loaded are free and marked with `status: failed`. Checking 20 competitors every day costs about $1.80 per month plus minimal platform usage.

### Scheduling

Create a [schedule](https://docs.apify.com/platform/schedules) (e.g. daily at 7:00) with your saved input. Each run compares with the previous run of the same `stateKey`. Connect a webhook or integration (Slack, email, Google Sheets) to get notified about the change rows.

### API, n8n and MCP

Run via API and get the results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/fast_data_asap~sitemap-change-monitor/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domains": ["competitor.com"], "includePatterns": ["/products/"], "stateKey": "shop"}'
```

- **n8n / Make / Zapier**: use the Apify node, Actor `fast_data_asap/sitemap-change-monitor`, operation "Run Actor and get dataset items", then filter `rowType = change`.
- **MCP (Claude, Cursor, other AI agents)**: `https://mcp.apify.com?tools=fast_data_asap/sitemap-change-monitor`

### FAQ

**Where is the state stored?** In the named key-value store `sitemap-change-monitor-state` in your own Apify account. Delete a record there to reset the baseline of a domain, or simply use a new `stateKey`.

**What if a site has no sitemap?** The domain gets `status: failed` with an explanation and is not charged. Pass a direct sitemap URL if the sitemap lives at an unusual path.

**Does it detect content changes without lastmod?** `updated` relies on the sitemap's `<lastmod>`. Many CMSs (WordPress, Shopify, Ghost, Webflow) maintain it. For page-content diffs use a website change monitor.

**Is it legal?** It only reads public sitemaps and robots.txt files that websites publish for crawlers. No login, no personal data.

# Actor input Schema

## `domains` (type: `array`):

Websites to monitor, e.g. competitor.com, https://shop.example.com, or a direct sitemap URL like https://example.com/sitemap_products_1.xml. Sitemaps are found automatically via robots.txt and common paths (sitemap indexes and .gz supported).

## `includePatterns` (type: `array`):

Optional. Only track URLs matching at least one of these patterns (plain text or regular expression), e.g. /products/, /blog/, /p/. Changing the patterns starts a new baseline.

## `excludePatterns` (type: `array`):

Optional. URLs matching any of these patterns (plain text or regex) are ignored, e.g. /tag/, /author/, ?page=.

## `stateKey` (type: `string`):

Name of this monitor. The URL snapshot of each domain is stored under this key in the named key-value store 'sitemap-change-monitor-state', and the next run with the same key reports changes against it. Use different keys for independent monitors of the same domain.

## `emitBaseline` (type: `boolean`):

On the first run of a domain (baseline) only a summary row is output. Turn this on to also output every URL as a 'new' row (isBaseline = true).

## `trackLastmod` (type: `boolean`):

Report URLs whose <lastmod> date in the sitemap changed since the last run as 'updated'.

## `maxUrlsPerDomain` (type: `integer`):

Safety limit for very large sites. If reached, removed URLs are not reported for that run (the snapshot would be incomplete).

## `maxChangeRowsPerDomain` (type: `integer`):

Caps the number of change rows output per domain and run (e.g. when a site is restructured). The summary row always has the full counts.

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

Optional. By default sitemaps are fetched directly and an Apify proxy is only used as fallback when a site blocks the request.

## Actor input object example

```json
{
  "domains": [
    "https://blog.apify.com"
  ],
  "stateKey": "default",
  "emitBaseline": false,
  "trackLastmod": true,
  "maxUrlsPerDomain": 100000,
  "maxChangeRowsPerDomain": 10000
}
```

# 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 = {
    "domains": [
        "https://blog.apify.com"
    ],
    "stateKey": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fast_data_asap/sitemap-change-monitor").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 = {
    "domains": ["https://blog.apify.com"],
    "stateKey": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("fast_data_asap/sitemap-change-monitor").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 '{
  "domains": [
    "https://blog.apify.com"
  ],
  "stateKey": "default"
}' |
apify call fast_data_asap/sitemap-change-monitor --silent --output-dataset

```

## MCP server setup

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

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/pREkxnb6WOKgbt3Z6/builds/6KoMm3TKkfTJ45wvx/openapi.json
