# Sitemap Monitor: New, Updated & Removed Pages Tracker (`latamdatatools/sitemap-change-monitor`) Actor

Watch the sitemaps of any website (competitors, clients, your own) and get the new, updated and removed pages since the last run. Finds sitemaps in robots.txt, follows sitemap indexes, reads .xml.gz and text sitemaps. Respects robots.txt.

- **URL**: https://apify.com/latamdatatools/sitemap-change-monitor.md
- **Developed by:** [Julian Genuario](https://apify.com/latamdatatools) (community)
- **Categories:** SEO tools, Automation, Marketing
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 page changes

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

## Sitemap Monitor: New, Updated & Removed Pages Tracker

Know **the moment a competitor publishes a new page**. Give this Actor a list of websites (or sitemap URLs), schedule it daily or weekly, and every run returns only what changed since the previous one:

- **new** pages (in the sitemap now, not last time): new blog posts, landing pages, product pages, docs, job posts, locations;
- **updated** pages (the sitemap `lastmod` date changed);
- **removed** pages (gone from the sitemap).

It finds the sitemaps on its own (from `robots.txt`, then `/sitemap.xml`, `/sitemap_index.xml`, `/wp-sitemap.xml`...), follows **sitemap indexes** to every child sitemap, and reads **gzip (.xml.gz)** and **plain-text** sitemaps. Image, hreflang and Google News extensions are read too.

### What does Sitemap Monitor do?

Sitemap Monitor watches the XML sitemaps of any website (competitors, clients or your own) and returns the new, updated and removed pages since the previous run. It discovers sitemaps from robots.txt, follows sitemap indexes and reads .xml.gz and plain-text sitemaps, so you can track competitor content, new landing pages and SEO changes on a schedule.

### How to use Sitemap Monitor

1. Click **Try for free** on this page (a free Apify account is enough to start).
2. Fill in the input (see the examples below) or keep the prefilled example.
3. Click **Start** and wait for the run to finish.
4. Download the results from the **Output** tab as JSON, CSV, Excel or HTML, or read them with the Apify API.
5. Optional: create a **Schedule** to run it daily or weekly, and connect a webhook or an integration (Make, Zapier, n8n, Slack).

### Who uses it

- **Content and SEO teams**: see every article your competitors publish and which pages they refresh, without visiting their blogs.
- **Competitive intelligence**: new product, pricing, integration, location or careers pages show up here first.
- **Agencies**: monitor clients' sites for unexpected removals (a deleted page in the sitemap is often an SEO accident).
- **Your own site**: confirm that new content reaches the sitemap and get a list of URLs to submit or check.
- **Feeds**: send the new URLs to Slack, email, a Google Sheet or another Actor (for example a content scraper) with an Apify webhook or integration.

### Input

| Field | What it does |
|---|---|
| **Websites or sitemap URLs** | `example.com`, `https://example.com`, or a direct sitemap URL. Also from a **dataset** or a **CSV / Google Sheets** link. Duplicates are removed. |
| **What to output** | *Only changes* (default) or *All URLs* with their change type. |
| **Output all URLs on the first run** | The first run saves a baseline. On (default): the baseline is returned too. Off: the first run only saves it, at no charge. |
| **Monitor name** | Separate histories (e.g. one monitor with a `/blog/` filter and another for the whole site). |
| **Only URLs containing / Skip URLs containing** | Text filters or `/regex/`. |
| **Max URLs per site**, **Max sitemap files per site**, **Sites in parallel**, **Delay** | Limits and politeness. |

#### Example input

```json
{
  "startUrls": ["competitor-one.com", "https://competitor-two.com/sitemap_index.xml"],
  "outputMode": "changes",
  "includeUrlPatterns": ["/blog/", "/pricing"],
  "monitorName": "competitors-blog"
}
```

### Output

```json
{
  "site": "https://blog.apify.com",
  "url": "https://blog.apify.com/best-price-scraping-tools/",
  "changeType": "updated",
  "lastmod": "2026-10-24T09:12:00.000Z",
  "previousLastmod": "2026-09-30T14:03:00.000Z",
  "changefreq": null,
  "priority": null,
  "images": 1,
  "hreflangAlternates": 0,
  "newsTitle": null,
  "sitemapUrl": "https://blog.apify.com/post-sitemap.xml",
  "firstSeenAt": "2026-10-01T10:00:00.000Z",
  "previousRunAt": "2026-10-25T10:00:00.000Z",
  "detectedAt": "2026-10-26T10:00:00.000Z"
}
```

`changeType` is one of `new`, `updated`, `removed`, `baseline` (first run) or `unchanged` (only in *All URLs* mode). `RUN_SUMMARY` in the key-value store has per-site counts, sitemaps read and any sitemap that failed.

### Reliable "removed" detection

A page is reported as removed only when **every sitemap of the site was read successfully** and no limit was hit. If one child sitemap fails (timeout, 5xx) the run does not report removals for that site and keeps the old URLs in the snapshot, so you do not get false alarms.

### Pricing

Pay per event:

- **USD 2 per 1,000 changes** (new, updated or removed pages).
- **USD 0.50 per 1,000 URLs** for baseline / unchanged rows (first run, or *All URLs* mode).

A run where nothing changed costs almost nothing. Sites that cannot be read are free. The run respects your *max charge per run*.

### Good behaviour

- **robots.txt is always respected** (sitemap URLs disallowed for bots are skipped and listed), including `Crawl-delay`.
- One request at a time per host with a delay (500 ms by default), identifiable user-agent `SitemapMonitorBot`, retries with back-off on 429 / 5xx.
- Only sitemap files are downloaded, never the pages themselves.

### Cost examples

Prices at the current pay-per-event rate: USD 2.00 per 1,000 changes, USD 0.50 per 1,000 baseline or unchanged URLs, plus USD 0.01 per run. You can set a maximum charge per run in the run options.

| Job | Approximate cost |
|---|---|
| Test run: first 40 URLs of crawlee.dev as baseline (measured: 2 s) | about $0.03 |
| First run on a site with 5,000 URLs (baseline) | about $2.51 |
| Daily check of that site, 20 changed pages | about $0.05 per run |
| Daily check where nothing changed | $0.01 per run |

### Use it from your code, an integration or an AI agent

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("latamdatatools/sitemap-change-monitor").call(run_input={
  "startUrls": [
    "apify.com",
    "https://blog.apify.com/sitemap.xml"
  ],
  "outputMode": "changes",
  "monitorName": "competitors"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["changeType"], item["url"], item["lastmod"])
```

**JavaScript / Node.js** (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('latamdatatools/sitemap-change-monitor').call({
  startUrls: [
    'apify.com',
    'https://blog.apify.com/sitemap.xml'
  ],
  outputMode: 'changes',
  monitorName: 'competitors'
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => [i.changeType, i.url]));
```

**No code:**

- **Schedules:** save your input as a Task and run it daily or weekly from Apify Console (Schedules).
- **Integrations:** send the results to Google Sheets, Slack, email, Make, Zapier, n8n or Airbyte from the Integrations tab, or call your own webhook when a run finishes.
- **AI agents:** add it as a tool in Claude, Cursor, VS Code and other MCP clients through the Apify MCP server (`https://mcp.apify.com`), so the agent can tell you which pages a site added or removed.

### FAQ

**The site has no sitemap.** The site is marked as failed with the reason. Try entering the sitemap URL directly if you know it.

**Can I see pages that changed but kept the same lastmod?** No: this Actor reads sitemaps, not page content. Many sites update `lastmod` reliably (WordPress/Yoast, Shopify, most CMSs), some do not.

**Where is the history?** In your account's named key-value store `sitemap-monitor-state`, one compressed snapshot per site and monitor name.

Questions or ideas? Open an issue in the Issues tab.

# Actor input Schema

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

One per line: a domain (example.com), a homepage, or a sitemap URL (sitemap.xml, sitemap_index.xml, .xml.gz, .txt). For a domain, sitemaps are found in robots.txt and at the usual paths.

## `datasetId` (type: `string`):

Optional: read the websites from an Apify dataset. Use "URL field" to say which field holds the URL or domain.

## `csvUrl` (type: `string`):

Optional: public CSV with a header row (or just one URL per line). Google Sheets links work if shared as "Anyone with the link".

## `urlField` (type: `string`):

Field / column with the website or sitemap URL.

## `outputMode` (type: `string`):

Only changes: new, updated (lastmod changed) and removed pages since the previous run. All URLs: every URL, each with its change type.

## `outputBaselineOnFirstRun` (type: `boolean`):

The first run of a site saves a baseline. On: the baseline URLs are also returned (changeType = baseline). Off: the first run only saves it (nothing charged) and later runs report changes.

## `monitorName` (type: `string`):

Snapshots are stored per monitor name in the named key-value store "sitemap-monitor-state". Use different names for separate monitors of the same site (e.g. with different filters).

## `includeUrlPatterns` (type: `array`):

Optional: keep only URLs that contain one of these texts, e.g. /blog/. Regular expressions between slashes work too: //product/\d+/.

## `excludeUrlPatterns` (type: `array`):

Optional: drop URLs that contain one of these texts, e.g. /tag/.

## `maxUrlsPerSite` (type: `integer`):

Stop reading a site's sitemaps after this many URLs (removed pages are then not reported for that site).

## `maxSitemapsPerSite` (type: `integer`):

Stop after reading this many sitemap files for one site.

## `maxConcurrency` (type: `integer`):

How many sites are read at the same time (requests to one host are always spaced).

## `minDelayMs` (type: `integer`):

Politeness. A Crawl-delay in robots.txt is respected when it is longer.

## Actor input object example

```json
{
  "startUrls": [
    "apify.com",
    "https://blog.apify.com/sitemap.xml"
  ],
  "urlField": "url",
  "outputMode": "changes",
  "outputBaselineOnFirstRun": true,
  "monitorName": "default",
  "maxUrlsPerSite": 50000,
  "maxSitemapsPerSite": 500,
  "maxConcurrency": 3,
  "minDelayMs": 500
}
```

# Actor output Schema

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

No description

## `runSummary` (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": [
        "apify.com",
        "https://blog.apify.com/sitemap.xml"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("latamdatatools/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 = { "startUrls": [
        "apify.com",
        "https://blog.apify.com/sitemap.xml",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,latamdatatools/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/7HWfONGWJ0ZHQgDPw/builds/o0yNVOsDhkt4Oyjgc/openapi.json
