# Changelog of Sitemap URL Extractor & Change Monitor: New & Removed Pages (`datatoolsforall/website-sitemap-extractor`) Actor

- **URL**: https://apify.com/datatoolsforall/website-sitemap-extractor/changelog.md
- **Full Actor documentation**: https://apify.com/datatoolsforall/website-sitemap-extractor.md

## Changelog

### 2026-11-26 (documentation and pricing, no code change)

- README: new "Use with AI agents" and "Monitor a website's new and removed pages" sections, related Actors, and the detailed SUMMARY and billing rules moved to the FAQ.
- Input and output schema: shorter field descriptions with the cost of the defaults.
- Pricing: the Bronze, Silver and Gold discounts on the Page URL event are now live. No price was raised.

### 0.1 (2026-11-25)

First version.

- Sitemap discovery through robots.txt `Sitemap:` lines, with fallback to `/sitemap.xml`, `/sitemap_index.xml`, `/sitemap-index.xml` and `/wp-sitemap.xml`.
- Streaming parser for XML sitemaps, sitemap indexes (followed depth-first), `.xml.gz` files (detected by content, also when served without Content-Encoding), plain-text sitemaps and RSS/Atom feeds.
- Output per URL: lastmod, changefreq, priority, hreflang alternates, image and video counts, Google News title.
- Filters: include/exclude regular expressions, `lastmodAfter` (absolute or relative date), cap per website.
- Diff mode: new / unchanged / removed URLs compared with the previous run.
- Optional HTTP status check (HEAD, robots.txt respected) as a paid add-on.
- Pay-per-event pricing: `url-extracted`, `url-status-checked`.

Fixes from pre-release testing (same version, not yet published):

- Common sitemap locations are now also checked when every sitemap named in robots.txt fails (stale `Sitemap:` lines).
- A sitemap link from the input that does not work is a free `SITEMAP_NOT_FOUND` row; a site whose robots.txt disallows every common location is a free `ROBOTS_DISALLOWED` row. `NO_SITEMAP_FOUND` is charged only when a common location was actually requested, and its message says what was checked.
- Diff mode: URLs outside the current include/exclude filters are no longer reported as removed (or later as new) when filters change under the same `stateKey`. Removed rows count towards `maxUrlsPerSite`.
- `followSitemapIndexes` off: a free `INDEX_NOT_FOLLOWED` row and the child sitemap list in SUMMARY instead of an unexplained empty run.
- Sitemaps in ISO-8859-1 / Windows-1252 (XML declaration or Content-Type charset) are decoded correctly and reported under `encodingWarnings`.
- With `checkUrlStatus`, rows and status checks are sized together against the maximum cost per run.
- At most 2 parallel requests per host in total (was 2 for sitemaps plus 2 for status checks).
- The heap is capped at half of the run memory (Dockerfile start command).
- No more native abort at exit on Windows for very short local runs.
- A clear error when `startUrls` is a single text value instead of a list.

Fixes from the second test round (same version, not yet published):

- Diff mode: when a run stops at the maximum cost per run, only URLs whose rows were really saved are remembered, so the rest is reported as `new` next time (before, up to one batch of new URLs was silently remembered as seen).
- Website start URLs are reduced to their origin and merged per host (`http`/`https` count as one), with a warning, so one site is no longer extracted and charged once per page address.
- A sitemap index whose child sitemaps all fail, or sitemaps that list no URLs, now trigger the common-location probes and, if still empty, a free `CHILD_SITEMAPS_FAILED` / `SITEMAP_EMPTY` row instead of an unexplained empty "OK" result.
- The final status message reports removed URLs held back by `maxUrlsPerSite` and why removed-URL detection was off; the docs no longer promise they appear "in the next run".
- `lastmod` values without a time zone are kept as written (no `Z`) instead of being presented as UTC.
- Shorter Store title: "Sitemap Extractor: All URLs from sitemap.xml".

Fixes from the third test round (same version, not yet published):

- With `checkUrlStatus` on, large sitemaps were cut off part-way (e.g. 225 of 700 rows from apify.com/sitemap/pages.xml) while the run still said "Done" / `OK`. The download idle timeout (`requestTimeoutSecs`) kept running while rows were being status-checked; it now only counts time spent waiting for the server. Status checks and dataset writes now run alongside the download and parser, with at most 1,000 rows waiting at a time.
- A website whose sitemap download failed or was cut off part-way (timeout, network error, HTTP 5xx) now has `outcome: "PARTIAL"` in SUMMARY (`sitemapErrors` entries carry `interrupted: true` for files cut off mid-download), `totals.sitesPartial` counts them, and the final status message says the result is partial instead of a plain "Done".

Fixes from re-testing the third-round fix (same version, not yet published):

- With `checkUrlStatus` on, the billable `NO_SITEMAP_FOUND` row was status-checked (a HEAD request to the homepage) and charged a `url-status-checked` event. Only page URL rows are checked and charged now; notice rows with an `errorCode` and diff-mode `removed` rows are not.
- An XML sitemap that ends without its closing root tag (e.g. no `</urlset>`, because the server or the script generating it stopped part-way while the HTTP transfer still ended normally) is now a `TRUNCATED` entry in `sitemapErrors` with `interrupted: true`, so the website's outcome is `PARTIAL` and the status message says the result is partial. The URLs read before the cut are kept.

Fixes from re-testing the round-4 fix (same version, not yet published):

- A valid, complete, empty sitemap with a self-closing root (`<urlset xmlns="..."/>`) was reported as `TRUNCATED` and charged as a `NO_SITEMAP_FOUND` row. Completeness is now decided by following the document structure outside the entries, like an XML parser (the root element has to end: self-closing, or its end tag with any namespace prefix; comments, CDATA, processing instructions, the DOCTYPE, a BOM and trailing whitespace are skipped), instead of searching the text for `</urlset>`. Such sitemaps get the free `SITEMAP_EMPTY` notice again. A `</urlset>` inside a comment no longer counts as the end of the file, and `<URLSET>...</URLSET>` is no longer flagged.
- A sitemap download cut off (or not decodable, e.g. corrupt gzip) before its first entry was charged as `NO_SITEMAP_FOUND`, with a message saying no sitemap was found. It is now a free `FETCH_FAILED` row that names the failed file, the same as a download that times out at that point. `NO_SITEMAP_FOUND` is charged only when every file requested answered that there is no sitemap (HTTP error status or not a sitemap). When every start URL fails this way, the run-failed message now mentions cut-off downloads instead of saying the sites could not be reached.

Fixes from re-testing the round-5 fix (same version, not yet published):

- A sitemap cut off before its root element was recognised (only the XML declaration, a cut inside the declaration or an `<?xml-stylesheet ...?>` line, or a cut inside or right after the root name, e.g. `<?xml ...?>\n<urlset`) was read as "not a sitemap" and charged as a `NO_SITEMAP_FOUND` row saying no sitemap was found (or, entered directly, a `SITEMAP_NOT_FOUND` row saying "Check the link"). A response that ends while it is still in the XML prolog (declaration, processing instructions, comments, DOCTYPE) or inside its first start tag's name is now a `TRUNCATED` sitemap error with `interrupted: true`, so the website gets the free `FETCH_FAILED` row that names the file, the same as a cut one byte later. Unchanged: an empty body, and a response whose first element is complete and is not a sitemap root (an HTML page, `<br />` from a PHP error, `<error>`), are still "not a sitemap".

Fixes from re-testing the round-6 fix (same version, not yet published):

- With pay-per-event charging, 20-50% of page rows were silently lost when two websites were processed at the same time (e.g. 1,200 of 2,000 rows for apify.com pages.xml + make.wordpress.org/core, 20,200 of 40,000 for gov.uk + apify.com), while both websites reported `OK` and the status message counted the lost rows ("Done: 2200 rows"). In diff mode the lost URLs were remembered as seen, so the next run reported them as `unchanged` although they were never delivered. Cause: the number of rows stored per batch was read from the run-wide `url-extracted` counter, which also counted the other website's rows, and the inflated count made later batches skip real rows as "already stored before a migration". Now every dataset write and charge of the run goes through one run-wide lock, one batch at a time (sized, stored, charged, counted), so every row is stored once and charged once; at the maximum cost per run, concurrent websites never store a row unpaid. SUMMARY gains per-website `rowsExtracted`, `rowsStored`, `rowsCharged` and `statusChecksCharged`, and the row totals and status message are counted from what was actually stored.
- A sitemap whose generator crashed after the XML declaration (e.g. a PHP fatal error with HTTP 200) was billed as `NO_SITEMAP_FOUND` with "No sitemap was found", while the same crash with HTTP 500 was free. It is now a `GENERATOR_ERROR` sitemap error with the start of the error text (`PARTIAL` when other sitemaps were read), and a free `FETCH_FAILED` row naming the file when nothing else could be read. A sitemap named in robots.txt that answers HTTP 200 with an HTML page or an empty body is also a free `FETCH_FAILED` row naming the file instead of a billable `NO_SITEMAP_FOUND`. An HTML page or empty body at a common location (no working sitemap in robots.txt) is still billable `NO_SITEMAP_FOUND`.
- The generic `FETCH_FAILED` row ("could not be reached reliably") now names the failed file or says that robots.txt could not be read.
