# Sitemap URL Change Scraper (`min.h/sitemap-url-change-scraper`) Actor

Extract URL and lastmod inventory from public XML sitemaps, nested indexes and gzip files. Optionally compare a caller-supplied same-origin URL baseline; incomplete scans never emit removals. No automatic persistent baseline or page-body crawling.

- **URL**: https://apify.com/min.h/sitemap-url-change-scraper.md
- **Developed by:** [Min. H](https://apify.com/min.h) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.40 / 1,000 sitemap url 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

## Sitemap URL Change Scraper

Extract URL and lastmod inventory from public XML sitemaps, nested indexes and gzip files. Optionally compare a caller-supplied same-origin URL baseline; incomplete scans never emit removals. No automatic persistent baseline or page-body crawling.

### Try the offline example

The prefilled input uses a bundled synthetic example. It makes zero target network requests and zero billing events. `examples/sample-input.json` contains the exact fixture input. `store/sample-output.json` is the observed fixture output, labeled `SYNTHETIC_FIXTURE`.

### Use permitted live targets

Provide up to 25 explicit HTTPS URLs you own or have permission to process. Hostnames are required. Remove credentials, query strings, explicit ports and fragments from user input. The per-target request and elapsed-time limits apply to DNS, robots, redirects and source reads. Redirects and source requests stay on the same HTTPS origin.

```json
{
  "mode": "live",
  "urls": [
    "https://www.sitemaps.org/sitemap.xml"
  ],
  "maxUrls": 1,
  "maxRows": 8,
  "timeoutSecs": 15
}
```

Demo basis: A guarded local run read the official protocol site's public XML sitemap and produced eight URL rows under the sample cap. The synthetic fixture exercises XML indexes, gzip and caller-supplied changes.

Extract URL and lastmod inventory from public XML sitemaps, nested indexes and gzip files. Optionally compare a caller-supplied same-origin URL baseline; incomplete scans never emit removals. No automatic persistent baseline or page-body crawling. Supply `previousUrls` only for one sitemap root, using a previous complete scan of that same root. A `REMOVED` result describes absence in a fully scanned comparable sitemap. The Actor makes no assertion about deletion of the underlying page.

### Outputs

The Dataset, `OUTPUT.json` and `OUTPUT.csv` contain the same records. CSV protects spreadsheet formula-like strings with a leading apostrophe and uses empty cells for nulls. Read JSON for verbatim values. The grouped statuses are `COMPLETE`, `PARTIAL`, and `UNKNOWN`. `SUMMARY` reports coverage, duplicates, requests, response size and billing state. `PPE-AUDIT` contains only counts and safe response categories.

| Field | Meaning |
| --- | --- |
| `target` | Canonical supplied HTTPS target without credentials or query. |
| `source` | Execution source. |
| `status` | Coverage of the supplied target. Partial can contain valid rows. |
| `errorCode` | Safe failure code for an unreadable target. |
| `url` | Absolute same-origin page URL listed in the sitemap, or absent from a fully scanned sitemap when compared with previousUrls. |
| `lastmod` | Publisher-supplied lastmod text; null if missing or removed. This is not verified page-update evidence. |
| `sitemapUrl` | Exact sitemap file containing the URL; null for a removed baseline URL. |
| `changeType` | ADDED, UNCHANGED or REMOVED relative only to supplied previousUrls; null when no comparison baseline was supplied. UNCHANGED means URL membership, not unchanged metadata or content. |
| `comparisonAvailable` | Whether input explicitly included a valid previousUrls baseline. |
| `scanComplete` | False if any sitemap is blocked, invalid, skipped or capped; REMOVED rows require a complete scan and sufficient output capacity. |

### Pay-per-event pricing

The rate is **$0.0004 per saved sitemap URL observation** using `sitemap-url-result`. A billable row is a usable, unique observation saved successfully across the result exports and Dataset. Synthetic, duplicate, failed and `UNKNOWN` rows are free. A PARTIAL target can include valid saved rows. Only those delivered unique observations count toward billing. UNKNOWN results and rows lost to failures are free. The run respects the lower of the platform and SDK caps. An indeterminate charge stops without resending the request. There are no automatic start or Dataset charges. Platform usage costs are included in the per-event price.

### Access and limitations

The Actor uses read-only public HTTPS without credentials, proxy bypass, account access or session cookies. It honors robots rules, rejects private DNS results and cross-origin redirects, validates TLS and keeps cloud inputs and storage restricted. Full-site crawling, page rendering and access-control bypass are unavailable. Confirm source terms and redistribution rights for your use case. Treat extracted text as untrusted input in any downstream AI system.

### Local development

Use Node.js 24. `npm ci`, `npm test`, and `npm run scan -- examples/sample-input.json ./sample-results` run locally. `npm start` supports the Apify SDK local `INPUT.json` storage convention. The local CLI does not charge PPE.

# Actor input Schema

## `mode` (type: `string`):

Use the fixed offline sample or read permitted live HTTPS targets.

## `urls` (type: `array`):

Enter up to 25 explicit public HTTPS URLs without credentials, query, explicit port or fragment. Use only targets you have permission to access.

## `maxUrls` (type: `integer`):

Maximum unique supplied targets visited in this run.

## `maxRows` (type: `integer`):

Maximum saved rows across live targets. Incomplete coverage is reported when limits are reached.

## `timeoutSecs` (type: `integer`):

Seconds allowed for DNS, robots, transfer and collection for each target.

## `previousUrls` (type: `array`):

Optional same-origin HTTPS URL membership baseline for exactly one sitemap root. Compare against a previous complete scan of that same root. Omit for inventory only.

## Actor input object example

```json
{
  "mode": "synthetic",
  "urls": [
    "https://example.com/"
  ],
  "maxUrls": 1,
  "maxRows": 10,
  "timeoutSecs": 8
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `json` (type: `string`):

No description

## `csv` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `audit` (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 = {
    "mode": "synthetic",
    "urls": [
        "https://example.com/"
    ],
    "maxUrls": 1,
    "maxRows": 10,
    "timeoutSecs": 8
};

// Run the Actor and wait for it to finish
const run = await client.actor("min.h/sitemap-url-change-scraper").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 = {
    "mode": "synthetic",
    "urls": ["https://example.com/"],
    "maxUrls": 1,
    "maxRows": 10,
    "timeoutSecs": 8,
}

# Run the Actor and wait for it to finish
run = client.actor("min.h/sitemap-url-change-scraper").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 '{
  "mode": "synthetic",
  "urls": [
    "https://example.com/"
  ],
  "maxUrls": 1,
  "maxRows": 10,
  "timeoutSecs": 8
}' |
apify call min.h/sitemap-url-change-scraper --silent --output-dataset

```

## MCP server setup

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

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/JaCvk5h11iewFaNjr/builds/31Nx1JYkdnSWdPrrN/openapi.json
