# Sitemap URL Extractor: all URLs from any website (`ucchiii/sitemap-urls`) Actor

List every URL of a website from its sitemaps: finds sitemaps via robots.txt, follows sitemap indexes and .gz files, returns URL, lastmod, changefreq, priority and image count. Include/exclude filters. $0.25 per 1,000 URLs.

- **URL**: https://apify.com/ucchiii/sitemap-urls.md
- **Developed by:** [Actor Factory](https://apify.com/ucchiii) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.18 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 URLs of any website

**For SEO specialists, site-migration teams and developers who need every URL of a website.** Get the **complete
list of URLs** published in its sitemaps — no crawling. **$0.25 per 1,000 URLs.**

### Use cases

- SEO audit and content inventory of a whole site

- Pre-migration URL list (feed it to the URL Status Checker to verify redirects)

- Change monitoring via `lastmod`

- Seed list for other crawlers or RAG ingestion

- **Automatic discovery** via `robots.txt` (falls back to `/sitemap.xml` and `/sitemap_index.xml`)

- Follows **sitemap indexes** and **gzipped** sitemaps

- Fields: `url`, `lastmod`, `changefreq`, `priority`, number of images, source sitemap

- **Include / exclude** URLs by regular expression; cap URLs per site

- Reads **sitemaps only** (files published for crawlers) — it does not crawl pages

- Safe by design: hosts that resolve to internal addresses (localhost, private ranges, link-local such as 169.254.169.254) are never contacted, including redirect targets; such sites are reported as `blocked_private_address` and not charged

### Input

```json
{ "sites": ["example.com", "https://example.org/sitemap_index.xml"], "includePattern": "/blog/", "maxUrlsPerSite": 50000 }
```

### Output

```json
{ "url": "https://example.com/blog/post", "lastmod": "2026-10-01", "changefreq": "weekly", "priority": 0.8,
  "images": 1, "site": "https://example.com", "sitemap": "https://example.com/post-sitemap.xml" }
```

A per-site summary (sitemap files read, URLs found) is saved as `SUMMARY`. Sites without a sitemap are reported as
`no_sitemap_found` (or `blocked_private_address`).

### More tools from the same developer

- [Website Screenshot API](https://apify.com/ucchiii/website-screenshot) — screenshots and PDFs of web pages: full page, mobile, element, no cookie banners
- [SERP Analyzer](https://apify.com/ucchiii/serp-dataset-analyzer) — rankings, share of voice and People Also Ask from Google Search scraper datasets
- [Dataset Merge & Dedup](https://apify.com/ucchiii/dataset-dedup-merge) — merge Apify datasets and remove duplicates by the fields you choose

# Actor input Schema

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

Domains (example.com), homepages, or direct sitemap URLs (https://example.com/sitemap_index.xml). Sitemaps are discovered from robots.txt. Leave empty to run a free demo (not charged). Up to 10,000 URLs per site by default (see maxUrlsPerSite).

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

Stop after this many unique URLs per site. Minimum 1 (default 10000).

## `includePattern` (type: `string`):

Keep only URLs matching this regular expression, e.g. /blog/.

## `excludePattern` (type: `string`):

Drop URLs matching this regular expression, e.g. /tag/|/page/.

## Actor input object example

```json
{
  "sites": [
    "https://apify.com"
  ],
  "maxUrlsPerSite": 100
}
```

# Actor output Schema

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

One item per URL: url, lastmod, changefreq, priority, images (count), site.

## `summary` (type: `string`):

Record SUMMARY: per-site results (sitemaps found, URL counts) and errors.

# 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": [
        "https://apify.com"
    ],
    "maxUrlsPerSite": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("ucchiii/sitemap-urls").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": ["https://apify.com"],
    "maxUrlsPerSite": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("ucchiii/sitemap-urls").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": [
    "https://apify.com"
  ],
  "maxUrlsPerSite": 100
}' |
apify call ucchiii/sitemap-urls --silent --output-dataset

```

## MCP server setup

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

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/JAcmyh9rtMCaBph1g/builds/8i656cIpl2dKTRx7G/openapi.json
