Sitemap URL Extractor - Nested, Gzip, lastmod & hreflang avatar

Sitemap URL Extractor - Nested, Gzip, lastmod & hreflang

Pricing

from $0.30 / 1,000 urls

Go to Apify Store
Sitemap URL Extractor - Nested, Gzip, lastmod & hreflang

Sitemap URL Extractor - Nested, Gzip, lastmod & hreflang

Get every URL a website publishes in its sitemaps: auto-discovery from robots.txt, nested sitemap indexes, .gz, text and RSS sitemaps. lastmod, changed-since filter, include/exclude patterns, hreflang alternates, image/video/news counts.

Pricing

from $0.30 / 1,000 urls

Rating

0.0

(0)

Developer

Zac Vincent

Zac Vincent

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: All URLs from XML Sitemaps (Nested, Gzip, lastmod & hreflang)

Get every URL a website publishes in its XML sitemaps, with lastmod, priority, hreflang alternates and image, video and news counts. Give a domain, and the Actor discovers the sitemaps itself. It's built for SEO audits, crawl seeding, content inventories and change monitoring. $0.50 per 1,000 URLs.

  • ✅ Auto-discovery: reads the Sitemap: lines in robots.txt, then tries common paths (/sitemap.xml, /sitemap_index.xml, /wp-sitemap.xml…)
  • ✅ Nested sitemap indexes of any depth, .xml.gz (gzip), plain-text sitemaps, and RSS/Atom feeds used as sitemaps
  • ✅ Changed-since filter: only URLs whose lastmod is newer than a date or window ("7 days"). Unchanged child sitemaps are skipped entirely, so monitoring runs stay fast and cheap
  • ✅ Include / exclude patterns: plain text, globs (*/blog/*) or /regex/
  • ✅ hreflang alternates, image and video counts, Google News title and publication date
  • ✅ Respects robots.txt; no browser or proxies; thousands of URLs per second
  • 💲 $0.50 per 1,000 URLs

What data does the sitemap extractor return?

FieldMeaning
site, urlThe site and one page URL from its sitemap
lastmod, lastmodIso, changefreq, prioritySitemap metadata (raw and normalized date)
alternates[]hreflang language/region versions ({hreflang, href})
imageCount, videoCount, newsTitle, newsPublishedAtImage, video and Google News sitemap extensions
sitemap, sitemapDepth, sitemapTypeWhich sitemap file listed it, how deeply nested, and its format

How to extract all URLs from a sitemap

  1. Add a domain (apify.com), any page URL, or a direct sitemap URL (…/sitemap.xml, .xml.gz, .txt) to Websites or sitemap URLs.
  2. Set Max URLs per site (default 10,000; use a small number to test).
  3. Optionally keep only recent pages with Only URLs changed since (7 days, 2026-01-31), or filter with Include / Exclude URL patterns.
  4. Click Start, then export the URL list or feed it into a crawler or audit Actor.

Input example

{
"startUrls": ["apify.com", "https://developer.mozilla.org/sitemaps/en-us/sitemap.xml.gz"],
"maxUrlsPerSite": 50000,
"changedSince": "30 days",
"includePatterns": ["*/blog/*"],
"excludePatterns": ["/\\?page=\\d+/"]
}

Output example (real run)

{
"site": "https://blog.apify.com",
"url": "https://blog.apify.com/",
"lastmod": "2026-11-22T13:49:59.293Z",
"lastmodIso": "2026-11-22T13:49:59.293Z",
"changefreq": null,
"priority": null,
"imageCount": 0,
"videoCount": 0,
"newsTitle": null,
"newsPublishedAt": null,
"sitemap": "https://blog.apify.com/sitemap-pages.xml",
"sitemapDepth": 1,
"sitemapType": "urlset",
"alternates": []
}

Sites with hreflang tags get alternates: [{"hreflang": "de", "href": "https://example.com/de/page"}, …].

Use cases

  • SEO audits: a full URL inventory, stale lastmod dates, missing hreflang pairs and sitemap coverage
  • Crawl seeding: feed the URL list into a crawler, the Bulk PageSpeed checker or your own scraper
  • Content and competitor monitoring: a daily run with changedSince: "1 day" shows new and updated pages
  • Site migrations: export every old URL to build redirect maps

Why use this Actor?

This ActorBasic sitemap parsersFull website crawlers
robots.txt + common-path discovery✅Often needs the sitemap URLN/A
Nested indexes, .gz, text, RSS✅PartialN/A
changedSince (skips unchanged child sitemaps)✅❌❌
hreflang, image, video, news fields✅RarelyPartial
Speed and costThousands of URLs/s, $0.50 per 1,000Similar priceMuch slower and pricier

Use it from AI agents (MCP) and code

MCP (Claude, Cursor, VS Code, ChatGPT and other MCP clients). Add this Actor as a single tool through Apify's hosted MCP server. You sign in with your Apify account on first use:

{
"mcpServers": {
"apify-sitemap-urls-extractor": {
"url": "https://mcp.apify.com?tools=ponderable_ironwork/sitemap-urls-extractor"
}
}
}

The tool appears as ponderable_ironwork--sitemap-urls-extractor. Try a prompt like: "List every blog URL in example.com's sitemap that changed in the last 30 days."

API (one call, results back as JSON). Replace <APIFY_TOKEN> with your token from Apify Console → Settings → API & Integrations:

curl -X POST "https://api.apify.com/v2/acts/ponderable_ironwork~sitemap-urls-extractor/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"startUrls": ["https://blog.apify.com"], "maxUrlsPerSite": 1000, "changedSince": "30 days"}'

The Apify JavaScript and Python clients, schedules, webhooks and the Make, n8n and Zapier integrations work too. Every run's dataset downloads as JSON, CSV, Excel or XML.

Pricing

$0.50 per 1,000 URLs saved (lower on higher Apify plans). Filtered-out URLs and sites without a sitemap cost nothing. A per-site SUMMARY (how the sitemaps were found, counts and warnings) is saved in the key-value store.

FAQ

What if the site has no sitemap? The SUMMARY says so ("No sitemap found…"), and nothing is charged for that site.

Does it crawl pages? No. It reads only the sitemap files a site publishes for crawlers, which is why it's fast and cheap. Pair it with a crawler if you need page content.

More data tools from this developer

Found a bug or need a field? Open an issue on the Issues tab. Fixes usually ship within days.