# Sitemap URL Extractor — All Page URLs from Any Website (`jeggy/sitemap-url-extractor`) Actor

Get every page URL of a website from its sitemaps: auto-discovery via robots.txt, sitemap indexes, gzip and text sitemaps, lastmod, images, hreflang and Google News tags. Filters, lastmod-since and only-new-URLs monitoring. $0.15 per 1,000 URLs. For SEO, RAG crawling and AI agents.

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

## Pricing

from $0.15 / 1,000 urls

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-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 Page URLs from Any Website

**Sitemap URL extractor: get every page URL a website publishes from its sitemaps, at $0.15 per 1,000 URLs.** Paste a domain: sitemaps are discovered from robots.txt (and common paths), sitemap indexes are followed, gzip and plain-text sitemaps are handled, and you get one clean row per URL with `lastmod`, `changefreq`, `priority`, images, hreflang alternates and Google News tags.

Built for **SEO audits and migrations, content inventories, RAG / LLM crawling (feed the URL list to a crawler), competitor monitoring and AI agents** (Claude, ChatGPT, Cursor, n8n, Make).

### Why this one

- **$0.15 per 1,000 URLs.** Sites without sitemaps and errors are free; duplicates across sitemaps are removed before you pay.
- **Proper discovery:** robots.txt `Sitemap:` lines first, then `/sitemap.xml`, `/sitemap_index.xml`, `/wp-sitemap.xml` and others; nested indexes and `.xml.gz`.
- **Filters before you pay:** include / exclude patterns (globs or `re:` regex) and `lastmodSince`.
- **New-page monitor:** `onlyNewUrls` + a schedule returns only URLs that appeared since the last run (great for competitor content or news tracking).
- **Streaming parser:** handles 50 MB sitemaps and millions of URLs with low memory. Migration-safe: nothing is charged twice.

### Input example

```json
{
  "websites": ["apify.com", "https://www.bbc.co.uk/sitemaps/https-index-com-news.xml"],
  "maxUrlsPerSite": 10000,
  "excludePatterns": ["/tag/", "/author/"],
  "lastmodSince": "2026-11-01"
}
```

### Output example

```json
{
  "type": "url",
  "site": "https://www.bbc.co.uk",
  "url": "https://www.bbc.com/newsround/videos/czdd1p9ejxno",
  "lastmod": "2026-11-19T19:38:10Z",
  "changefreq": null,
  "priority": null,
  "sitemap": "https://www.bbc.com/sitemaps/https-sitemap-com-news-1.xml",
  "images": [],
  "alternates": [],
  "news": {"publication": "CBBC Newsround", "language": "en", "publicationDate": "2026-11-19T19:38:10Z", "title": "Strange News: The weirdest stories of the week"}
}
```

### Pricing

| Event | Price |
|---|---|
| `url` | $0.00015 ($0.15 per 1,000) |
| Actor start | $0.00005 |

### How it compares

Figures below are from Apify Store listings (November 2026). They can change.

| | This Actor | `apify/sitemap-extractor` (most-used sitemap Actor in our scan) | `onescales/sitemap-url-extractor` |
|---|---|---|---|
| Price | **$0.15 / 1,000 URLs** ($0.00015 each) on every plan. Sites without sitemaps are free. | **$0.50 / 1,000** on the Free tier, falling to **$0.10 / 1,000** on Gold. 3.24★; 7.4% of 30-day runs failed or timed out in our scan. | **$0.03 per URL** ($30 / 1,000) |
| Users (30 days, Nov 2026) | New | 56 monthly users | 15 monthly users |

On Free, Bronze and Silver this Actor is cheaper than `apify/sitemap-extractor`. On Gold that official Actor is $0.10 / 1,000, which is below this price.

### Limits (honest)

- Only URLs the site lists in its sitemaps are returned (no link crawling). Sites without sitemaps return a free error row.
- `lastmod` is whatever the site publishes; some CMSs set it to the generation time.

### FAQ

**Does it crawl every link on the site?** No. It only returns URLs listed in the site's sitemaps (discovered via robots.txt and common sitemap paths). Sites without a sitemap return a free error row.

**Can I watch for new pages?** Yes. Turn on `onlyNewUrls`, schedule the Actor, and you only pay for URLs that appeared since the last run.

**Can my AI agent use it?** Yes. Add it to the [Apify MCP server](https://docs.apify.com/mcp) and ask, for example, "List the URLs in this site's sitemap from the last 7 days."

**How much for 10,000 URLs?** $1.50, plus the $0.00005 actor-start fee. Duplicates and errors are free.

### Changelog

- **1.0**: first release. robots.txt discovery, sitemap indexes, gzip and text sitemaps, lastmod filters, only-new-URL monitoring, and image/hreflang/news tags.

### Related tools

Other tools in this collection:

- [Website Screenshot API](https://apify.com/jeggy/website-screenshot-api) — Full-page, mobile and PDF screenshots with cookie banners removed. $1.80 per 1,000.
- [Document to Markdown for AI & RAG](https://apify.com/jeggy/document-to-markdown) — PDF, Word, PowerPoint and Excel to LLM-ready Markdown, with OCR. Pay per page.
- [ATS Jobs API & Hiring Signals](https://apify.com/jeggy/ats-jobs-hiring-signals) — Greenhouse, Lever, Ashby and other career boards, plus hiring signals. $0.40 per 1,000 jobs.
- [App Store & Google Play Reviews Scraper](https://apify.com/jeggy/app-reviews-scraper) — Reviews from both stores in one table. $0.08 per 1,000 reviews.
- [Shopify & WooCommerce Products Scraper](https://apify.com/jeggy/shopify-woocommerce-products) — Prices, variants and stock, with a price-drop monitor. $0.40 per 1,000 products.
- [Bulk Domain Lookup](https://apify.com/jeggy/domain-intel) — WHOIS/RDAP, DNS, SPF, DMARC and SSL in one row. $0.80 per 1,000 domains.
- [Tech Stack Detector](https://apify.com/jeggy/tech-stack-detector) — BuiltWith / Wappalyzer-style detection, 7,700+ fingerprints. $1 per 1,000 sites.

Unofficial; reads only files sites publish for crawlers (robots.txt and sitemaps).

# Actor input Schema

## `websites` (type: `array`):

One per line: a domain (apify.com) to auto-discover sitemaps from robots.txt and common paths, or a direct sitemap / sitemap index URL (.xml, .xml.gz or .txt).

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

Stop after this many URLs per site (controls cost).

## `includePatterns` (type: `array`):

Substrings or globs, e.g. '/blog/' or '*/products/*'. Prefix with 're:' for a regular expression.

## `excludePatterns` (type: `array`):

e.g. '/tag/', '/author/', 're:\\?page=\d+'.

## `lastmodSince` (type: `string`):

YYYY-MM-DD. Uses the sitemap's lastmod; URLs without a lastmod are skipped when this is set.

## `onlyNewUrls` (type: `boolean`):

Schedule it to detect newly published pages. URLs returned by an earlier run with the same state key are skipped and not charged.

## `stateKey` (type: `string`):

Use different keys for independent monitors.

## `sameDomainOnly` (type: `boolean`):

When auto-discovering, drop URLs on other domains (direct sitemap URLs are always kept as listed).

## `includeExtras` (type: `boolean`):

Image URLs, hreflang alternates and Google News tags from the sitemap.

## `maxSitemapsPerSite` (type: `integer`):

Safety cap on sitemap files read per site.

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

How many items are processed in parallel.

## Actor input object example

```json
{
  "websites": [
    "https://www.sitemaps.org/sitemap.xml"
  ],
  "maxUrlsPerSite": 25,
  "onlyNewUrls": false,
  "stateKey": "default",
  "sameDomainOnly": true,
  "includeExtras": true,
  "maxSitemapsPerSite": 5,
  "maxConcurrency": 4
}
```

# Actor output Schema

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

Page URLs with lastmod, changefreq, priority and source sitemap.

## `allItems` (type: `string`):

Every dataset row from the run: page URLs (with images, hreflang and news tags when present) and free error items.

## `runSummary` (type: `string`):

OUTPUT record with counts of sites, URLs and errors from this run.

# 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 = {
    "websites": [
        "https://www.sitemaps.org/sitemap.xml"
    ],
    "maxUrlsPerSite": 25,
    "maxSitemapsPerSite": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("jeggy/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 = {
    "websites": ["https://www.sitemaps.org/sitemap.xml"],
    "maxUrlsPerSite": 25,
    "maxSitemapsPerSite": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("jeggy/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 '{
  "websites": [
    "https://www.sitemaps.org/sitemap.xml"
  ],
  "maxUrlsPerSite": 25,
  "maxSitemapsPerSite": 5
}' |
apify call jeggy/sitemap-url-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jeggy/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/pd8XW4ulhtrxoliuv/builds/apeD3TCKqclQof4rQ/openapi.json
