Sitemap Extractor (reliable) avatar

Sitemap Extractor (reliable)

Pricing

$0.30 / 1,000 url extracteds

Go to Apify Store
Sitemap Extractor (reliable)

Sitemap Extractor (reliable)

Get every URL a site publishes in its sitemaps: finds sitemaps via robots.txt, follows indexes, reads .gz and text sitemaps, filters by glob and lastmod. One bad sitemap never fails the run. $0.30 per 1,000 URLs.

Pricing

$0.30 / 1,000 url extracteds

Rating

0.0

(0)

Developer

Jordan Belfort

Jordan Belfort

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 days ago

Last modified

Share

Give it a domain or a sitemap URL and get every URL the site publishes in its sitemaps, with lastmod, changefreq, priority, hreflang alternates and image counts. One bad sitemap never fails the run: it's logged as an error row, it costs nothing, and the rest of the site still comes through.

Why this one

Apify's own sitemap extractor requests every URL to check its status, on 4 GB of memory. In the 30 days to 11 Oct 2026, 130 of its 411 public runs failed, aborted or timed out. This Actor reads the sitemaps only, unless you ask for status checks, so a typical run finishes in seconds on 256 MB.

What it does

  • Finds the sitemaps for you. Reads Sitemap: lines in robots.txt, then tries /sitemap.xml, /sitemap_index.xml, /sitemap.xml.gz and /wp-sitemap.xml.
  • Follows sitemap indexes to any depth, de-duplicates sitemaps and URLs.
  • Reads every format: XML urlsets, sitemap indexes, gzipped files (.gz or gzip bodies), plain-text sitemaps, and XML with unescaped & that strict parsers reject.
  • Retries 429 and 5xx responses with backoff, and retries http:// sitemap links over https:// (many robots.txt files still list the old scheme).
  • Filters by include/exclude globs and by lastmod date, so you only pay for what you keep.
  • Plain HTTP, no browser: fast and cheap. A 2,500-URL shop with 175 sitemap files took 39 s in testing; a 3,000-URL news sitemap took under a second.

Input

fieldmeaning
startUrlsDomains (https://example.com) or sitemap URLs (https://example.com/sitemap.xml)
includeGlobsKeep only URLs matching one of these, e.g. https://example.com/blog/*
excludeGlobsDrop URLs matching any of these, e.g. *.pdf
lastmodAfterISO date; keep only URLs modified after it
dropWithoutLastmodWith lastmodAfter: also drop URLs that have no lastmod
checkStatusAlso request each URL and add statusCode and finalUrl (off by default; about 10 URLs/s)
maxUrlsStop after this many URLs (default 1,000; 0 = no limit)
maxSitemapsSafety cap on sitemap files fetched (default 500)
{
"startUrls": [{ "url": "https://www.allbirds.com" }],
"includeGlobs": ["https://www.allbirds.com/products/*"],
"maxUrls": 5000
}

Output

One dataset row per URL:

{
"loc": "https://www.allbirds.com/products/womens-wool-runners-savanna-night-navy",
"lastmod": "2026-10-11T22:35:07-07:00",
"changefreq": "daily",
"priority": null,
"hreflang": [],
"imageCount": 1,
"sitemap": "https://www.allbirds.com/sitemap_products_1.xml?from=1878193471557&to=7369944137808",
"error": null
}

A sitemap that can't be fetched or parsed shows up as a row with loc empty and error set (for example fetch failed: HTTPStatusError: Client error '403 Forbidden'). Run statistics are in the key-value store under STATS.

Price

Pay per result: $0.30 per 1,000 URLs (charged per url event; the best-known alternative charges $0.50 on the free plan). Error rows are free. With the default maxUrls of 1,000, a run never costs more than $0.30 unless you raise the cap.

Uses

SEO audits and content inventories, finding pages changed since a date, seeding a crawler or a RAG pipeline with a site's real URL list, monitoring a competitor's new product pages. Works well as an MCP tool for agents: one call, a clean list of URLs.

Ready-made examples (open one, change the domain, run):

Use it from an agent (MCP)

Add this remote MCP server to Claude, Cursor, VS Code or any MCP client:

https://mcp.apify.com/?tools=jordan-belfort/sitemap-extractor-reliable

It exposes this Actor as a single tool. Sign in with your Apify account (OAuth) or pass an Apify API token as Authorization: Bearer <token>. Runs are billed to your account at the price above.

No Apify account? An agent with a USDC wallet on Base or Solana can buy a prepaid Apify token over x402 and call this Actor with it as the bearer token (Apify x402 docs). This Actor runs with limited permissions, so a prepaid token works:

POST https://api.apify.com/v2/acts/jordan-belfort~sitemap-extractor-reliable/run-sync-get-dataset-items

Run it on a schedule

To catch new or changed pages, schedule a weekly run with lastmodAfter set to last week. Send the rows to Google Sheets, Slack, Make, Zapier or n8n with Apify's integrations, or download the dataset as CSV, JSON or Excel.

FAQ

How do I find the sitemap of a website?

Pass just the domain. The Actor reads the Sitemap: lines in robots.txt and then tries /sitemap.xml, /sitemap_index.xml, /sitemap.xml.gz and /wp-sitemap.xml. Each output row says which sitemap it came from.

How do I extract all URLs from a sitemap and export them to CSV?

Run it with the domain or the sitemap URL; every URL becomes one dataset row with lastmod, changefreq, priority, hreflang links and image count. Export the dataset as CSV or Excel from the run page or the API.

Sitemap extraction or crawling: which do I need?

A sitemap lists what the site wants indexed, in seconds and for a fraction of a cent per URL. A crawler follows links, so it also finds pages missing from the sitemap, but takes minutes to hours. For an inventory, a migration or change monitoring, start with the sitemap; crawl only if you need orphan pages.

Turn on checkStatus and each URL gets its HTTP status and final URL after redirects, at about 10 URLs a second. For redirect chains hop by hop, use the Redirect Chain Checker.

Limits

  • Only reads what the site publishes in robots.txt and sitemaps; it does not crawl pages. A site with no sitemap returns one error row ("no sitemap found").
  • Some sites block non-browser clients at the CDN (in testing: theguardian.com). Those sitemaps come back as free error rows.
  • Respects the sitemap protocol cap of 50 MB per file.

Built and maintained by Jordan Belfort. Issues and feature requests: use the Issues tab, answered within a day.