Sitemap URL Extractor - All URLs from Any Website avatar

Sitemap URL Extractor - All URLs from Any Website

Pricing

from $0.12 / 1,000 urls extracted

Go to Apify Store
Sitemap URL Extractor - All URLs from Any Website

Sitemap URL Extractor - All URLs from Any Website

Extract all page URLs from any website's sitemap.xml: finds sitemaps via robots.txt, follows sitemap indexes and .gz files, filters by path and lastmod, and can check status codes. Clean JSON, CSV or TXT for AI agents, crawlers, n8n and SEO audits. Pay per URL.

Pricing

from $0.12 / 1,000 urls extracted

Rating

0.0

(0)

Developer

mcpkit

mcpkit

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

15 minutes ago

Last modified

Categories

Features

Limited permissions

Share

What is Sitemap URL Extractor

Sitemap URL Extractor gets all page URLs from any website's sitemap in one run. Pass a domain like example.com or a sitemap URL. The Actor finds the sitemaps in robots.txt and at standard paths, follows sitemap indexes, unpacks .gz files, filters the URLs by path and lastmod date and returns clean JSON, CSV or TXT. It can also check the HTTP status of every URL, so you can find broken (404) and redirected pages.

It reads sitemaps only and does not crawl or render pages, so it is fast and cheap: a sitemap with 50,000 URLs takes seconds.

  • Automatic sitemap discovery: Sitemap: lines in robots.txt, then /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /wp-sitemap.xml and /sitemap/sitemap.xml.
  • Sitemap indexes and .gz files: nested indexes up to 5 levels, loops are detected, gzip is unpacked as it streams.
  • Image, video and news sitemaps: image and video count per URL, Google News title and publication date.
  • Filters: include and exclude patterns (regular expressions or globs like *.pdf), lastmod date range or a relative age like 7 days.
  • Status check (optional): status code, final URL and redirect flag for every URL.
  • Bulk input: many domains in one run; URLs are deduplicated across all sitemaps.
  • Broken sitemaps: invalid XML (for example raw & in URLs) is recovered, text sitemaps (one URL per line) are supported.
  • Built for pipelines and AI agents: stable flat JSON, file output for large sites, limited permissions, pay per URL.

What you can use it for

  • Get all blog posts or product pages of a site for RAG, LLM training data or a crawler.
  • Find all PDF files on a website and pass them to PDF to Markdown.
  • Monitor new pages: run on a schedule with lastmodFrom: "1 day".
  • SEO audit: find broken, redirected or outdated URLs in the sitemap.
  • Count the pages of competitor websites.

How to use Sitemap URL Extractor

Apify Console

  1. Open the Actor and enter domains or sitemap URLs in Domains or sitemap URLs, for example apify.com.
  2. Optionally set Include URL patterns (for example /blog/), a lastmod date range or turn on Check HTTP status.
  3. Click Start. The URLs are in the Output tab. The OUTPUT record shows which sitemaps were read per domain.

API

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

Apify MCP for Claude and Cursor

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com/?tools=mcpkit/sitemap-urls-extractor",
"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
}
}
}

Then ask: "List all blog posts on example.com published in November." The agent calls the tool with urls, includePatterns and lastmodFrom/lastmodTo and reads the dataset.

n8n and Make

Use an HTTP Request node: method POST, URL https://api.apify.com/v2/acts/mcpkit~sitemap-urls-extractor/run-sync-get-dataset-items, query parameter token = your Apify API token, JSON body:

{ "urls": ["{{ $json.domain }}"], "lastmodFrom": "1 day", "excludePatterns": ["/tag/", "/author/"] }

Each output item is one URL, ready for the next node.

Use with PDF to Markdown

Extract all PDF links from a website, then convert them:

  1. Run this Actor with {"urls": ["example.com"], "includePatterns": ["*.pdf"]}.
  2. Pass the url values to PDF to Markdown as {"urls": [...]}.

Input

FieldTypeDefaultDescription
urlsarrayrequiredDomains, page URLs or sitemap URLs (.xml, .xml.gz, .txt). Scheme, www and duplicates are normalized.
includePatternsarray[]Keep only URLs matching any pattern. Regex is searched anywhere in the URL; a pattern with * and no other regex syntax is a glob. Case-insensitive.
excludePatternsarray[]Drop URLs matching any pattern.
lastmodFromstring""Keep URLs with lastmod on or after this date: 2026-11-01, 2026-11-01T12:00:00Z or 7 days.
lastmodTostring""Keep URLs with lastmod on or before this date (a date includes the whole day).
requireLastmodbooleanfalseWith a date filter, drop URLs that have no lastmod. By default they are kept.
maxUrlsinteger100000Stop after this many URLs (after filters and deduplication). Up to 1,000,000.
checkStatusbooleanfalseRequest every URL (HEAD, then GET if needed) and add statusCode, finalUrl, redirected.
outputTostringdatasetdataset, file (only a file and one summary item) or both.
outputFilestringnonecsv, txt (one URL per line) or jsonl. CSV is used if outputTo needs a file and none is chosen.

Input example

{
"urls": ["apify.com", "https://example.com/sitemap_index.xml"],
"includePatterns": ["/blog/", "*.pdf"],
"excludePatterns": ["/tag/"],
"lastmodFrom": "2026-11-01",
"checkStatus": false,
"outputTo": "dataset"
}

Output

Dataset

One item per URL. All fields are always present (null when there is no data):

{
"url": "https://apify.com/store/categories",
"lastmod": "2026-11-30",
"changefreq": "daily",
"priority": 0.8,
"imageCount": 0,
"videoCount": 0,
"newsTitle": null,
"newsPublicationDate": null,
"sitemapUrl": "https://apify.com/sitemap/pages.xml",
"source": "apify.com",
"statusCode": null,
"finalUrl": null,
"redirected": null,
"success": true,
"error": null
}
  • lastmod, changefreq, priority: values from the sitemap, as written there.
  • sitemapUrl: the sitemap file the URL came from; source: your input entry.
  • statusCode, finalUrl, redirected: filled when checkStatus is on. A 404 URL is still a normal item with statusCode: 404; if the check itself fails, error says why.
  • If no sitemap can be read for an input, you get one item with success: false and an error that says what to fix, for example No sitemap found for example.com: checked robots.txt and /sitemap.xml, .... Error items are free.

File output (outputTo: "file")

For large sites, use "outputTo": "file" with "outputFile": "txt" or "csv". The URLs go to a file in the key-value store and the dataset holds one summary item with resultFileUrl, urlsWritten, urlsFound, urlsFilteredOut, duplicatesRemoved, sitemapsRead, failedSources and error. No dataset rows are written, so the run is faster.

OUTPUT report

The OUTPUT record in the key-value store has the totals and, per input: the robots.txt URL, sitemaps read and failed, URLs found and written, and the first errors (for example a child sitemap that returned HTTP 404).

How much does it cost to extract URLs from a sitemap?

The Actor uses pay-per-event pricing. You pay for URLs in the result, not for URLs removed by filters or duplicates.

EventFree planBronzeSilverGold
Actor start$0.00005$0.00005$0.00005$0.00005
URL extracted (url)$0.0002$0.00018$0.00015$0.00012
URL status checked (status-check, only with checkStatus)$0.0003$0.00027$0.00024$0.0002

Examples on the Free plan:

  • 100 URLs: 100 × $0.0002 = $0.02 (with status check: $0.05).
  • 1,000 URLs: $0.20 (with status check: $0.50).
  • 10,000 URLs: $2.00 (with status check: $5.00).

Set Maximum cost per run in the run options: the Actor stops at the limit and keeps everything extracted so far.

FAQ

What if a site has no sitemap?

You get one free error item that lists what was checked. This Actor reads sitemaps only. Most CMS (WordPress, Shopify, Wix, Squarespace, Webflow) publish one automatically; try the sitemap URL directly if it is not linked from robots.txt.

How many URLs can it handle?

Up to 1,000,000 URLs per run (maxUrls). Sitemaps are parsed as they stream, so memory stays low; sitemap files over 50 MB (the protocol limit) are skipped with an error. For more than 100,000 URLs use outputTo: "file".

Does it crawl pages?

No. It only reads sitemap files, which is why it is fast and cheap. With checkStatus it sends one HEAD request per URL to get the status code, without downloading the page.

How do I extract only PDFs or blog posts?

Use includePatterns: ["*.pdf"] for PDF files, ["/blog/"] for blog posts. Combine with excludePatterns, for example ["/blog/tag/", "/blog/page/"].

How do I get only new or updated pages?

Set lastmodFrom to a date or a relative age such as "7 days" and schedule the run. Note that some sites do not set lastmod; such URLs are kept unless requireLastmod is true.

Why did a site return HTTP 403 or 429?

Some sites block automated requests. The Actor identifies itself with an honest user agent, retries politely and does not bypass protection. The error is shown in the error item or in OUTPUT.

How is it different from other sitemap extractors?

It finds sitemaps itself, follows indexes and .gz files, recovers broken XML, filters by path and date, and charges only for URLs you keep. The status check is optional and charged separately, so a plain URL list costs less.

Other tools from mcpkit