Sitemap Change Monitor
Under maintenancePricing
from $10.00 / 1,000 change rows
Sitemap Change Monitor
Under maintenanceWatches public sitemaps for changes: compares URL sets and lastmod values against the previous snapshot and emits one dataset record per added, removed, or changed URL. Built for SEO operators and site owners.
Pricing
from $10.00 / 1,000 change rows
Rating
0.0
(0)
Developer
Jason Ramirez
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 hours ago
Last modified
Categories
Features
Share
An Apify Actor for SEO operators and site owners watching their own or client public sitemaps. It compares URL sets and sitemap lastmod values, emitting one machine-readable dataset record per detected change.
Input
{"sitemaps": ["https://example.com/sitemap.xml"],"maxUrlsPerSitemap": 5000,"includeUnchangedSummary": true}
The positive integer cap applies to all page entries across the children of each supplied sitemap. Child requests are also bounded by that cap. An exceeded cap fails the sitemap and preserves its snapshot, avoiding false removals. Requests run sequentially, with a 30 second timeout each. Sitemap indexes are followed one level deep; deeper indexes fail. Duplicate input sitemaps are processed once.
Baseline rule
The first successful run saves a baseline and emits exactly one baseline item with a URL count. It does not emit thousands of added rows. Subsequent successful runs emit added, removed, and lastmod-changed rows. A successful run with no changes emits one no-changes status item per sitemap, so the output is never empty and you can prove the check ran (set includeUnchangedSummary to false to skip it). Baseline and no-changes status items are free: you only pay for added, removed, and lastmod-changed rows. A failed fetch or parse preserves the old snapshot.
Dataset output
| Type | Fields |
|---|---|
| baseline | type, sitemap, urlCount, seenAt |
| no-changes | type, sitemap, urlCount, seenAt |
| added | type, sitemap, url, lastmod, seenAt |
| removed | type, sitemap, url, lastmod, previousSeenAt, seenAt |
| lastmod-changed | type, sitemap, url, previousLastmod, lastmod, previousSeenAt, seenAt |
Dates in seenAt are monitor timestamps. lastmod values are strings from the sitemap, or null. Removed records retain the previous lastmod. The sitemap field identifies the supplied top-level source.
Snapshots use SHA-256-derived keys in the default key-value store: { fetchedAt, entries: { url: lastmodOrNull } }. LAST_RUN_SUMMARY is stored and logged with runAt, sitemapsRequested, sitemapsOk, sitemapsFailed, baselinesCreated, added, removed, lastmodChanged, skippedPrivateUrls, and sitemapTotals. Each successful sitemap total includes URL count, baseline status, and change counts. Setting includeUnchangedSummary to false omits unchanged sitemap totals, while retaining aggregate counts. Failure errors are deliberately sanitized to avoid echoing response content or sensitive URL parameters.
Privacy and limits
Use only public page URLs without personal data. Obvious query keys containing token, session, auth, password, secret, API key, signature, or credential are skipped. Credentials in URLs, literal IP hosts, localhost and .local hosts, and non-HTTP schemes are excluded. This heuristic is not a personal-data detector or a DNS-based network access control. Operators must supply public sitemaps and avoid personal data in paths or other query fields. skippedPrivateUrls counts excluded page and child sitemap URLs on successful sitemap fetches; failures do not report partial skip counts. Unsafe input sitemap URLs are redacted in failure summaries.
Polling only detects changes visible when the Actor runs. lastmod is whatever the sitemap claims, without validation of page contents. Duplicate page URLs collapse into one entry, with the final lastmod winning. The parser supports a strict sitemap XML subset, namespaces, XML entities, and CDATA. It rejects DTDs, external entities, malformed documents and HTML responses. Node fetch handles HTTP gzip content encoding; standalone .gz files without that encoding are unsupported. Redirects are rejected. Responses are read into memory before page-cap validation, so the cap is not a byte limit.
Dataset writes precede snapshot writes. An interrupted run can repeat changes on retry; delivery is not transactional or exactly once. Persistent monitoring requires the same underlying key-value store across runs. If the platform assigns a fresh default store each run, arrange reuse of the prior store or copy its snapshots before the next run. Charging configuration, scheduling, publishing and persistent-store orchestration are owner tasks outside this local build. No pricing is configured.
Local run
Use Node.js 20 or later. Install dependencies with npm install when registry access is available. Put input in storage/key_value_stores/default/INPUT.json, then run npm start. Reuse that storage directory for comparisons. Run npm test for the offline test suite; it uses built-in Node modules and injected fetch fixtures and needs no installed SDK.
The repository also retains pre-existing Next.js source and configuration. The root package scripts now target this Actor.