# Sitemap URL Extractor: All URLs, lastmod, hreflang (`plainprobe/sitemap-url-extractor`) Actor

Get every URL of a website from its sitemaps. Input: website or sitemap URLs. Output: one JSON row per URL with lastmod, changefreq, priority and hreflang (robots.txt discovery, nested indexes, .xml.gz). Regex and date filters, new-page monitoring.

- **URL**: https://apify.com/plainprobe/sitemap-url-extractor.md
- **Developed by:** [Plainprobe](https://apify.com/plainprobe) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.07 / 1,000 urls extracted

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Sitemap URL Extractor: All URLs, lastmod, hreflang

Get every URL of a website from its XML sitemaps, as clean JSON. Give a domain; the Actor finds the sitemaps (robots.txt, then the standard paths), follows nested sitemap indexes and `.xml.gz` files, and returns one row per URL with its last modification date, change frequency, priority, image count and hreflang alternates.

![Real output: summary row per site and one row per URL with lastmod, changefreq and priority](https://api.apify.com/v2/key-value-stores/DPjBqgP8luDMRsd1N/records/sitemap-url-extractor-hero.png)

### For AI agents (MCP)

- **Tool**: `plainprobe/sitemap-url-extractor` via the Apify MCP server (https://mcp.apify.com).
- **Minimal input**: `{"sites": ["example.com"], "maxUrlsPerSite": 100}`
- **Key output fields** (rows with `type: "url"`): `url`, `lastmod` (ISO 8601 UTC or `null`), `changefreq`, `priority`, `alternates[{hreflang, href}]`, `sitemap`. One row per site with `type: "site"`: `status`, `urlCount`, `truncated`, `errors[{code, message}]`.
- **Cost**: $0.0001 per URL returned ($0.10 per 1,000). Site summaries and failed sites are free.
- **Time**: about 1 to 3 seconds per site for up to 10,000 URLs; 120 seconds maximum per site (partial result with `SITE_TIME_LIMIT`).
- **Limits**: 1,000 sites per run, 500,000 URLs per site, 200 sitemap files and 3 index levels per site.

### What does Sitemap URL Extractor do?

| Row type | Fields |
|---|---|
| `url` (one per page URL) | `url`, `lastmod` (ISO 8601), `changefreq`, `priority`, `images` count, `alternates` (hreflang), source `sitemap`, `change` in monitor mode, `checkedAt` |
| `site` (one per site) | `status`, `sitemapsFound`, `urlCount`, `urlsReturned`, `truncated`, `removed` (monitor mode), typed `errors`, `durationMs` |

**Runs on Apify:** call it from the API or an AI agent (MCP), schedule it, connect it to Make, Zapier or n8n, and export results as JSON, CSV or Excel.

### How to use Sitemap URL Extractor (start in 30 seconds)

1. Click **Try for free**.
2. Keep the default input (apify.com and wordpress.org, 100 URLs each) or type your own domains; raise `maxUrlsPerSite` to get every URL.
3. Click **Start**. The URLs appear in the **Output** tab in a few seconds; export them as JSON, CSV or Excel.
4. To get only new and updated pages each day, turn on **monitor mode** and add a daily schedule.

### Use it from your code, an AI agent or a no-code tool

- **API**: `POST https://api.apify.com/v2/acts/plainprobe~sitemap-url-extractor/run-sync-get-dataset-items?token=<YOUR_TOKEN>` with `{"sites": ["example.com"]}` as JSON body; the URLs come back in the response.
- **AI agents (MCP)**: add the Apify MCP server (`https://mcp.apify.com`) to Claude, Cursor or any MCP client; the Actor is callable as a tool (details in the section above).
- **No-code**: n8n, Make and Zapier have official Apify integrations (Run Actor, then Get dataset items), for example to send new blog or product URLs to a sheet or a Slack channel every morning.

### When to use it

- Build a crawl list or an inventory of all pages of a site, without crawling it.
- Get the pages published or updated since a date (`since`), e.g. new articles or products.
- Watch competitors or your own sites: monitor mode returns only new and updated URLs, and lists removed ones.
- Check hreflang coverage across languages.

### When not to use it

- The site has no sitemap (the Actor says `NO_SITEMAP_FOUND`): use a crawler instead.
- You need page content, titles or status codes: this Actor reads sitemaps only; it does not open the pages. To check which listed URLs are broken or redirect, pass them to [Bulk URL Status Checker](https://apify.com/plainprobe/bulk-url-status-checker).

### Input

| Field | Default | Description |
|---|---|---|
| `sites` | `["apify.com"]` | Domains or URLs, up to 1,000. |
| `sitemapUrls` | none | Exact sitemap or index URLs, to skip discovery. |
| `include` / `exclude` | none | Case-insensitive regex on the URL (max 200 characters). |
| `since` | none | Keep URLs with `lastmod` on or after this date; old child sitemaps are skipped without download. |
| `maxUrlsPerSite` | 10,000 (form: 100) | You pay only for URLs returned. |
| `monitor`, `monitorName` | off, `default` | Only new and updated URLs since the previous run with the same name. If the named store cannot be created (limited permissions), the run returns one `MONITOR_STORE_UNAVAILABLE` item and charges nothing. |

### Output example

Real rows from the benchmark run (www.ovh.com, `sitemapsFound` shortened):

```json
{
  "type": "url",
  "site": "https://www.ovh.com",
  "url": "https://www.ovh.com/sg/solutions/load-balancer/infrastructure-hybride.xml",
  "lastmod": "2021-12-20T00:00:00.000Z",
  "changefreq": "monthly",
  "priority": 1,
  "images": 0,
  "alternates": [],
  "sitemap": "https://www.ovh.com/sg/sitemap-sg.xml",
  "change": null,
  "checkedAt": "2026-12-01T12:42:11.226Z"
}
```

```json
{
  "type": "site",
  "site": "https://www.ovh.com",
  "status": "ok",
  "sitemapsFound": [
    "https://www.ovh.com/sg/sitemap-sg.xml",
    "https://www.ovh.com/ca/en/sitemap-ca-en.xml",
    "…"
  ],
  "urlCount": 165,
  "urlsReturned": 165,
  "truncated": false,
  "removed": null,
  "errors": [],
  "checkedAt": "2026-12-01T12:42:11.226Z",
  "durationMs": 1237
}
```

### How much does it cost to extract sitemap URLs?

**Free to try:** the Apify free plan includes $5 of platform credit every month, enough for about **50,000 URLs** with this Actor.

| Event | When | Price |
|---|---|---|
| `url_extracted` | One URL returned in the dataset | $0.0001 |
| Actor start | Once per run, per GB of memory | $0.00005 |

Site rows, failed sites and URLs removed by your filters are free. 10,000 URLs cost $1. Set `maxUrlsPerSite` to cap the cost per site.

### Benchmarks

Measured on 2026-12-01 against apify/sitemap-extractor, same 5 sites (python.org, ovh.com, djangoproject.com, rust-lang.org, debian.org):

| | This Actor | apify/sitemap-extractor |
|---|---|---|
| Sitemap URLs found | 1,191 / 1,191 | 1,191 / 1,191 |
| Non-sitemap URLs mixed in | 0 | 5,865 (HTML pages ending in `.xml` parsed as sitemaps) |
| Sites with no sitemap | explicit `NO_SITEMAP_FOUND` row, free | silently empty |
| Fields | lastmod, changefreq, priority, images, hreflang, source sitemap | url |
| Time | 2.9 s | 24 s (stopped at a $0.25 cap) |
| Price per URL | $0.0001 | $0.0005 (FREE plan) to $0.0001 (GOLD) |

### Errors (stable codes)

`NO_SITEMAP_FOUND`, `SITE_UNREACHABLE`, `INVALID_INPUT`, `BLOCKED_ADDRESS` (private or internal addresses are refused), `SITEMAP_INVALID`, `SITEMAP_UNAVAILABLE`, `SITEMAP_TOO_LARGE`, `SITEMAP_TOO_DEEP`, `SITEMAP_LIMIT`, `SITE_TIME_LIMIT`, `TIMEOUT`. A broken child sitemap never fails the site: its error is listed and the other files are still read.

### Privacy and limits

- Reads only public `robots.txt` and sitemap files, the files a site publishes for crawlers. No pages are crawled, no login, no bypass of bot protections; private and internal addresses are refused.
- 1,000 sites per run; per site: up to 200 sitemap files, 3 levels of nested indexes, 50 MB per uncompressed sitemap, a 120 s budget (partial result with `SITE_TIME_LIMIT` beyond), and `maxUrlsPerSite` (default 10,000, max 500,000).
- Monitor snapshots are kept for sites with up to 100,000 URLs. Runs use 512 MB of memory by default.

### Data source

Sitemaps are files that sites publish for search engines and crawlers (sitemaps.org protocol). The Actor reads only these public files and robots.txt, with a clear user agent, and returns page addresses and dates: no personal data.

### FAQ, disclaimers and support

**Does it crawl the site?** No. It reads only the sitemaps the site publishes, so it returns exactly what the site declares, fast and cheap. Pages that are linked but not listed in a sitemap are not returned.

**Some URLs end in `.xml`. Are they sitemaps?** Only if they are listed in a sitemap index. Inside a `urlset`, they are pages and are returned as pages, never fetched.

**How do I get only new pages?** Use `since` with a date, or turn on `monitor` and schedule the Actor: each run returns only new and updated URLs, and the site row lists removed ones.

**Are compressed sitemaps supported?** Yes, `.xml.gz` files up to 50 MB each.

**Can I call it from an AI agent?** Yes, through the Apify MCP server or the Apify API; the input and output are plain JSON with stable error codes.

**Disclaimer.** Results reflect what public sources returned at `checkedAt`; verify them before any legal or financial decision. Plainprobe is independent and not affiliated with the sites or registers it reads.

**Support.** Found a wrong result or need a field? Open an issue in the **Issues** tab: we read issues every day.

### More from Plainprobe

Step-by-step guide: [find all pages of a website](https://plainprobe.github.io/guides/find-all-pages-of-a-website/). Other Plainprobe tools and how to call them from an AI agent: [plainprobe.github.io](https://plainprobe.github.io/).

# Actor input Schema

## `sites` (type: `array`):

Domains or URLs (up to 1,000). Sitemaps are discovered from robots.txt, then /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml and /wp-sitemap.xml.

## `sitemapUrls` (type: `array`):

Exact sitemap or sitemap index URLs, when you already know them (skips discovery for that site). .xml and .xml.gz are both supported.

## `include` (type: `string`):

Keep only URLs matching this case-insensitive regular expression, e.g. /blog/ . Max 200 characters.

## `exclude` (type: `string`):

Drop URLs matching this case-insensitive regular expression, e.g. .(pdf|jpg)$ .

## `since` (type: `string`):

Keep only URLs whose lastmod is on or after this date (ISO 8601, e.g. 2026-11-01). URLs without lastmod are dropped when set.

## `maxUrlsPerSite` (type: `integer`):

Stop after this many URLs for one site (the site summary then says truncated: true). You pay only for URLs returned. The form starts at 100 so a first try costs $0.02; the API default is 10,000.

## `monitor` (type: `boolean`):

Compares with the previous run of the same monitor name: returns only URLs added or with a newer lastmod, and lists removed URLs in the site summary. Schedule the Actor to get a feed of new pages.

## `monitorName` (type: `string`):

Lowercase letters, digits and dashes (max 40). Use one name per watch list.

## `maxConcurrency` (type: `integer`):

How many sites are processed at the same time.

## Actor input object example

```json
{
  "sites": [
    "apify.com",
    "wordpress.org"
  ],
  "maxUrlsPerSite": 100,
  "monitor": false,
  "monitorName": "default",
  "maxConcurrency": 3
}
```

# Actor output Schema

## `urls` (type: `string`):

One row per URL with lastmod, changefreq, priority (rows with type=url).

## `results` (type: `string`):

URL rows and one summary row per site (type=site).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sites": [
        "apify.com",
        "wordpress.org"
    ],
    "maxUrlsPerSite": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainprobe/sitemap-url-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sites": [
        "apify.com",
        "wordpress.org",
    ],
    "maxUrlsPerSite": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("plainprobe/sitemap-url-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sites": [
    "apify.com",
    "wordpress.org"
  ],
  "maxUrlsPerSite": 100
}' |
apify call plainprobe/sitemap-url-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plainprobe/sitemap-url-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/UTQji3TNrflbBanak/builds/1F39dd1uUNSZoKGVU/openapi.json
