Sitemap URL Extractor - All URLs of Any Website avatar

Sitemap URL Extractor - All URLs of Any Website

Pricing

from $0.25 / 1,000 url extracteds

Go to Apify Store
Sitemap URL Extractor - All URLs of Any Website

Sitemap URL Extractor - All URLs of Any Website

Extract every URL from any website's sitemaps. Finds sitemaps via robots.txt and common paths, follows sitemap indexes, reads .xml.gz, image/video/news/hreflang extensions, filters by regex and lastmod, optional HTTP status check. Streams millions of URLs cheaply.

Pricing

from $0.25 / 1,000 url extracteds

Rating

0.0

(0)

Developer

Sharkinho Tools

Sharkinho Tools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Sitemap URL Extractor: get every URL of a website from its sitemaps

Give it a list of domains or sitemap URLs and get back every page URL the site publishes in its XML sitemaps, with lastmod, changefreq, priority, image, video, news and hreflang data. It finds the sitemaps for you, follows sitemap indexes of any depth, reads .xml.gz files, and streams huge sitemaps (millions of URLs) without running out of memory.

It only uses plain HTTP requests (no browser), so it is fast and cheap: $0.25 per 1,000 URLs.

What it does

  • Auto-discovery. For a domain it reads the Sitemap: lines in robots.txt. If there are none, it tries common locations: /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /wp-sitemap.xml (WordPress), /sitemap.xml.gz, /sitemap.txt, /sitemaps.xml, and the usual news, image and video sitemap paths. Soft-404 HTML pages are ignored.
  • Sitemap indexes are followed recursively (configurable depth), and every child sitemap is opened only once.
  • Gzip. .xml.gz files are detected by their content, so they work whether or not the server sets Content-Encoding.
  • All formats. Standard <urlset>, <sitemapindex>, plain-text sitemaps (one URL per line), RSS 2.0 and Atom feeds.
  • Sitemap extensions. Google image (image:image), video (video:video), news (news:news) and hreflang alternates (xhtml:link) are extracted when present.
  • Streaming parser. Sitemaps are parsed while they download, so a 50 MB sitemap with 50,000 URLs, or an index with thousands of them, uses about the same memory as a small one.
  • Lenient. Unescaped &, odd namespace prefixes (ns0:url), BOMs and truncated files don't stop it. You get every entry it can read.
  • Filters. Include / exclude URL regex patterns, lastmod modified after / before (absolute dates or relative like 30 days), max URLs per site.
  • De-duplication. A URL that appears in several sitemaps is returned once per site.
  • Optional status check. A HEAD request per URL adds statusCode and redirectUrl, so you can find 404s, redirects and blocked pages listed in the sitemap. It falls back to GET when HEAD isn't allowed.
  • Reliable. Retries with exponential backoff on 429 / 5xx / timeouts, resumes an interrupted download without duplicating URLs, and one broken site or sitemap never fails the whole run. A per-site summary tells you what was found and what went wrong.

Use cases

  • SEO audits: list every indexable URL, find pages that are in the sitemap but return 404 or redirect, check lastmod freshness, count images and hreflang alternates.
  • URL feeder for AI agents, RAG and crawlers: get a clean list of a site's pages (optionally only /docs/ or /blog/, or only pages changed in the last 7 days) and pass it to a content crawler.
  • Content monitoring: schedule a daily run with modifiedAfter: "1 day" to get only new or updated pages, for example competitor blogs or news sites.
  • Site migrations: export the full URL inventory before and after a migration and compare.

Input example

{
"sites": ["example.com", "https://www.example.org/sitemap_index.xml"],
"maxUrlsPerSite": 0,
"includeUrlPatterns": ["/blog/"],
"excludeUrlPatterns": ["/tag/", "/page/\\d+"],
"modifiedAfter": "30 days",
"checkStatus": false
}
FieldDescription
sitesDomains, homepages, or direct sitemap URLs (.xml, .xml.gz, .txt, RSS/Atom).
discoveryModerobots-then-common (default), robots-and-common, robots-only, common-only.
followSitemapIndexes / maxIndexDepthFollow nested sitemap indexes (default on, depth 5).
maxUrlsPerSiteStop after N URLs per site (after filters). 0 = no limit.
maxSitemapsPerSiteSafety cap on sitemap files opened per site. 0 = no limit.
includeUrlPatterns / excludeUrlPatternsCase-insensitive regular expressions.
modifiedAfter / modifiedBeforeFilter on <lastmod>: 2024-05-01 or 30 days, 2 weeks, 6 months, 1 year.
keepUrlsWithoutLastmodKeep URLs without <lastmod> when a date filter is set (default off).
deduplicateOne record per URL per site (default on).
checkStatus / statusConcurrencyHEAD-check every URL (separate charge).
includeSiteSummariesAlso add one free summary row per site to the dataset.
maxConcurrencySites processed in parallel (default 5).
proxyConfigurationOff by default. Turn on Apify Proxy only if a site blocks you.

Output example

One record per URL. Every record has the same fields; the ones that don't apply are null or empty.

{
"url": "https://www.example.com/news/big-story",
"domain": "www.example.com",
"site": "https://example.com",
"sitemapUrl": "https://www.example.com/sitemaps/news.xml.gz",
"lastmod": "2024-11-22T00:00:33.000Z",
"changefreq": null,
"priority": null,
"imageCount": 1,
"imageUrls": ["https://cdn.example.com/big-story.jpg"],
"imageTitle": null,
"videoCount": 0,
"videoTitle": null,
"videoDescription": null,
"videoThumbnailUrl": null,
"videoContentUrl": null,
"videoPlayerUrl": null,
"videoDuration": null,
"videoPublicationDate": null,
"newsTitle": "The big story",
"newsPublicationName": "Example News",
"newsLanguage": "en",
"newsPublicationDate": "2024-11-22T00:00:32.000Z",
"newsKeywords": null,
"alternateCount": 0,
"alternates": [],
"statusCode": 200,
"redirectUrl": null,
"statusError": null,
"scrapedAt": "2024-11-22T00:01:55.978Z"
}

lastmod and other dates are normalized to ISO 8601 when they can be parsed. Otherwise the original text is kept. alternates is a list of { "hreflang": "de", "href": "..." }.

Per-site summary

The key-value store record OUTPUT holds one summary per site: how it was discovered (robots.txt, common-paths, input), the number of sitemaps and sitemap indexes found, failed sitemaps, URLs seen, filtered out, duplicates, total URLs returned, why it stopped (max-urls-per-site, max-cost-reached), and readable error messages such as "No sitemap found" or "returned HTTP 403". Turn on includeSiteSummaries to get the same rows in the dataset (recordType: "site-summary", not charged).

Pricing

Pay per event, no subscription:

EventPrice
URL extracted (one dataset record)$0.00025 ($0.25 per 1,000 URLs)
URL status checked (only with checkStatus)$0.0003 ($0.30 per 1,000 URLs)

Site summaries are free. Platform compute is very small because the actor uses plain HTTP and a streaming parser, and it runs in 256 MB of memory by default. Set Max cost per run in the run options to cap spending: the actor stops cleanly when the limit is reached and keeps everything extracted so far.

FAQ

Do I need to know where the sitemap is? No. Just enter the domain. A URL with a normal page path (like example.com/blog) is treated as its domain; to read one specific sitemap, enter the sitemap file URL. If the sitemap is somewhere unusual and not listed in robots.txt, paste its URL directly.

Does it crawl the website? No. It only reads sitemaps (and robots.txt). Pages that aren't in any sitemap won't be returned. If you need those, use a crawler.

How many URLs can it handle? Millions. Sitemaps are streamed and de-duplication uses a compact hash set. In our test, 200,000 URLs from nytimes.com took about 3.5 minutes and peaked at 180 MB of memory with the default 256 MB. For sites with more than about 1M URLs, give the run 1 GB of memory, or turn off deduplicate.

Why did a site return 0 URLs? Look at the summary in OUTPUT. Common causes: the site has no sitemap, the sitemap is blocked (HTTP 403, so try enabling the proxy), or your filters removed everything.

What does the status check do? One HEAD request per URL, with redirects not followed. statusCode is the first response (for example 301), and redirectUrl is where it points. This is great for finding broken or redirected URLs in your sitemap. It is slower than extraction alone, and some sites rate-limit it, so lower statusConcurrency if you see many 429s.

Can I get only new pages? Yes. Use modifiedAfter (for example "1 day") on a schedule. This relies on the site providing accurate <lastmod> values.

Is the data personal? No. Sitemaps are public files that site owners publish for search engines. The actor doesn't collect any personal data.

Limits

  • Only URLs listed in sitemaps or feeds are returned. This isn't a full crawler.
  • lastmod filtering depends on the site's own <lastmod> values, which some sites omit or set to the crawl time.
  • Sitemaps behind a login, or behind strong bot protection that blocks even a proxy, can't be read.
  • A single sitemap file is capped at 500 MB uncompressed (the protocol limit is 50 MB).