# Sitemap Snapshot Diff — Added URLs and Lastmod Changes (`abdulwhab95/sitemap-snapshot-change-feed`) Actor

Compare supplied sitemap XML snapshots; export added URLs, lastmod changes and explicitly enabled removals. Optional authorized public sitemap fetch.

- **URL**: https://apify.com/abdulwhab95/sitemap-snapshot-change-feed.md
- **Developed by:** [ABDULWAHAB NASER RASHED ALQARAWI](https://apify.com/abdulwhab95) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 delivered result rows

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 Snapshot Diff — Added URLs and Lastmod Changes

Compare supplied sitemap XML snapshots; export added URLs, lastmod changes and explicitly enabled removals. Optional authorized public sitemap fetch.

### Working example

These are synthetic demonstration inputs, not scraped customer data.

```json
{
  "payload": {
    "currentXml": "<urlset><url><loc>https://example.com/new</loc><lastmod>2026-10-21</lastmod></url></urlset>",
    "previousXml": "<urlset><url><loc>https://example.com/old</loc></url></urlset>",
    "snapshotsComplete": true
  }
}
```

Expected dataset example (computed by the included implementation):

```json
[
  {
    "url": "https://example.com/new",
    "changeType": "ADDED",
    "previousLastmod": null,
    "lastmod": "2026-10-21"
  },
  {
    "url": "https://example.com/old",
    "changeType": "REMOVED",
    "previousLastmod": null,
    "lastmod": null
  }
]
```

### Scope and limitations

Single urlset XML, at most 5,000 URLs and 2 MB per snapshot. No sitemap indexes, gzip, DTD or entity declarations. Duplicate loc entries are rejected. Removals are suppressed unless snapshotsComplete is true; absence from a supplied sitemap does not prove page deletion. Lastmod comparison is not page-content monitoring.

Input is bounded to 2 MB in serialized form, and work/output to 5,000 records/findings. HTML table output is additionally capped at 8 MB before delivery. Async I/O has a 60-second budget; the configured platform timeout is 90 seconds for the entire run. The async timer alone cannot interrupt synchronous parsing, which is bounded by byte/row limits. Format failures are not billed as result records. RUN_REPORT distinguishes computed and delivered rows, billing-limit truncation and source/input failures. A successful run with zero output is possible for an unchanged comparison or empty input collection.

### Optional public source

Only the sitemap, header and table tools accept sourceUrl. Provide an HTTPS URL without query/fragment/credentials and set authorizedSource=true only if you have the necessary rights. The supplied source replaces currentXml, headers or html respectively. Only a 200 response is accepted; no page redirects, login, CAPTCHA or access-control bypass. DNS is pinned to a validated public address and private/reserved networks are blocked. Robots rules are checked; fetch limits are 8 requests, 2 MB per response, and no external credentials are forwarded. Source terms still apply; robots permission is not a legal conclusion. Other tools work entirely on supplied data and make no source requests.

### Price

$2 per 1,000 successfully delivered result rows, plus $0.001 per run start at supported memory. For headers a full audit emits six result rows; OpenAPI bills findings, sitemap bills changes, normalization bills retained records and tables bills data rows. Empty runs still have the start charge. Set Apify Maximum cost per run. Platform pricing/terms prevail. No source API key, external AI subscription or recurring schedule is created.

### Privacy and appropriate use

Use data you own or are permitted to process. Do not upload secrets, personal/sensitive information or copyrighted datasets without the required rights. Inputs and results are stored in your Apify account under its retention settings; delete those stores when no longer needed. This Actor does not send your input to an AI service. Public listings/examples contain only synthetic data. This tool is not legal, security or compatibility certification.

### Export and troubleshooting

Use Dataset JSON for full fidelity. CSV/Excel export may serialize nested arrays and objects. Treat spreadsheet cells as text when opening untrusted data; source content is not rewritten to neutralize formulas. A FAILED report means input/source processing did not complete. LIMIT_REACHED means fewer rows were delivered than computed. Keep your original input and inspect RUN_REPORT before using the output downstream.

Reference: https://www.sitemaps.org/protocol.html

### عربي

أداة محدودة وواضحة النطاق: أدخل بيانات عندك حق استخدامها، وراجع تقرير التشغيل والحدود قبل الاعتماد على النتائج. الأمثلة تجريبية ومعلّمة بذلك، ولا يوجد ضمان أمان أو توافق أو دخل. لا تتجاوز الأداة تسجيل الدخول أو قيود الوصول.

# Actor input Schema

## `payload` (type: `object`):

See README for the supported keys and limits.

## `sourceUrl` (type: `string`):

Optional alternative to headers/currentXml/html. No credentials, redirects or private networks. Query strings are not supported.

## `authorizedSource` (type: `boolean`):

Required for sourceUrl. Confirm site terms, rights and privacy obligations; robots permission alone is not legal authorization.

## Actor input object example

```json
{
  "payload": {
    "currentXml": "<urlset><url><loc>https://example.com/new</loc><lastmod>2026-10-21</lastmod></url></urlset>",
    "previousXml": "<urlset><url><loc>https://example.com/old</loc></url></urlset>",
    "snapshotsComplete": true
  },
  "authorizedSource": false
}
```

# 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 = {
    "payload": {
        "currentXml": "<urlset><url><loc>https://example.com/new</loc><lastmod>2026-10-21</lastmod></url></urlset>",
        "previousXml": "<urlset><url><loc>https://example.com/old</loc></url></urlset>",
        "snapshotsComplete": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("abdulwhab95/sitemap-snapshot-change-feed").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 = { "payload": {
        "currentXml": "<urlset><url><loc>https://example.com/new</loc><lastmod>2026-10-21</lastmod></url></urlset>",
        "previousXml": "<urlset><url><loc>https://example.com/old</loc></url></urlset>",
        "snapshotsComplete": True,
    } }

# Run the Actor and wait for it to finish
run = client.actor("abdulwhab95/sitemap-snapshot-change-feed").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 '{
  "payload": {
    "currentXml": "<urlset><url><loc>https://example.com/new</loc><lastmod>2026-10-21</lastmod></url></urlset>",
    "previousXml": "<urlset><url><loc>https://example.com/old</loc></url></urlset>",
    "snapshotsComplete": true
  }
}' |
apify call abdulwhab95/sitemap-snapshot-change-feed --silent --output-dataset

```

## MCP server setup

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

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/IHwr9zhY8Hpna3KQP/builds/wdMG4jvfDuNS6LdDW/openapi.json
