Sitemap Extractor: XML Sitemap Scraper, URLs to CSV & Status avatar

Sitemap Extractor: XML Sitemap Scraper, URLs to CSV & Status

Pricing

from $0.28 / 1,000 sitemap urls

Go to Apify Store
Sitemap Extractor: XML Sitemap Scraper, URLs to CSV & Status

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

Actor Factory

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Features

Limited permissions

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_code of the first response (200, 301, 404, ...) and final_status_code after redirects
  • final_url, the full redirect_chain ([{url, status}] for every hop) and redirect_hops
  • response_ms, the time to the response headers
  • check_result: ok, redirect, broken, unverified or skipped, plus a simple is_broken flag and a check_error code 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

FieldDescription
urlPage URL listed in the sitemap
domainHostname of the URL
sitemap_urlThe sitemap file that listed this URL
lastmodLast-modified value from the sitemap, if present
changefreqChange frequency, if present
priorityPriority 0.0 to 1.0, if present
image_countNumber of images attached to the URL
video_countNumber of videos attached to the URL
hreflangAlternate language/region versions: [{hreflang, href}]
news_title, news_publication, news_publication_dateGoogle News sitemap data, if present
status_code, final_status_codeFirst and final HTTP status (only with Check HTTP status)
final_url, redirect_chain, redirect_hopsWhere redirects lead, every hop as {url, status}, and the hop count
response_msTime to response headers, summed over hops
check_result, is_broken, check_errorok / redirect / broken / unverified / skipped, a broken flag, and the error code when the check had no clean answer
scraped_atWhen the data was collected (ISO 8601)

How to extract all URLs from a sitemap

InputDescription
sitesDomains, page URLs or direct sitemap URLs, one per line
includePattern / excludePatternRegex filters on the URL (case-insensitive)
lastmodAfterKeep only URLs with lastmod on or after YYYY-MM-DD (URLs without lastmod are dropped)
dedupeOutput each URL once (default on)
maxUrlsPerSitePer-site cap
checkStatusBulk HTTP status and redirect check of every saved URL (default off)
maxUrlsToCheckOptional: status-check only the first N URLs; the rest are saved as plain rows
maxItemsTotal 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 lastmod to 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 when lastmodAfter is 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.txt for the SitemapExtractor token (or *). Disallowed URLs are not requested and come back as skipped; if robots.txt itself 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, 403 and 429 answers are reported as unverified, 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 ApifyClient
client = 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.

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.