Sitemap Scraper: Extract All URLs from XML Sitemaps avatar

Sitemap Scraper: Extract All URLs from XML Sitemaps

Pricing

from $0.35 / 1,000 sitemap urls

Go to Apify Store
Sitemap Scraper: Extract All URLs from XML Sitemaps

Sitemap Scraper: Extract All URLs from XML Sitemaps

Scrape every URL listed in a website's XML sitemaps, with lastmod, changefreq and priority. Finds sitemaps through robots.txt, follows sitemap indexes, reads .xml.gz and plain-text sitemaps, and filters by URL text or modification date. Pay only per URL.

Pricing

from $0.35 / 1,000 sitemap urls

Rating

0.0

(0)

Developer

Lowcountry Tech Solutions LLC

Lowcountry Tech Solutions LLC

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

37 minutes ago

Last modified

Features

Limited permissions

Share

Scrape any website's XML sitemaps into a clean list of URLs with their last-modified dates, in one run.

No login · No proxy needed · JSON, CSV, Excel or API · Tested daily

Sample output from the default input:

URLLastmodChangefreqPrioritySitemap URL
crawlee.dev/blog—weekly0.5crawlee.dev/sitemap.xml
crawlee.dev/blog/archive—weekly0.5crawlee.dev/sitemap.xml
crawlee.dev/blog/authors—weekly0.5crawlee.dev/sitemap.xml

What does Sitemap Scraper do?

Give it a website and it reads robots.txt to find the sitemaps the site declares, falling back to /sitemap.xml and /sitemap_index.xml. It follows sitemap indexes into their child sitemaps, decompresses .xml.gz files, reads plain-text sitemap.txt files, and returns one row per URL with lastmod, changefreq, priority, hreflang alternates and image count, plus the sitemap file it came from. You can also paste sitemap URLs directly. Filters keep only the URLs you care about, e.g. everything under /blog/ modified since last month.

  • Automatic discovery through robots.txt Sitemap: lines, with sensible fallbacks
  • Follows nested sitemap indexes, with limits on depth and file count
  • Reads gzip-compressed .xml.gz sitemaps and plain-text sitemaps
  • Filter by URL text (include and exclude) and by lastmod date
  • Duplicates across sitemaps are removed, so each URL is charged once

Who is it for?

  • SEO agencies building a full URL inventory before an audit or migration
  • Content teams listing every article changed since a date
  • Feeding URL lists into other actors (meta-tag checks, link checks, page-to-Markdown) instead of crawling
  • Competitive research: how many product, blog or docs pages a competitor publishes, and how often they change
  • Monitoring a site's sitemap for new or removed pages on a schedule

How much does it cost?

This actor uses pay-per-event pricing, so you pay only for what you get:

EventPrice
Sitemap URL (per URL)$0.0005 ($0.50 per 1,000)
Actor start (per run)$0.00005

Paid Apify plans get the Store's discount tiers on the URL price: $0.45 per 1,000 at Bronze, $0.40 at Silver, and $0.35 at Gold and above.

The default input returns up to 100 URLs, which costs about $0.05. Apify's free plan includes monthly credit that covers thousands of URLs. Set Maximum URLs or a maximum cost per run to cap spending.

How to use it

  1. Click Try for free.
  2. Enter one or more websites, or paste sitemap URLs directly.
  3. Optionally set URL filters or a Modified-after date, and raise Maximum URLs for big sites.
  4. Click Start and download the URLs as CSV, Excel or JSON.

Input

FieldTypeDescriptionDefault
startUrlsarrayA website (https://example.com or example.com) to discover its sitemaps through robots.txt, falling back to /sitemap.xml and /sitemap_index.xml. Or a direct sitemap URL (https://example.com/post-sitemap.xml, .xml.gz, or a plain-text sitemap.txt).["https://crawlee.dev"]
urlContainsarray of stringsKeep only URLs that contain any of these strings (case-insensitive), e.g. /blog/. Leave empty to keep all.[]
urlExcludesarray of stringsDrop URLs that contain any of these strings (case-insensitive), e.g. /tag/.[]
lastmodAfterstringKeep only URLs whose lastmod is on or after this date (YYYY-MM-DD). URLs without a lastmod are dropped when this is set. Leave empty to keep all.""
maxSitemapsintegerStop opening new sitemap files after this many per run (sitemap indexes count too). Hard limit 500.20
maxDepthintegerHow many levels of nested sitemap indexes to follow. 1 reads the sitemaps listed in the first index only.3
maxItemsintegerStop after this many URLs. You are charged per URL, so this also caps the cost of a run. Use 0 for no limit.100
proxyConfigurationobjectOptional. The target is a public page or API and normally works without a proxy.{"useApifyProxy":false}

Example input:

{
"startUrls": [
"https://crawlee.dev"
],
"urlContains": [],
"urlExcludes": [],
"lastmodAfter": "",
"maxSitemaps": 20,
"maxDepth": 3,
"maxItems": 100
}

Output

Each URL is one record in the dataset:

FieldTypeDescription
urlstringPage URL (the sitemap's
lastmodstring or nullLast modification date as published in the sitemap (W3C datetime).
changefreqstring or nullDeclared change frequency (always, hourly, daily, weekly, monthly, yearly, never).
prioritynumber or nullDeclared priority between 0.0 and 1.0.
alternatesarrayLanguage alternates from <xhtml:link rel="alternate" hreflang>: objects with lang and href.
imageCountintegerNumber of entries for this URL.
sitemapUrlstringThe sitemap file this URL was listed in.
sitestringOrigin of the website (scheme and host) the sitemap belongs to.
scrapedAtstringWhen this record was scraped (ISO 8601).

Sample:

[
{
"url": "https://crawlee.dev/blog",
"lastmod": null,
"changefreq": "weekly",
"priority": 0.5,
"alternates": [],
"imageCount": 0,
"sitemapUrl": "https://crawlee.dev/sitemap.xml",
"site": "https://crawlee.dev",
"scrapedAt": "2026-10-20T12:00:00.000Z"
},
{
"url": "https://crawlee.dev/blog/archive",
"lastmod": null,
"changefreq": "weekly",
"priority": 0.5,
"alternates": [],
"imageCount": 0,
"sitemapUrl": "https://crawlee.dev/sitemap.xml",
"site": "https://crawlee.dev",
"scrapedAt": "2026-10-20T12:00:00.000Z"
}
]

Limitations

  • Only URLs listed in sitemaps are returned; pages missing from the sitemap are not discovered.
  • Sitemaps disallowed by robots.txt for this actor are skipped.
  • lastmod, changefreq and priority are whatever the site publishes; many sites omit them or set them all to the same value.
  • Sites on the actor's denylist of platforms that forbid automated access are refused.

FAQ

How many URLs can it extract?

As many as the sitemaps list. A single sitemap file can hold 50,000 URLs, and the actor reads up to 500 sitemap files per run. Set Maximum URLs to the number you need; you pay only for URLs saved.

The site has no sitemap. What happens?

If robots.txt declares none and neither /sitemap.xml nor /sitemap_index.xml exists, the actor logs that and returns nothing for that site, and you are not charged for it.

Does it crawl pages to find URLs?

Sitemap Scraper does not crawl pages. It reads only robots.txt and the sitemap files, so it is fast and light on the website. URLs that are not in a sitemap are not found.

Is it legal to scrape this data?

Sitemap Scraper reads only publicly available, non-personal sitemap data from the robots.txt and sitemap files of the websites you list, without logging in and at a polite request rate. It respects robots.txt. You are responsible for how you use the results; check the target's terms and the laws that apply to you. If you are unsure, ask a lawyer.

Can I call it from my own code, Make, Zapier, n8n, or an AI agent?

Sitemap Scraper has an HTTP API, official JavaScript and Python clients, and integrations with Make, Zapier, n8n and LangChain. AI agents can run it as a tool through the Apify MCP server: add https://mcp.apify.com?tools=lowcountrytech/sitemap-urls-extractor to your MCP client and the actor becomes the tool lowcountrytech--sitemap-urls-extractor. Set maxTotalChargeUsd in the call options to cap what one run can cost.

Something broke or a field is missing. What now?

Open an issue on the Issues tab with the input you used. The actor is tested daily and repaired quickly when the source site changes.