Sitemap URL Extractor & Change Monitor avatar

Sitemap URL Extractor & Change Monitor

Pricing

from $0.10 / 1,000 results

Go to Apify Store
Sitemap URL Extractor & Change Monitor

Sitemap URL Extractor & Change Monitor

Sitemap URL extractor that reads robots.txt, sitemap indexes, .xml.gz and plain-text sitemaps and returns one row per URL with lastmod, changefreq, priority — plus a new/updated/removed diff between runs.

Pricing

from $0.10 / 1,000 results

Rating

0.0

(0)

Developer

Murat Uzun

Murat Uzun

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Features

Limited permissions

Share

Sitemap URL Extractor & Change Monitor: every URL with lastmod, plus a new/updated/removed diff

What is Sitemap URL Extractor & Change Monitor?

Sitemap URL Extractor & Change Monitor is an Apify Actor that turns any website's XML sitemaps into a flat dataset — one row per URL, with lastmod, changefreq, priority and image/video counts. Give it a bare domain and it reads the Sitemap: lines of /robots.txt, then falls back to /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /sitemap.xml.gz and /sitemap.txt. Give it a sitemap index and it follows every child sitemap (up to 500) by itself. Gzipped .xml.gz sitemaps, namespace-prefixed XML, CDATA-wrapped <loc> values, plain-text sitemaps and RSS/Atom feeds used as sitemaps are all handled. Switch Mode to diff and the Actor snapshots each source in a named key-value store, so every later run labels each URL new, updated (its lastmod moved forward), unchanged or removed — a ready-made "what did this site add, edit and delete this week" feed. Turn on Only changed URLs and unchanged URLs are not output, so a scheduled monitor pays only for what changed. Price: $0.20 per 1,000 URL rows on the Free plan, down to $0.10 on Gold and above.

What data does Sitemap URL Extractor & Change Monitor extract?

Sitemap URL Extractor & Change Monitor extracts 12 fields per URL:

FieldTypeDescription
urlstringThe page URL from <loc>, entity-decoded and resolved to absolute
lastmodstring<lastmod> normalised to an ISO 8601 UTC timestamp (2026-09-12T16:30:03.000Z)
changefreqstring<changefreq> hint: always, hourly, daily, weekly, monthly, yearly, never
prioritynumber<priority> clamped to 0.0-1.0
imageCountinteger<image:image> entries in the URL block (Google image sitemap extension)
videoCountinteger<video:video> entries in the URL block (Google video sitemap extension)
sitemapUrlstringWhich child sitemap file actually contained this URL, e.g. https://apify.com/sitemap/pages.xml
sourcestringThe domain or sitemap URL you entered
changestringDiff mode only: new, updated, unchanged or removed versus the previous run
previousLastmodstringDiff mode, updated rows only: the lastmod the previous run saw
errorstringAlways null: a source that fails produces no row and no charge — its reason goes to the ERRORS record
scrapedAtstringWhen the run read the sitemaps (ISO 8601 UTC)

How to use Sitemap URL Extractor & Change Monitor

  1. Paste domains or sitemap URLs into Sitemaps or domains. apify.com, https://apify.com and https://www.allbirds.com/sitemap.xml all work — discovery, index recursion and gzip are automatic.
  2. Set Max URLs per source to the number of rows you want per site (default 1,000, maximum 200,000). The cap counts across every child sitemap of an index.
  3. Optionally narrow the crawl with URL filter (regex) — /products/ for a Shopify catalogue, /blog/ for content, \.pdf$ for documents.
  4. Click Start, then export as JSON, CSV, Excel or HTML — or schedule the Actor in diff mode and wire the Changes view into a webhook.

Example input

{
"sources": ["https://apify.com", "https://www.allbirds.com/sitemap.xml"],
"maxUrlsPerSource": 1000,
"urlFilter": "",
"mode": "list",
"maxConcurrency": 5
}

Example output

{
"source": "https://www.allbirds.com/sitemap.xml",
"sitemapUrl": "https://www.allbirds.com/sitemap_products_1.xml?from=1878194389061&to=7369944137808",
"url": "https://www.allbirds.com/products/mens-wool-runners-natural-white",
"lastmod": "2026-09-12T16:30:03.000Z",
"changefreq": "daily",
"priority": null,
"imageCount": 1,
"videoCount": 0,
"change": null,
"previousLastmod": null,
"error": null,
"scrapedAt": "2026-09-12T17:05:00.000Z"
}

A diff-mode row for an article CNN edited between two runs nine minutes apart (edition.cnn.com/sitemap/news.xml, 28 Nov 2026, 20:22 and 20:31 UTC):

{
"url": "https://www.cnn.com/2026/11/28/us/earthquake-california",
"lastmod": "2026-11-28T20:28:06.320Z",
"change": "updated",
"previousLastmod": "2026-11-28T20:12:28.450Z"
}

That second run found 1 new, 4 updated and 1 removed URL out of 167. With Only changed URLs on it output those 6 rows instead of 167, and the OUTPUT record kept the counts per source:

{
"results": 6,
"onlyChanges": true,
"sources": [{ "source": "https://edition.cnn.com/sitemap/news.xml", "new": 1, "updated": 4, "removed": 1, "unchanged": 162, "firstRun": false, "urlsInSitemap": 167, "truncated": false, "bulkLastmod": null }]
}

Input parameters

ParameterTypeDefaultDescription
sourcesarray["https://apify.com"]Sitemap URLs or bare domains; robots.txt discovery for domains
maxUrlsPerSourceinteger1000URL cap per source across all child sitemaps (1-200,000)
urlFilterstring""Optional regex; only matching URLs are kept
modestringlistlist = every URL, diff = new/updated/unchanged/removed since last run
diffStoreNamestringsitemap-monitorNamed key-value store holding the between-run URL snapshots
onlyChangesbooleanfalseDiff mode: output (and bill) only new, updated and removed URLs
maxConcurrencyinteger5Sitemap files downloaded in parallel (1-20)

Pricing

Sitemap URL Extractor & Change Monitor uses pay-per-event pricing: $0.0002 per URL row, i.e. $0.20 per 1,000 URLs, plus a negligible actor-start fee, platform usage included. A sitemap is one small HTTP request per file — the 1,591-URL apify.com page sitemap is a single 132 KB download — so compute stays in the cents even for 200,000-URL catalogues. Set Maximum cost per run and the Actor trims the result set to what the budget covers instead of overspending.

Limitations

  • Only URLs the site publishes are returned. Pages missing from every sitemap are invisible to this Actor.
  • lastmod, changefreq and priority are the site's own claims. They are often absent: on apify.com/sitemap/pages.xml the 1,591 URLs carry no <lastmod>, <changefreq> or <priority>, so those fields stay null.
  • A sitemap index is followed up to 500 child sitemaps. Very large catalogues are cut at Max URLs per source (up to 200,000 rows). A run that reaches its timeout stops early with OUTPUT.errorCode TIME_LIMIT (see Errors).
  • Pages that block robots or require a login can still appear in a sitemap; the Actor lists the URL but does not fetch the page.
  • Diff mode compares against the last run stored under the same Diff snapshot store name. The first run has nothing to compare with.
  • updated needs a <lastmod> in both runs. Sites without lastmod (for example apify.com and many Google News sitemaps) can only show new and removed. Snapshots saved by versions before 0.2 have no lastmods, so the first run after the upgrade cannot report updated yet.
  • Some sites stamp every URL with the time the sitemap was generated. On 28 Nov 2026 all allbirds.com product URLs shared one lastmod, and it moved forward every few minutes; all 3,971 stackoverflow.blog URLs share one value too. When at least 90% of a source's URLs (minimum 10) carry the same lastmod, URLs with that value are never labelled updated, and OUTPUT.sources[].bulkLastmod shows the value. Pages with their own later date are still reported.
  • A lastmod that moves backwards is ignored. On 28 Nov 2026 two reads of allbirds.com a few minutes apart returned 14:29:19 and then 14:23:53 for the same products, which points to a stale CDN copy rather than an edit. The snapshot keeps the newest value seen.

Sitemap URL Extractor & Change Monitor vs. alternatives

Measured on 19 Nov 2026 from the public Apify Store listings (30-day figures are the Store's own counters, not an independent audit). Only the Store's public numbers are used here; no rival was run.

ActorPricing model (Store, 19 Nov 2026)Users, last 30 daysFailed runs, last 30 daysSource
Sitemap URL Extractor & Change Monitor (this Actor)pay-per-event, $0.20 per 1,000 URLs10 of 28apify.com/webdatatools/sitemap-extractor
Sitemap Extractor (apify/sitemap-extractor)pay-per-event, tiered by plan5218 of 219 (8.2%)apify.com/apify/sitemap-extractor
Sitemap Extractor: Website to All URLs (boxbox10)free4024 of 831 (2.9%)apify.com/boxbox10/sitemap-extractor
Sitemap URL Extractor (onescales)pay-per-event, tiered by plan150 of 124apify.com/onescales/sitemap-url-extractor

Change monitoring, read from the ten strongest Store rivals' input schemas and READMEs on 28 Nov 2026 (documented, not run): gazidev/sitemap-url-extractor has onlyNew, which returns new URLs only. gazidev (lastmodSince) and pink_comic (modifiedSince) filter by a fixed date, which does not tell you which URLs changed since your last run. tanod suggests building a weekly comparison yourself in Make, Zapier or n8n. None of the ten reports removed URLs or URLs whose lastmod moved since the previous run.

Use this Actor when you want the URL inventory with a diff between runs. A page-level crawler (Screaming Frog, Crawlee, or a headless browser) is the right tool when you need the content of each page, because it fetches pages to find links instead of reading the published index. A curl | grep one-liner works for a single small sitemap, but it does not follow indexes, gzip or robots.txt discovery.

Run Sitemap URL Extractor & Change Monitor from JavaScript, Python and the command line

JavaScript (Node.js, apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('webdatatools/sitemap-extractor').call({
sources: ['https://apify.com'],
maxUrlsPerSource: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'URLs');

Python (apify-client):

from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("webdatatools/sitemap-extractor").call(run_input={
"sources": ["https://apify.com"],
"maxUrlsPerSource": 100,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(len(items), "URLs")

Command line (Apify CLI):

$apify call webdatatools/sitemap-extractor --input='{"sources":["https://apify.com"],"maxUrlsPerSource":100}'

Using Sitemap URL Extractor & Change Monitor with AI agents and MCP

Sitemap URL Extractor & Change Monitor is pay-per-event with limited permissions — the two requirements for an Actor to be callable through the Apify MCP server at mcp.apify.com. An agent passes sources and gets back a structured URL inventory it can use to decide what to read next, without writing a crawler. The same run works from n8n, Make, Zapier and LangChain through Apify's integrations; in diff mode a scheduled run plus a webhook gives you "alert me when this competitor publishes a new page".

FAQ

How does diff mode remember the previous run? Each source's URL set is stored in the named key-value store from Diff snapshot store name (default sitemap-monitor) under a key derived from a SHA-1 of the source string. Keep the store name identical across scheduled runs so they compare against each other. The first run has no snapshot, so every URL is reported as new; the second run of an unchanged site reports every URL as unchanged. A source that fails to fetch never overwrites its snapshot, so one transient error cannot report a whole site as removed.

What does updated mean? The URL was in the previous run too, and its <lastmod> is now later than the newest one seen before. previousLastmod holds that earlier value. A lastmod that moves backwards (a stale CDN copy) is not reported, and neither is a sitemap-wide generation stamp shared by 90% or more of the URLs.

How much does a daily change monitor cost? You pay per output row. Without Only changed URLs, every run pays for the whole sitemap: 1,000 URLs a day is about $0.20 a day on the Free plan. With it on, you pay only for new, updated and removed rows. A day with no changes pushes 0 rows and finishes SUCCEEDED, with the counts in OUTPUT. The first run of a new monitor has no snapshot, so every URL counts as new and is billed once.

Are .xml.gz sitemaps supported? Yes. Some servers send Content-Encoding: gzip and some send raw gzip bytes as binary/octet-stream — the Actor sniffs the gzip magic number instead of trusting the file extension, so both work.

What are the limitations? Only what the site publishes: pages missing from the sitemap are invisible here, and lastmod is the site's claim, not a verified fact. An index is followed up to 500 child sitemaps and 4 levels deep. Sitemaps behind an aggressive CDN bot wall can return HTML or 403; that source then produces no row and no charge; its reason is listed in the ERRORS record (OUTPUT.errorCode PARTIAL), and the run fails only when no source returned any URL.

Is this legal to run? Yes. robots.txt and sitemaps exist specifically to be read by automated clients, and no personal data is collected.

Can I export to CSV or Excel? Yes, from the Output tab or the API, with ready-made Overview and Changes (diff mode) views.

Errors and empty results

Every run writes an OUTPUT record with results and errorCode.

errorCodeSituationRun statusWhere the reason is
OKEvery source read completelySUCCEEDEDOUTPUT
TIME_LIMITThe run timeout was close, so the Actor stopped opening new sitemap files and saved the URLs read so farSUCCEEDED, read rows chargedstatus message, OUTPUT.timeLimitedSources
CHARGE_LIMITMaximum cost per run covers fewer rows than were found; the first rows (new/updated/removed first in diff mode) are savedSUCCEEDEDlog
PARTIALSome sources failed, others returned URLsSUCCEEDEDfailed sources listed in ERRORS
INVALID_INPUTEmpty or invalid input (no source, bad regex, bad store name)SUCCEEDED, no chargestatus message, OUTPUT.zeroResultReason, ERRORS
NO_RESULTSNo sitemap found / HTTP 404 for every source, or nothing matches urlFilterSUCCEEDED, no chargeOUTPUT.zeroResultReason, ERRORS
NO_CHANGESDiff mode with Only changed URLs and nothing changedSUCCEEDED, no chargeOUTPUT.zeroResultReason and per-source counts in OUTPUT.sources
SOURCE_FAILEDA source blocked (403, HTML instead of XML, network error) and no URLs from any sourceFAILEDstatus message, ERRORS

Short timeouts. The Actor reads the platform's run deadline and stops starting new sitemap downloads 90 s before it (or halfway through the remaining time on very short runs), so a run with a tight timeout still ends SUCCEEDED with the URLs it managed to read instead of being killed with nothing saved. The first level of every source (the sitemap or index you named) is always read. In diff mode a time-limited source reports no removed URLs, because unread child sitemaps are not proof of removal, and its snapshot keeps the unread URLs for the next full run.

Part of the webdatatools web-intelligence suite — every Actor is pay-per-event, reads public data without a login, and returns one clean row per entity:

Browse the whole suite at webdatatools, or call ten of these Actors straight from Claude, Cursor or Cline with the webdatatools MCP server.

Website & domain intelligence

Content for AI, LLMs and RAG

Search, video and social

Leads, jobs and company data

Developer, app and research data

Support and feedback

Hit a sitemap flavour it parses wrong, or want another extension counted? Open an issue on the Issues tab.

If this Actor saved you a crawl, a short review on its Apify Store page helps other users find it.