How to use it: 3 steps
- Make a free Apify accountApify is the cloud platform where our tools run. The free plan gives you $5 of usage every month, no credit card needed. You pay Apify, not us.
- Paste your input and press StartNo code needed: you fill in a form (the input). It already has a working example. For example:
{"url": "https://www.sitemaps.org/sitemap.xml"}in Sitemap URLs. Each start is one run. - Download the resultsWhen the run ends, the results are in a table (the dataset). Open Output, press Export and pick Excel or CSV. JSON and the API are there too.
This tool is an Apify Actor: a small program that runs on Apify. You can also run it on a schedule, for example every Monday. New to it? Read how it works, step by step and the 8 words you need first.
What it does
Read public XML sitemaps, sitemap indexes, and gzip sitemap files and save one deduplicated row per page URL. Each row includes url, lastmod, changefreq, priority, and the source sitemapUrl.
- reads public HTTP(S) XML sitemaps;
- follows nested
sitemapindexfiles up to the depth you set; - reads gzip sitemap files with bounded decompression;
- saves one row for each unique page URL;
- keeps
lastmod,changefreq,priority, and the first sitemap that contained the URL; - blocks private-network targets, unsafe redirects, XML DTD/entity input, oversized responses, and decompression bombs.
Good for
- Build a clean URL inventory before a crawler or audit.
- Export sitemap metadata for SEO or migration work.
- Read a large sitemap index without visiting the listed pages.
- Turn
.xml.gzsitemap files into a normal Dataset.
Not a good fit
- Bare website domains. Add the direct sitemap URL instead.
- Login-protected or private-network sitemaps.
- Page status checks. The Actor does not request discovered page URLs.
- Image, video, news, or hreflang sitemap extensions.
Who uses it
SEO specialists
Build a URL list for an audit or a site migration.
Crawler builders
Get a seed list before you start a separate crawler.
Content managers
See which pages changed recently with the lastmod date.
Price
Pay per event: you pay for each result the tool saves, plus a small start fee for each run. The price includes Apify platform costs. Apify bills you, not us. Prices below are for the Apify free plan.
| What you pay for | Price | When |
|---|---|---|
| Start fee | $0.02 | Charged once per run. This tool uses 1 GB of memory or less by default; more memory costs more. |
| Sitemap URL saved | $0.00027 | One unique page URL saved to the default Dataset. |
Examples
- One URL: about $0.02.
- 1,000 URLs: about $1.27 (50 runs of up to 20).
- Every day 100 URLs, for 30 days: about $3.81 a month (5 runs a day).
- 20 URLs once a week (4 runs a month): about $0.10 a month.
Free to try: the Apify free plan gives you $5 of usage every month, no credit card needed. That is enough for about 3,900 URLs.
Prices checked on 24 October 2026. See the current price on Apify.
Questions
Can I just add my domain?
No. Add the direct sitemap URL, for example example.com/sitemap.xml.
Does it open every page in the sitemap?
No. It reads the sitemap files only and saves the listed URLs.
Does it read .xml.gz files?
Yes. Gzip sitemaps are read and saved as normal rows.
Does it find a sitemap from a website homepage?
No. Add the direct sitemap URL, such as https://example.com/sitemap.xml.
Does it support sitemap indexes?
Yes. It follows nested indexes up to maxDepth and maxSitemaps.
Why are some metadata fields null?
They are optional in a sitemap. The Actor keeps null when the publisher does not provide a usable value.
Details
Step by step on Apify
- Open the Input tab.
- Add one direct public sitemap URL to Sitemap URLs (
startUrls). - Keep the default limits for the first run.
- Click Start.
- Open the Dataset and check the
urlandsitemapUrlfields.
Use cases
| Task | Input | Main output | Typical next step |
|---|---|---|---|
| Build an SEO URL inventory | direct sitemap or index | url, lastmod, sitemapUrl | Export to CSV/JSON for analysis |
| Prepare a crawl seed list | direct sitemap or index | deduplicated url values | Send URLs to a separate crawler |
| Review publisher sitemap hints | sitemap URL | lastmod, changefreq, priority | Compare in a spreadsheet |
| Read a compressed sitemap | .xml.gz URL | normal Dataset rows | Export or call the Dataset API |
Tips for better results
- Add the direct sitemap link, not the home page.
- Set the index depth to control how deep nested sitemaps go.
- Sort by lastmod in a spreadsheet to find new pages.
Limits and good to know
partial means a limit or a failing sitemap prevented a full run. It can contain zero rows, such as when an index depth limit stops all children. Check RUN_SUMMARY for limitReached and bounded issue details.
- Up to 20 start sitemap URLs per run
- Up to 4000 unique page results
- Up to 50 sitemap files when
maxSitemapsis raised - Sitemap-index depth is bounded from 0 to 10
- Fixed scan limits: 60 seconds of source work, 64 HTTP attempts (including retries and redirects), and 8 MiB of downloaded response bodies across the whole run
- Each gzip file is capped at 5 MiB compressed and 8 MiB of XML. XML nesting is capped at 64 levels and each file at 50,000 entries
- A smaller user spending limit can stop results early; summaries count only saved rows
- Only public HTTP(S) targets on standard web ports are allowed
For developers
Sample result
One result from a real test run, in JSON. Real values change from run to run. In Excel or CSV each field is a column.
{
"url": "https://www.sitemaps.org/",
"lastmod": "2016-11-21T00:00:00.000Z",
"changefreq": null,
"priority": null,
"sitemapUrl": "https://www.sitemaps.org/sitemap.xml"
}Use it from code
Actor ID: cliqtomedia/xml-sitemap-urls-extractor. You need your Apify API token from Apify Console → Settings → API & Integrations.
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("cliqtomedia/xml-sitemap-urls-extractor").call(run_input={
"startUrls": [
{
"url": "https://www.sitemaps.org/sitemap.xml"
}
],
"maxDepth": 5
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)curl -X POST "https://api.apify.com/v2/acts/cliqtomedia~xml-sitemap-urls-extractor/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startUrls": [{"url": "https://www.sitemaps.org/sitemap.xml"}], "maxDepth": 5}'# pip install langchain-apify
# set APIFY_TOKEN in your environment
from langchain_apify import ApifyActorsTool
tool = ApifyActorsTool("cliqtomedia/xml-sitemap-urls-extractor")
result = tool.invoke({"run_input": {"startUrls": [{"url": "https://www.sitemaps.org/sitemap.xml"}], "maxDepth": 5}})
print(result)The cURL call waits for the results, up to 300 seconds. For longer runs, start a run (/runs) and get the results with a webhook or by checking the run. Apify API docs. LlamaIndex, MCP for AI agents and the JavaScript client: AI agents & MCP.
Data fields (5)
| Field | Type | Meaning |
|---|---|---|
url | string | Page URL from the sitemap. |
lastmod | string | Last modification value, normalized to ISO 8601 when parseable. |
changefreq | string | Publisher-declared change frequency. |
priority | number | Publisher-declared priority between 0 and 1. |
sitemapUrl | string | First sitemap file that contained this deduplicated URL. |
Input settings (8)
The main fields of the input form. With the API you send them as JSON.
| Setting | Name in the API | Type | Example value |
|---|---|---|---|
| Sitemap URLs required | startUrls | array | [{"url": "https://www.sitemaps.org/sitemap.xml"}] |
| Maximum index depth | maxDepth | integer | 5 |
| Maximum sitemap files | maxSitemaps | integer | 20 |
| Maximum results | maxResults | integer | 4000 |
| Request timeout | requestTimeoutSecs | integer | 20 |
| Maximum retries | maxRetries | integer | 2 |
| Maximum compressed sitemap bytes | maxCompressedBytes | integer | 5242880 |
| Maximum XML bytes | maxDecompressedBytes | integer | 8388608 |
Use cases with this tool
Each guide shows all the steps and the other tools.