Sitemap URLs Extractor: Every URL, lastmod, Images, Hreflang
Pricing
$0.30 / 1,000 urls
Sitemap URLs Extractor: Every URL, lastmod, Images, Hreflang
Every URL from the sitemaps of many websites in one run. Finds sitemaps through robots.txt and the usual paths, follows indexes, reads XML, gzip, text and RSS/Atom. One row per URL with lastmod, changefreq, priority and source sitemap. Filters by pattern and date.
Pricing
$0.30 / 1,000 urls
Rating
0.0
(0)
Developer
Sebastian
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 hours ago
Last modified
Categories
Features
Share
What does Sitemap URLs Extractor do?
Give Sitemap URLs Extractor websites and get back every URL their sitemaps list, one row per URL,
with lastmod, changefreq, priority and the sitemap file it came from. It finds the sitemaps
itself (robots.txt, then the usual paths), follows sitemap indexes up to 5 levels deep, and reads XML, gzip, plain
text and RSS/Atom. Many sites in one run.
- Price: $0.30 per 1,000 URLs ($0.0003 per URL). You pay only for rows saved to the dataset; a site without a sitemap, a blocked site or a dead domain costs nothing.
- Many sites per run: up to 500 websites or sitemap addresses, read 4 at a time.
- Finds the sitemaps for you: or give the address of one sitemap or sitemap index to read only that.
- Filters: keep or skip URLs by text or regular expression, and keep only URLs modified on or after a date ("7 days" works too, for scheduled runs).
- Image, video, news and hreflang data on request, as lists on each row.
- Tolerant: gzip recognised by its content, not its name; broken XML still gives its URLs.
- Fast and light: plain HTTP, no browser; files are streamed, so a sitemap of any size fits in 512 MB. In a local test 97,334 URLs from 4 sites took 214 seconds (most of it writing rows to disk) with a memory peak of 179 MB.
Input example
{"sites": ["https://www.sitemaps.org", "yoast.com", "https://www.mkdocs.org/sitemap.xml.gz"],"maxUrlsPerSite": 5000,"includePatterns": ["/blog/", "\\.html$"],"excludePatterns": ["/tag/"],"modifiedAfter": "2026-01-01","includeExtensions": false}
| Field | What it does | Default |
|---|---|---|
sites | Websites (example.com, https://www.example.com) or direct sitemap addresses. An address is read as a sitemap when its path ends in .xml, .xml.gz or .txt, or contains sitemap. Up to 500. Required. | |
maxUrlsPerSite | Stop after this many saved URLs per entry of sites; no further sitemap files are fetched. 0 = no limit. | 10000 |
includePatterns | Keep a URL only if it matches at least one. Each pattern is text the URL must contain, or a regular expression. Case-sensitive. | none |
excludePatterns | Drop a URL if it matches any. Applied after includePatterns. | none |
modifiedAfter | Keep only URLs whose lastmod is on or after this: 2026-01-31, 2026-01-31T12:00:00Z, or an age such as 7 days, 2 weeks, 3 months. See "Dates" below. | none |
includeExtensions | Add images, videos, news and alternates (hreflang) to the rows whose sitemap entry has them. | false |
proxyConfiguration | Optional proxy. Usually not needed. | none |
Output example
A row, as saved from https://www.learnenough.com/sitemap.txt (which is gzipped XML despite its name):
{"url": "https://www.learnenough.com/blog","lastmod": "2024-02-22T02:01:21.000Z","changefreq": "weekly","priority": 0.8,"sitemapUrl": "https://www.learnenough.com/sitemap.txt","site": "https://www.learnenough.com/sitemap.txt"}
With includeExtensions on, from a Shopify store given as www.deathwishcoffee.com:
{"url": "https://www.deathwishcoffee.com/products/valhalla-java-single-serve-pods","lastmod": "2026-11-14T08:11:24.000Z","changefreq": "daily","priority": null,"sitemapUrl": "https://www.deathwishcoffee.com/sitemap_products_1.xml?from=171104582&to=15420124135479","site": "www.deathwishcoffee.com","images": [{"url": "https://cdn.shopify.com/s/files/1/0271/7209/files/Valhalla_Java_10ct_Angle_Vertical_Pods_A1_2.jpg?v=1733925456","title": "Valhalla Java Single-Serve Pods","caption": "Death Wish Coffee 10 Count Valhalla Java Single-Serve Pods."}]}
| Field | Meaning |
|---|---|
url | The page address as the sitemap gives it (XML entities decoded, relative addresses resolved). |
lastmod | A date (2026-01-31) when the sitemap gives no time, otherwise ISO 8601 in UTC. null when absent or unreadable. |
changefreq, priority | The sitemap's hints, null when absent. |
sitemapUrl | The sitemap file the URL was read from. |
site | The entry of sites it belongs to, as you typed it. |
images | url, title, caption. |
videos | title, description, thumbnailUrl, contentUrl, playerUrl, durationSeconds, publicationDate. |
news | title, publicationName, language, publicationDate. |
alternates | hreflang, href. |
The four lists appear only with includeExtensions, and only on rows that have them; empty fields
inside them are left out. Export the dataset as JSON, CSV or Excel, or read it through the Apify API.
How discovery works
For a website:
robots.txtis read and everySitemap:line is followed (they may point to another host).- If robots.txt names none (or none of those could be read), these addresses are tried in order
and the first that is a sitemap is used:
/sitemap.xml,/sitemap_index.xml,/sitemap-index.xml,/sitemap.txt,/wp-sitemap.xml. - Sitemap indexes are followed, index inside index up to 5 levels, each file once (so a sitemap that lists itself cannot loop), up to 5,000 sitemap files per site.
For a direct sitemap address only that file is read, plus the files it lists if it is an index.
What it reads: XML sitemaps and indexes with any namespace prefix, with or without an XML
declaration, a byte-order mark or CDATA; gzip files (recognised by their first bytes, so a
mislabelled .txt or .xml works, and so does a plain file named .gz); text sitemaps with one URL
per line; RSS and Atom feeds listed as sitemaps (the item link and its date). XML is not parsed
strictly: an entry with a missing closing tag, a bare &, junk before the declaration or a file cut
off in the middle still gives its URLs. A download that breaks off is restarted up to twice and
carries on where it stopped.
Each URL is saved once per site, the first time it is seen, even if several sitemaps list it.
Dates: lastmod and modifiedAfter
- A
lastmodwithout a time covers its whole day: withmodifiedAfter2026-01-31T12:00:00Z, a URL dated2026-01-31is kept. A time without a zone is read as UTC. - URLs without a
lastmodare dropped whenmodifiedAfteris set. The filter means "known to have changed since"; a URL with no date cannot show that. They are counted inurlsFilteredOut. - Child sitemaps that an index dates before
modifiedAfterare not fetched (counted insitemapFilesSkippedOld). This saves most of the requests on large sites, and relies on the site's index dates being right. Child sitemaps without a date in the index are always read. - An age (
7 days) is counted back from the start of the run; a month is 30 days, a year 365.
The run summary
The key-value store record SUMMARY has the totals, the peak memory, and one siteReport entry
per input:
{"input": "yoast.com","status": "ok","discovery": "robots","sitemapsFound": 1,"sitemapFilesRead": 22,"sitemapFilesFailed": 0,"sitemapFilesSkippedOld": 0,"sitemapFilesSkipped": 0,"urlsFound": 2646,"urlsSaved": 2524,"urlsFilteredOut": 0,"duplicates": 122,"entriesInvalid": 0}
discovery: how the sitemaps were found:robots,guess(one of the usual paths) ordirect.sitemapsFoundcounts the starting sitemaps;sitemapFilesReadcounts every file, indexes included.status:ok;partial(some sitemap files failed, the site started refusing requests, or the 5,000-file or 5-level limit was hit;failedFileslists failed files with reasons);no_sitemap;blocked(the site answers 401, 403 or 429);unreachable(no answer, for example a domain that does not exist);error. Amessagesays what happened in words.entriesInvalid: sitemap entries without a usable address.
Sites that give nothing are reported here and in the log, are not charged, and do not fail the run. The run fails only on invalid input, or when not a single site could be read.
Limits
- 500 sites per run; 5,000 sitemap files and 5 index levels per site; a single sitemap is read up to 300 MB uncompressed (the standard allows 50 MB).
- The filters do not cap the reading.
maxUrlsPerSitecounts saved URLs, so with narrow filters on a very large site the Actor may read many sitemap files to find them. - Only what the sitemaps list: pages a site leaves out of its sitemaps are not found, and no page is
opened.
lastmod,changefreqandpriorityare the site's own claims. - Polite by design: at most 2 sitemap files of a site at a time with a short pause between files,
retries with backoff, and after 3 refusals in a row (401, 403, 429) the site is left alone and
reported as
blocked. Sites behind a browser check (a "Just a moment..." page) are reported, not worked around; a proxy in the input sometimes helps. - Duplicates are detected with a 53-bit fingerprint of the URL instead of the URL itself, to keep memory flat on sites with millions of URLs. Two different URLs sharing a fingerprint is possible in theory (about 1 chance in 18,000 across a million URLs of one site); one of them would then be counted as a duplicate.
- Text encodings other than UTF-8 and UTF-16 are read as UTF-8; addresses are plain ASCII in practice, so this rarely matters.
- Spending limit: if you set a maximum charge for the run, the Actor stops when it is reached and keeps what it has saved.
- Only public sitemap files are read: no login, no personal data.
How to use Sitemap URLs Extractor
- Open the Input tab and paste websites (
example.com) or direct sitemap addresses, one per line. - Set Maximum URLs per site to cap the cost: each saved URL is charged.
- Optional: keep or skip URLs by pattern, or set Modified on or after to a date or an age such as
7 days. - Press Start, then open the Output tab: one row per URL with
lastmodand the sitemap it came from. - Download the rows as JSON, CSV, Excel or HTML, or read them through the API.
How much does Sitemap URLs Extractor cost?
$0.30 per 1,000 URLs, charged per URL saved to the dataset. The price includes the platform usage of the run: there is no separate charge for compute.
| Run | For example | Cost |
|---|---|---|
| 1,000 URLs | a small site | $0.30 |
| 10,000 URLs | the default cap for one site | $3.00 |
| 100,000 URLs | a large shop or publisher | $30.00 |
A site without a sitemap, a blocked site or a dead domain is reported in the run summary and not charged. URLs removed by your filters are not charged. To cap a run, set a maximum charge when you start it: the Actor stops there and keeps what it has saved.
API, schedules and integrations
Sitemap URLs Extractor runs like every Apify Actor: from the Console, through the Apify API and its JavaScript and
Python clients, on a schedule, from a webhook, from workflow tools such as Make, n8n and Zapier, and as a
tool for AI agents through the Apify MCP server. A daily schedule with modifiedAfter: "1 day" returns, and charges for, only the pages that are new or changed.
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('sebdata/sitemap-urls-extractor').call({ sites: ['https://www.sitemaps.org'], maxUrlsPerSite: 1000 });const { items } = await client.dataset(run.defaultDatasetId).listItems();
Related Actors
- ATS Jobs Scraper: jobs from Greenhouse, Lever, Ashby, Workable, Recruitee and SmartRecruiters in one schema.
- WHOIS Domain Lookup via RDAP: registration, expiry, registrar and nameservers for a list of domains.
- Contact Page Finder: contact page, contact form, social profiles and role addresses for a list of websites.
- Website Tech Stack Detector: the technologies a list of websites runs on, with the evidence for each.
Typical uses
A URL list for a crawler or scraper, content audits and migrations, finding new or recently changed
pages (schedule a run with modifiedAfter: "1 day"), following a competitor's new pages, checking a
site's own sitemaps for gaps and duplicates, hreflang and image-sitemap audits, feeding a site's
pages to an LLM or agent.
Who maintains this
This Actor is built and maintained by an AI agent (Anthropic's Claude), under a human account owner. Report a problem in the Issues tab: it is read and answered.