Sitemap URL Extractor - XML Sitemap to URL List avatar

Sitemap URL Extractor - XML Sitemap to URL List

Pricing

from $0.50 / 1,000 urls

Go to Apify Store
Sitemap URL Extractor - XML Sitemap to URL List

Sitemap URL Extractor - XML Sitemap to URL List

Every URL from a site's sitemaps: give a domain or a sitemap URL and get each URL with its last-modified date, change frequency, priority and image, video, news and hreflang data. Follows sitemap indexes, reads gzipped and plain-text sitemaps and RSS or Atom feeds.

Pricing

from $0.50 / 1,000 urls

Rating

0.0

(0)

Developer

Uszatki Ltd

Uszatki Ltd

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Features

Limited permissions

Share

Sitemap URL Extractor

Get every URL a site lists in its sitemaps. Give a domain or a sitemap URL; the Actor finds the sitemaps, follows sitemap indexes, and returns one item per URL with its last-modified date, change frequency, priority, the sitemap it came from, and any image, video, news or language data the sitemap carries.

It reads sitemap files over plain HTTP. It does not open the pages themselves, so a run with tens of thousands of URLs takes seconds to minutes.

What it does

  • Finds the sitemaps of a domain: the Sitemap: lines in robots.txt first, then /sitemap.xml and other usual paths.
  • Follows sitemap indexes, including indexes inside indexes, up to 5 levels below the start.
  • Reads every common format: XML sitemaps, gzipped sitemaps (.xml.gz), plain-text sitemaps (one URL per line), and RSS and Atom feeds used as sitemaps.
  • Keeps the extra data: image URLs, video details, news publication data and hreflang language versions, as compact fields.
  • Filters: URL patterns to include or exclude, and a "modified on or after" date.
  • Removes duplicates across sitemaps.
  • Reports what happened: every sitemap file read, how many URLs each gave, and every error, in a run summary.

Who it is for

  • SEO specialists checking what a site asks search engines to index, or comparing a sitemap with a crawl.
  • Developers who need a site's URL list as the input for another scraper, a monitor or a migration.
  • Content and data teams tracking what a site published or changed since a given date.

Input

Only startUrls is required.

FieldTypeDefaultWhat it does
startUrlsarray of stringsrequiredDomains or sitemap URLs. A domain or home page (example.com) means "find this site's sitemaps". Anything with a path (https://example.com/sitemap_index.xml) is read as a sitemap.
maxUrlsinteger10000The most URLs returned in one run. Hard limit: 1,000,000.
modifiedSincedatenoneReturn only URLs whose lastmod is on or after this date (2026-01-31, or a full ISO 8601 date and time).
includePatternsarray of regular expressionsnoneA URL is returned only if it matches at least one.
excludePatternsarray of regular expressionsnoneA URL is left out if it matches any.
deduplicatebooleantrueReturn each URL once, even when several sitemaps list it.
userAgentstringsee belowReplaces the default User-Agent.

Patterns are JavaScript regular expressions tested against the URL. Limits: at most 50 patterns per list, 500 characters per pattern. A pattern that backtracks heavily slows your own run, so keep patterns simple.

Input example

{
"startUrls": ["https://crawlee.dev/"],
"maxUrls": 100
}

Output

One dataset item per URL. These are real items from runs on 19 November 2026. The first is from the input above; the second is from a run on a site whose sitemap lists images.

{
"url": "https://crawlee.dev/blog",
"lastmod": null,
"changefreq": "weekly",
"priority": 0.5,
"sourceSitemap": "https://crawlee.dev/sitemap.xml",
"images": [],
"videos": [],
"news": null,
"alternates": []
}
{
"url": "https://yoast.com/december-2025-edition-the-seo-update-by-yoast/",
"lastmod": "2026-01-06T08:46:41+00:00",
"changefreq": null,
"priority": null,
"sourceSitemap": "https://yoast.com/post-sitemap.xml",
"images": ["https://yoast.com/app/uploads/2025/12/seo_recap_yoast_december_2025.jpeg"],
"videos": [],
"news": null,
"alternates": []
}

Every item has the same fields in the same order.

FieldMeaning
urlThe page URL: <loc> of a sitemap entry, the link of a feed item, or a line of a text sitemap.
lastmodThe last-modified date exactly as the sitemap gives it (a date, or a date and time). For RSS and Atom items, the item's date as ISO 8601. null when not given.
changefreqalways, hourly, daily, weekly, monthly, yearly or never, lower-cased. null when not given.
priority0.0 to 1.0. null when not given.
sourceSitemapThe sitemap file the URL was read from.
imagesImage URLs listed for the page (up to 100). Empty when there are none.
videosVideos listed for the page (up to 20), each with title, thumbnailUrl, contentUrl, playerUrl, durationSecs, publicationDate. Empty when there are none.
newsNews sitemap data: publicationName, language, publicationDate, title. null when there is none.
alternatesLanguage versions listed for the page (up to 100), each with hreflang and href. Empty when there are none.

Run summary

Each run also saves a summary under the key OUTPUT in the run's key-value store:

  • totals: sitemaps read and failed, addresses refused, URLs found and returned, duplicates removed, URLs left out by each filter (excludedByPattern, tooLongForPatterns, olderThanModifiedSince, withoutLastmod), invalid entries, and child sitemaps skipped;
  • startUrls: for each start entry, how its sitemaps were found (robots.txt, a usual path such as /sitemap.xml, or given), how many sitemaps and URLs it gave, and any error;
  • sitemaps: every sitemap file with its kind (urlset, sitemapindex, rss, atom, text), depth, parent, URLs found and returned, size, and error (up to 2,000 files listed);
  • errors: every file that could not be read and why;
  • refused: every address that was refused because it is not on the public web, with url, reason (for example loopback-address, resolves-to-loopback-address, or redirect to a refused address (…)) and refusedHop, the URL that was refused. Nothing is requested from a refused address and nothing is charged;
  • httpRequests, the requests actually handed to the network, and refusedBeforeRequest, the attempts refused before any connection was opened;
  • stoppedBy: max-urls, charge-limit, share-of-max-urls, max-sitemaps, or null when everything was read;
  • peakMemoryMb and charging.

For the example run it reported: 1 sitemap read, 101 URLs found before the run stopped at maxUrls, 100 returned, 2 HTTP requests, 0.9 seconds. A run on a documentation site with maxUrls 50,000 read one index and 9 gzipped sitemaps (446 kB downloaded) and returned 50,000 URLs in 10 seconds on a development machine.

Pricing

This Actor uses pay-per-event pricing. You pay for URLs returned, not for run time.

EventPriceWhen
URL returned (url-result)US$0.0005For each URL saved to the dataset.
Actor start (apify-actor-start)US$0.00005Once per run.

Examples: 100 URLs cost about US$0.05; 10,000 URLs about US$5.00; 50,000 URLs about US$25.00. The prices shown on the Actor's Pricing tab are the ones that apply.

URLs removed by your filters, duplicates, invalid entries and sitemap files that cannot be read are not charged.

You control the cost in two ways: maxUrls caps the number of URLs, and the run's maximum charge (set in the run options) is never exceeded. When the maximum charge is reached the Actor stops cleanly: you receive exactly the URLs you paid for, and the summary says the run stopped at the limit.

How it behaves on the sites it visits

  • Identifies itself. Default User-Agent: sitemap-url-extractor/0.1 (reads XML sitemaps; plain HTTP; honours robots.txt).
  • Obeys robots.txt. A sitemap file is not requested when the rules for sitemap-url-extractor or for * disallow its path. If robots.txt answers with a server error or cannot be reached, nothing on that site is requested. Only the first 500 KiB of a robots.txt, its first 5,000 rules and its first 1,000 Sitemap: lines are used.
  • Goes slowly. One file at a time, at least 0.3 seconds between requests to the same site.
  • Backs off. HTTP 429 and 5xx answers and network errors are retried twice with growing pauses; Retry-After is followed up to 30 seconds.
  • Public web only. Only http and https. Private, loopback and link-local addresses, internal host names (localhost, single-label names, .local, .internal and similar), URLs with credentials, and ports below 1024 other than 80 and 443 are refused. The check is repeated for every child sitemap an index names and for every redirect, and host names that resolve to an internal address are refused when the connection is made.

Limits

  • It lists what the sitemap says. URLs are not opened or checked. A URL in a sitemap may be gone, and a page that is not in any sitemap is not found.
  • lastmod is the site's own claim. modifiedSince trusts it. URLs without a readable lastmod are left out when modifiedSince is set. A child sitemap that its index marks as older than the date is not downloaded.
  • Several start entries share maxUrls. Each gets an equal share of what is left, so the first one cannot use it all; what one does not use goes to those after it. The summary shows each share. Run sites separately if you want a fixed number from each.
  • Sizes. At most 5,000 sitemap files per run, 5 levels of index below a start sitemap, 64 MB per file, both as sent and after decompression (the sitemap standard allows 50 MB). A larger file is read up to the limit and marked in the summary.
  • Entries. A URL longer than 4,096 characters is counted as invalid. Relative URLs are resolved against the sitemap's own address.
  • Very long URLs and patterns. When you set include or exclude patterns, a URL longer than 2,000 characters is not tested against them. It is left out, not charged, and counted in the summary as tooLongForPatterns. It is never let through untested. Without patterns, long URLs are returned as usual.
  • Text encoding. Files are read as UTF-8, which the sitemap standard requires.
  • A damaged file (for example a cut-off gzip) is reported as an error; URLs read before the damage are kept and charged.
  • Not a sitemap. If a start URL with a path serves an HTML page, it is reported as "not a sitemap". To have the Actor look for a site's sitemaps, give the bare domain.
  • Memory. A file is downloaded in its compressed form and then decompressed and read piece by piece; neither the decompressed file nor the list of URLs is held in memory. Duplicate removal keeps a short fingerprint of each returned URL, about 115 MB for a million URLs. The default of 512 MB is meant to cover the hard limit; if you lower the memory to 256 MB, keep maxUrls at a few hundred thousand or switch deduplicate off.

FAQ

Do I give a domain or a sitemap URL? Either. For a domain the Actor reads robots.txt and tries the usual paths. If you know the sitemap address, give it directly: it is faster and leaves no doubt.

Why did I get fewer URLs than the sitemap has? Look at totals in the OUTPUT record: duplicates, your filters, maxUrls, your maximum charge, or files that could not be read each have their own count.

Why did the run fail with "No sitemap could be read"? No file could be read as a sitemap: the address answered 404, served an HTML page, was disallowed by robots.txt, or was refused because it is not on the public web. The summary gives the reason for each file. Nothing was charged.

Does it handle a sitemap index with thousands of child sitemaps? Yes, up to 5,000 files per run. Use modifiedSince to skip child sitemaps the index marks as unchanged.

Can I get only new or changed URLs? Set modifiedSince to the date of your last run. This works as well as the site's lastmod values are kept up to date.

Can it read sitemaps behind a login? No. It sends no cookies and no credentials.

The site blocks the Actor (403 or 429). What can I do? If it is your site, allow the User-Agent, or set userAgent to one your firewall allows. This Actor does not use proxies and does not try to get around blocking.

Something looks wrong in a result. Open an issue on the Actor's Issues tab with the sitemap URL and the item.

Changelog

See the Changelog tab or ./CHANGELOG.md.