Sitemap URL Extractor avatar

Sitemap URL Extractor

Pricing

$0.50 / 1,000 results

Go to Apify Store
Sitemap URL Extractor

Sitemap URL Extractor

Extract page URLs from a website's XML sitemaps with lastmod, changefreq, priority. Use when you need a site's full URL list, filtered by URL pattern or date.

Pricing

$0.50 / 1,000 results

Rating

0.0

(0)

Developer

Plain Pipe

Plain Pipe

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 days ago

Last modified

Features

Limited permissions

Share

Extract every page URL from a website's XML sitemaps, with lastmod, changefreq and priority. Finds sitemaps via robots.txt and follows sitemap indexes.

Use this when: you need the list of page URLs a website publishes in its sitemaps, optionally only the ones matching a URL pattern or a lastmod date range.

Why this one

  • $0.50 per 1,000 returned URLs; sitemap index entries, failed fetches and filtered-out URLs are free.
  • Filter by URL pattern and lastmod date — you pay only for the URLs you keep.
  • Each row carries lastmod, changefreq, priority and the exact sitemap file it came from; .xml.gz sitemaps and sitemap indexes are handled.
  • Plain HTTP requests only: no browser, no proxy. The prefilled input is run as an automated test daily.

What it does

Give it one or more websites. For each site it reads robots.txt to find the declared sitemaps, falls back to the usual locations (/sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /wp-sitemap.xml, /sitemap.xml.gz), follows sitemap index files down to the real URL lists, and unpacks .xml.gz sitemaps. You get one row per page URL with the lastmod, changefreq and priority the sitemap declares, plus the sitemap file it came from.

Use cases

  • Build a clean list of every page on a site before an SEO audit, a migration or a content inventory.
  • Find stale pages: set lastmodBefore (with requireLastmod) to get only URLs that have not been updated for years.
  • Track a public page inventory over time by running the Actor on a schedule and comparing the URL lists.
  • Feed the URL list into another tool, for example an on-page audit, an indexability check or your own crawler.
  • Check that a new section or a batch of new posts actually made it into the sitemap.

How to use it

  1. Add one or more websites to Websites, one per line (a full URL or just the domain, e.g. example.com).
  2. Optionally paste sitemap file URLs into Sitemap URLs to skip discovery.
  3. Set Max results to cap the number of URLs, and with it the cost.
  4. Run the Actor. Results land in the dataset; export them as JSON, CSV or Excel, or read them through the Apify API.

Input

FieldWhat it isDefaultExample
sites (required)Websites to read. Invalid entries are skipped with a log warning.none["example.com", "https://www.example.org"]
sitemapUrlsSitemap files to read directly (XML or .xml.gz), instead of discovery. Indexes are followed.empty (discover automatically)["https://example.com/post-sitemap.xml"]
includePatternsKeep only URLs matching at least one pattern. Plain text or regular expression, case-insensitive. An invalid regular expression fails the run with 0 results.empty (keep all)["/blog/"]
excludePatternsDrop URLs matching any pattern (plain text or regular expression, case-insensitive).empty["/tag/", "\\?page="]
lastmodAfterKeep only URLs with lastmod on or after this ISO date.none"2024-01-01"
lastmodBeforeKeep only URLs with lastmod before this ISO date (find stale pages).none"2023-01-01"
requireLastmodDrop URLs that have no lastmod. Without it, such URLs pass the date filters.falsetrue
maxItemsStop after this many returned page URLs in total (filtered-out URLs do not count).10005000

Example input:

{ "sites": ["https://apify.com"], "maxItems": 50 }

Only blog posts changed since 2024, skipping tag pages:

{ "sites": ["example.com"], "includePatterns": ["/blog/"], "excludePatterns": ["/tag/"], "lastmodAfter": "2024-01-01" }

Filtered-out URLs are not returned and not charged.

Output

One result per page URL found in a sitemap. Real rows from a run on https://apify.com:

[
{
"url": "https://apify.com/",
"lastmod": null,
"changefreq": null,
"priority": null,
"sitemap": "https://apify.com/sitemap/pages.xml",
"site": "https://apify.com"
},
{
"url": "https://apify.com/about",
"lastmod": null,
"changefreq": null,
"priority": null,
"sitemap": "https://apify.com/sitemap/pages.xml",
"site": "https://apify.com"
}
]
FieldMeaning
urlThe page URL listed in the sitemap (<loc>).
lastmodLast modification date as the sitemap states it, or null.
changefreqDeclared change frequency (daily, weekly, ...), or null.
priorityDeclared priority as a number from 0 to 1, or null.
sitemapThe sitemap file the URL was read from.
siteThe website from your input.

Fields a sitemap does not provide come back as null.

Pricing

Pay per result: $0.50 per 1,000 results ($0.0005 per result). You only pay for page URLs the Actor returns; sitemap index entries, failed fetches and URLs removed by your filters are free. Set a maximum total charge on the run to cap your spend.

Limits

  • Reads up to 200 sitemap files per site.
  • Only reads sitemaps; it does not crawl pages or follow links, so a page missing from the sitemap is missing from the output.
  • One request at a time per site with a short pause between requests, so very large sitemap trees take a few minutes.
  • If a site blocks automated requests or robots.txt disallows a sitemap path, that sitemap is skipped and noted in the log.
  • An invalid regular expression in includePatterns / excludePatterns, or an unreadable date, fails the run at once with 0 results and a message naming the bad value.
  • If no URL is found for any site (or every URL was filtered out), the run fails with zero results and a message that says what to check.

FAQ

How much does a run cost? $0.50 per 1,000 URLs returned. A site with 10,000 URLs in its sitemaps costs about $5. Use Max results to set a hard cap.

The run failed with "No page URLs found". What now? The site has no sitemap the Actor could find or read. Open https://<site>/robots.txt and https://<site>/sitemap.xml in a browser; if the sitemap lives somewhere else, paste its URL into Sitemap URLs.

Can I run it on a schedule or from my own code? Yes. Use Apify Schedules to run it daily or weekly, and the Apify API or integrations (webhooks, Zapier, Make, spreadsheet tools) to pull the dataset into your tools.

Need to check the pages you found? See Plain Pipe's SEO Page Audit & On-Page Checker for on-page tags, or Plain Pipe's Indexability Checker (noindex, robots.txt) to see which URLs search engines may index.

This Actor processes only public, non-personal technical data: the sitemap files a website publishes for search engines. It respects robots.txt, sends an honest user agent, does not log in anywhere, does not collect personal data, and does not bypass paywalls, CAPTCHAs or access controls. You are responsible for having the right to process the inputs you provide.

Support

Open an issue on the Issues tab. Issues are answered within 14 days.

Built and maintained by Plain Pipe.