Sitemap URL Extractor avatar

Sitemap URL Extractor

Pricing

from $0.20 / 1,000 urls

Go to Apify Store
Sitemap URL Extractor

Sitemap URL Extractor

Discover and parse XML, gzip and text sitemaps from domains, websites or direct sitemap URLs. Outputs one clean dataset item per URL.

Pricing

from $0.20 / 1,000 urls

Rating

0.0

(0)

Developer

Deepak Ganesh

Deepak Ganesh

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 months ago

Last modified

Features

Limited permissions

Share

Sitemap URL Extractor

Paste domains, website URLs, or direct sitemap URLs and get a clean dataset of page URLs from their public sitemaps.

  • Discovers sitemaps automatically from robots.txt Sitemap: lines plus common paths such as /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /wp-sitemap.xml, and /sitemap.txt.
  • Recursively expands sitemap indexes with deduplication, loop protection, a depth limit, and a per-site cap.
  • Parses XML, .xml.gz, gzip-encoded responses, and plain-text sitemaps using XML mode parsing, including namespaced image, video, news, and hreflang extensions.
  • Outputs one dataset item per page URL with sitemap metadata. Per-site run details are saved to the key-value store record SUMMARY, keeping the dataset clean.

It only makes plain HTTP requests, uses gentle concurrency, and skips failed sites without charging for them.

Use cases

  • SEO audits: export every URL a site declares for crawling.
  • Content inventory: collect lastmod, priority and changefreq metadata for large websites.
  • Migration planning: compare sitemap URL lists before and after a relaunch.
  • Lead enrichment and monitoring: discover public pages from many domains at low cost.
  • AI agents and data pipelines: feed a clean URL list into crawlers, indexers or LLM workflows.

Input

FieldDefaultDescription
startUrls–Domains (example.com), site URLs (https://example.com), or direct sitemap URLs (https://example.com/sitemap.xml).
maxUrlsPerSite10000Maximum page URLs to output and charge for from each site.
includeImagesfalseInclude image sitemap extension URLs in images[].
urlFilter–Optional regex or glob include filter. Examples: **/blog/**, product, ^https://example.com/docs/.
excludeFilter–Optional regex or glob exclude filter applied after urlFilter.
maxConcurrency5Maximum sitemap fetches in parallel per site, capped at 20.
proxyConfigurationoffOptional Apify Proxy configuration. Most public sitemaps work without a proxy.
{
"startUrls": ["apify.com", "wordpress.org", "https://www.python.org/sitemap.xml"],
"maxUrlsPerSite": 200,
"includeImages": true
}

Output

One dataset item is produced per extracted page URL. Failed sites and sites with no usable sitemap are recorded in the SUMMARY key-value-store record instead of the dataset.

{
"url": "https://apify.com/",
"lastmod": null,
"changefreq": null,
"priority": null,
"alternates": [],
"sourceSitemap": "https://apify.com/sitemap/pages.xml",
"site": "https://apify.com",
"domain": "apify.com"
}

When includeImages is enabled and image sitemap entries are present, images contains absolute image URLs. Hreflang links are returned as:

"alternates": [{ "hreflang": "fr", "href": "https://example.com/fr/page" }]

The SUMMARY record includes totals and per-site diagnostics:

{
"totals": { "sites": 4, "sitemapsDiscovered": 211, "sitemapsFetched": 41, "urlsExtracted": 400, "urlsPushed": 400, "errors": 15 },
"sites": [
{ "input": "apify.com", "domain": "apify.com", "sitemapsDiscovered": 21, "urlsPushed": 200, "limitReached": true, "errors": ["https://apify.com/wp-sitemap.xml: HTTP 404"] }
]
}

(Examples trimmed from a real local run.)

Pricing

Pay per event: you pay only for URL items pushed to the dataset.

EventPriceWhen
URL extracted$0.0002 ($0.20 per 1,000 URLs)Charged for each page URL successfully pushed to the dataset.

Sites with no sitemap, DNS errors, HTTP errors, malformed XML, filtered URLs and duplicate URLs are free. The Actor respects your maximum cost per run and stops cleanly when the charge limit is reached. Platform usage is included in the event price.

FAQ

Does it crawl pages? No. It fetches sitemap and robots.txt files only. This keeps runs fast, cheap and gentle.

Can I pass a direct sitemap URL? Yes. Direct .xml, .xml.gz, .txt, or sitemap-like URLs are parsed directly.

Are sitemap indexes supported? Yes. The Actor recursively follows indexes with a depth limit, deduplication and loop protection.

What happens when a site has no sitemap? The site is logged in SUMMARY with errors and zero pushed URLs. You are not charged.

Does it parse image/video/news sitemap extensions? Yes. Namespaced sitemap XML is parsed safely. Image URLs can be included with includeImages; hreflang alternates are always returned. Video and news extension elements are tolerated without breaking parsing.

Is this legal? The Actor reads public sitemap files and robots.txt over HTTP. You are responsible for using the data in compliance with applicable laws and website terms.

Changelog

  • 0.1: Initial release. Discovers robots.txt and common sitemaps, expands sitemap indexes, supports XML/gzip/text sitemaps, extracts URL metadata, images and hreflang alternates, and stores per-site summaries in SUMMARY.