Sitemap URL Extractor: Bulk Export with lastmod avatar

Sitemap URL Extractor: Bulk Export with lastmod

Pricing

from $0.50 / 1,000 result rows

Go to Apify Store
Sitemap URL Extractor: Bulk Export with lastmod

Sitemap URL Extractor: Bulk Export with lastmod

Sitemap URL extractor: get all URLs of a website from sitemap.xml, indexes, .gz, text and RSS sitemaps, with lastmod, changefreq and priority. CSV/JSON export.

Pricing

from $0.50 / 1,000 result rows

Rating

0.0

(0)

Developer

luc guerin

luc guerin

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 hours ago

Last modified

Features

Limited permissions

Share

Sitemap URL Extractor reads the sitemaps of up to 200 websites and returns every listed page as a clean row with lastmod, changefreq and priority. Use it as a sitemap crawler to get all URLs of a website, or to turn sitemap.xml into CSV, Excel or JSON. Enter a domain, a homepage or a sitemap URL. No login, API key or proxy is needed.

What it does

  • Finds the sitemap for you. It reads the Sitemap: lines in robots.txt. If there are none, it tries /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml and /wp-sitemap.xml.
  • Follows sitemap indexes to any depth. Each sitemap file is fetched only once, so loops (an index that lists itself) cannot cause endless fetching.
  • Reads every common format: XML urlset and sitemapindex, gzip files (.xml.gz, detected by content, not only by file extension), plain-text sitemaps (one URL per line), and RSS 2.0 / Atom feeds used as sitemaps.
  • Normalises the data. lastmod becomes ISO 8601 when it can be parsed (RSS pubDate too), priority becomes a number and changefreq becomes lower case.
  • Filters: keep only URLs that contain some text or match a regular expression, and/or only URLs changed on or after a given date.
  • Counts images (optional): imageCount gives the number of image:image entries in image sitemaps.
  • Removes duplicates within each site, even when the same URL appears in several sitemap files.
  • Export and integrations: download the results as CSV, JSON, Excel or XML, or read them through the Apify API, webhooks, Make, Zapier or an MCP client.

Use cases

  • SEO audits: list every indexable URL and spot stale pages by lastmod.
  • Content inventory and migrations: export all URLs of a website to a spreadsheet before a redesign or replatforming.
  • Change monitoring: schedule a daily run with Modified since to get only new or updated pages.
  • Crawler seeding: give a scraper or an AI ingestion pipeline a full list of URLs, for example only /blog/ or /docs/ pages.
  • Competitive research: compare how many pages competitors publish and how often they update them.

Input

FieldDescription
Websites or sitemap URLs (sites)1-200 entries: example.com, https://example.com or https://example.com/sitemap.xml (also .gz, .txt or a feed URL).
Max URLs per site (maxUrlsPerSite)Stops collecting a site after this many unique URLs. Default 1,000, maximum 100,000.
Max sitemap files per site (maxSitemapsPerSite)Limit on sitemap files fetched per site, indexes included. Default 200, maximum 2,000.
URL filter (urlFilter)Optional. Keeps only URLs that contain this text (case-sensitive).
Filter is a regular expression (filterIsRegex)Uses the URL filter as a Python regular expression (re.search).
Modified since (lastmodSince)Optional YYYY-MM-DD. Keeps only URLs with a lastmod on or after this date. URLs without a readable lastmod are dropped while this filter is on.
Count images (includeImages)Fills imageCount. When off, imageCount is null.
{
"sites": ["https://docs.python.org", "example.com", "https://example.org/sitemap_index.xml"],
"maxUrlsPerSite": 5000,
"urlFilter": "/blog/",
"lastmodSince": "2026-01-01",
"includeImages": false
}

Output example

Each URL is one dataset row:

{
"site": "docs.python.org",
"url": "https://docs.python.org/3.11/",
"lastmod": null,
"changefreq": "yearly",
"priority": null,
"sitemapUrl": "https://docs.python.org/sitemap.xml",
"imageCount": null
}

Fields: site (host without www.), url, lastmod (ISO 8601 when it can be parsed, otherwise the raw value, or null), changefreq, priority (0.0-1.0 or null), sitemapUrl (the file that listed the URL) and imageCount.

Run summary (not charged)

The run also saves a SUMMARY record in the default key-value store. For each site it lists sitemapsFound, sitemapsChecked, urlsFound (entries read before filters and de-duplication), urlsPushed, reachedMaxUrls and errors. A site without any sitemap does not create a dataset row, so it costs nothing. Instead, it appears in SUMMARY.sitesWithoutSitemap, its errors say "no sitemap found", and the run log shows a warning.

How much does it cost?

Pay per result: $0.50 per 1,000 URLs ($0.0005 per dataset row) plus $0.00005 per actor start. Only pushed URL rows are charged. Sites without a sitemap, filtered-out URLs and duplicates are free. Examples: 1,000 URLs cost about $0.50, and 10 sites with 200 URLs each (2,000 rows) cost about $1.00. You can also set a maximum cost per run in Apify; the actor stops cleanly when that limit is reached.

Data source & legality

The actor only reads files that website owners publish so that machines can read them: robots.txt, sitemaps and feeds. It does not crawl HTML pages, log in, solve captchas or use proxies. Sitemaps list public page addresses and normally contain no personal data. You are responsible for using the output in line with each website's terms of service and the laws that apply to you.

Limits

  • Each sitemap file is capped at 50 MB after decompression. The protocol maximum is 50 MB and 50,000 URLs per file. Larger files are skipped and noted in SUMMARY.
  • XML is parsed as a stream with a safe parser: DTD entity declarations and external entities are rejected, so XML bombs and XXE attacks do not work, and DTDs are never fetched over the network.
  • Each site fetches up to 3 sitemaps in parallel, and up to 2 sites are processed at the same time. There is a 30 s timeout per request, with retries on HTTP 429 / 5xx and on network errors.
  • De-duplication works within each site, not across sites.
  • Sitemaps served only to browsers (blocked by a bot wall or rendered with JavaScript) cannot be read.
  • If the sitemap has no lastmod, lastmod is null.

FAQ

Can I export sitemap.xml to CSV? Yes. Open the run's dataset and choose CSV or Excel, or use the dataset API URL with format=csv.

What happens when a site has no sitemap? No row is pushed and you are not charged. Check the SUMMARY record or the log to see which sites had none and which URLs were tried.

Can I schedule it? Yes. Create an Apify Schedule (for example, daily) and set Modified since to get recently changed pages.

Can I call it from my code? Yes. Use the Apify API or the Python/JavaScript clients. Integrations with Make, Zapier, n8n, Google Sheets and webhooks also work.

Can AI agents use it? Yes. Through the Apify MCP server, an agent (Claude, ChatGPT or another MCP client) can call this actor to get all URLs of a website before it reads the pages.

Why are there fewer URLs than the site has? The sitemap may be incomplete. You may also have hit Max URLs per site or Max sitemap files per site, or a filter may have removed URLs. urlsFound vs urlsPushed in SUMMARY shows where URLs were dropped.

Support

Found a bug or need a field? Open an issue in the Issues tab of this actor.