Sitemap Extractor: XML Sitemap Scraper, URLs to CSV & Status
Pricing
from $0.28 / 1,000 sitemap urls
Sitemap Extractor: XML Sitemap Scraper, URLs to CSV & Status
Sitemap scraper that extracts every URL from any website's XML sitemaps to CSV, JSON or Excel: robots.txt discovery, sitemap indexes, .gz files, lastmod, hreflang, image and news data. Turn on the bulk HTTP status and redirect checker to flag broken and redirected URLs.
Pricing
from $0.28 / 1,000 sitemap urls
Rating
0.0
(0)
Developer
Actor Factory
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Features
Share
This sitemap extractor and scraper pulls every URL listed in a website's XML sitemaps in one run and exports sitemap to CSV, Excel or JSON. Give it domains (example.com) or direct sitemap URLs. It finds sitemaps through robots.txt Sitemap: lines and common paths (/sitemap.xml, /sitemap_index.xml, /wp-sitemap.xml, /sitemap.xml.gz, /sitemap.txt and more), follows sitemap indexes recursively, reads .xml.gz and plain-text sitemaps, and keeps the lastmod, changefreq, priority, image, video, hreflang and Google News data. Turn on Check HTTP status and it doubles as a bulk HTTP status and redirect checker for every URL in the sitemap. Use it for SEO URL inventories, site migrations, content audits, competitor research and crawler seed lists. No browser, no login, no proxy.
Bulk HTTP status & redirect checker
With checkStatus: true, every extracted URL is requested and its row gets the live answer:
status_codeof the first response (200, 301, 404, ...) andfinal_status_codeafter redirectsfinal_url, the fullredirect_chain([{url, status}]for every hop) andredirect_hopsresponse_ms, the time to the response headerscheck_result:ok,redirect,broken,unverifiedorskipped, plus a simpleis_brokenflag and acheck_errorcode when there was no clean answer
How it checks: a HEAD request first, confirmed with GET whenever a server answers HEAD with an error (many servers refuse HEAD). Redirects are followed one hop at a time, up to 10, with loop detection. Each site's robots.txt is obeyed, including for redirect targets, and Crawl-delay is honoured. Requests are paced per host (at most 2 at a time and about 6 per second), and the actor slows down on HTTP 429. Use maxUrlsToCheck to check only the first N URLs and save the rest as plain rows.
Typical uses: find sitemap URLs that 404 or redirect (both hurt crawl budget), verify a site migration's redirect map, and monitor a sitemap for broken pages on a schedule. Open the Status check view in the Output tab for a ready-made table.
What sitemap data you get
| Field | Description |
|---|---|
url | Page URL listed in the sitemap |
domain | Hostname of the URL |
sitemap_url | The sitemap file that listed this URL |
lastmod | Last-modified value from the sitemap, if present |
changefreq | Change frequency, if present |
priority | Priority 0.0 to 1.0, if present |
image_count | Number of images attached to the URL |
video_count | Number of videos attached to the URL |
hreflang | Alternate language/region versions: [{hreflang, href}] |
news_title, news_publication, news_publication_date | Google News sitemap data, if present |
status_code, final_status_code | First and final HTTP status (only with Check HTTP status) |
final_url, redirect_chain, redirect_hops | Where redirects lead, every hop as {url, status}, and the hop count |
response_ms | Time to response headers, summed over hops |
check_result, is_broken, check_error | ok / redirect / broken / unverified / skipped, a broken flag, and the error code when the check had no clean answer |
scraped_at | When the data was collected (ISO 8601) |
How to extract all URLs from a sitemap
| Input | Description |
|---|---|
sites | Domains, page URLs or direct sitemap URLs, one per line |
includePattern / excludePattern | Regex filters on the URL (case-insensitive) |
lastmodAfter | Keep only URLs with lastmod on or after YYYY-MM-DD (URLs without lastmod are dropped) |
dedupe | Output each URL once (default on) |
maxUrlsPerSite | Per-site cap |
checkStatus | Bulk HTTP status and redirect check of every saved URL (default off) |
maxUrlsToCheck | Optional: status-check only the first N URLs; the rest are saved as plain rows |
maxItems | Total cap across all sites. You are charged per URL saved |
{"sites": ["https://crawlee.dev", "https://www.example.com/sitemap.xml"],"includePattern": "/docs/","lastmodAfter": "2025-01-01","maxItems": 1000}
Output example
{"url": "https://www.nytimes.com/live/2026/11/14/us/example","domain": "www.nytimes.com","sitemap_url": "https://www.nytimes.com/sitemaps/new/news.xml.gz","lastmod": "2026-11-14T16:37:19Z","changefreq": null,"priority": null,"image_count": 1,"video_count": 0,"hreflang": [],"news_title": "Example headline","news_publication": "The New York Times","news_publication_date": "2026-11-14T10:45:54Z","scraped_at": "2026-11-14T16:39:11.742Z"}
With Check HTTP status on, each row also carries the check (example from crawler-test.com, a public test site for SEO crawlers):
{"url": "https://crawler-test.com/redirects/redirect_3_302","domain": "crawler-test.com","sitemap_url": "https://crawler-test.com/test_sitemap.xml","status_code": 302,"final_status_code": 200,"final_url": "https://crawler-test.com/redirects/redirect_target","redirect_chain": [{ "url": "https://crawler-test.com/redirects/redirect_3_302", "status": 302 },{ "url": "https://crawler-test.com/redirects/redirect_2", "status": 301 },{ "url": "https://crawler-test.com/redirects/redirect_1", "status": 301 }],"redirect_hops": 3,"response_ms": 109,"check_result": "redirect","is_broken": false,"check_error": null,"scraped_at": "2026-11-16T18:02:41.118Z"}
How much does it cost to extract sitemap URLs?
Pay per event: a tiny start fee plus $0.40 per 1,000 URLs saved. With Check HTTP status on, each checked URL is billed as $1.00 per 1,000 instead, covering the extra requests. URLs that are not requested (skipped by robots.txt, or beyond maxUrlsToCheck) stay at the plain URL price. Volume discounts apply on higher Apify plans. Example: 50,000 URLs from a large site costs about $20; the same with status checks about $50.
Use cases
- SEO URL inventory and sitemap vs. crawl comparisons
- Site migration planning: list every URL, then check status codes and redirects
- Content freshness: filter by
lastmodto find recently changed pages - Competitor research: see how many pages a site publishes and in which sections
- Seed lists for crawlers and scrapers
Limits & notes
- Only sitemaps the site publishes are read. Pages missing from the sitemap are not found; this is not a crawler.
- Many sites omit
lastmod; those URLs are dropped whenlastmodAfteris set. - Sites that block automated requests can return no sitemap. Pass the sitemap URL directly if discovery fails.
- Requests are paced per host (about 6 per second at most) and use one honest, fixed user agent (
SitemapExtractor/1.0). - The status check obeys
robots.txtfor theSitemapExtractortoken (or*). Disallowed URLs are not requested and come back asskipped; ifrobots.txtitself is unreachable (5xx or network error), the site's URLs are skipped too, as RFC 9309 requires. - Status checks are polite rather than fast: about 6 URLs per second per host, so 10,000 URLs from one site take roughly 30 minutes. The run stops taking new URLs shortly before its timeout and saves what it has.
401,403and429answers are reported asunverified, not broken: the page may work in a browser.
Integrations and API
Run it from your own code with the Apify API or the official Python and JavaScript clients:
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("actorfactory/sitemap-extractor").call(run_input={"sites": ["https://crawlee.dev"],"checkStatus": True, # bulk HTTP status and redirect check"maxUrlsToCheck": 500, # optional cap on checked URLs"maxItems": 500,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():if item.get("is_broken") or item.get("redirect_hops"):print(item["status_code"], item["url"], "->", item["final_url"])
- Schedule it (hourly, daily, weekly) in Apify Console and send results to Google Sheets, Slack, email or a webhook, or connect it to Make, Zapier or n8n.
- Use it from AI agents (Claude, ChatGPT, Cursor) through the Apify MCP server.
- Export results as JSON, CSV, Excel or HTML from the Output tab, or read them from the dataset API.
Related Actors
- SEO Site Audit Crawler & Broken Link Checker: full technical SEO crawl with broken links and an HTML report
- Bulk Lighthouse Audit: Lighthouse performance, accessibility, best-practices and SEO scores plus Core Web Vitals lab metrics for a URL list or sitemap
- App Store Scraper: App Store keyword rankings, app details and top charts
FAQ
Does it handle huge sites? Yes. Sitemaps are read one at a time and results are saved in batches, so memory stays small. Use maxUrlsPerSite or maxItems to cap cost.
What if a domain has no sitemap? The run still succeeds with a clear status message and no charge.
Are gzipped sitemaps supported? Yes, .xml.gz files and gzip bodies are detected automatically.
Can I use it as a bulk HTTP status or redirect checker? Yes. Turn on Check HTTP status: every URL from the sitemap gets its status code, final URL, full redirect chain, response time and a broken flag. Filter on check_result (broken, redirect) or use the Status check view to find sitemap URLs that 404 or redirect. To check a list of URLs that is not in a sitemap, use the SEO Site Audit Crawler & Broken Link Checker with Crawl links turned off.
Why is a URL unverified or skipped? unverified means the server gave no definitive answer: it refused access (401/403), rate-limited us (429), timed out or dropped the connection. skipped means the URL was not requested because the site's robots.txt disallows it (check_error says which). Skipped URLs are billed at the plain URL price.
Can I export the sitemap URLs to CSV or Excel? Yes. Download the dataset from the Output tab as CSV, Excel or JSON, or read it with the Apify API.