# Sitemap URL Extractor - Every URL of a Website, Fast (`laudedignus/sitemap-url-extractor`) Actor

Give a website, get every URL from its sitemaps with lastmod, priority, images and hreflang. Finds sitemaps in robots.txt and usual locations, follows nested indexes, reads gzip, text and RSS. Filter by date or pattern. $0.20 per 1,000 URLs.

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

## Pricing

from $0.16 / 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: Every URL of a Website, Fast

Give a website and get the complete list of URLs it declares in its sitemaps, one row per URL, with the last modification date, priority, change frequency, image and video counts, news titles and language alternates (hreflang).

You do not need to know where the sitemap is. The Actor reads `robots.txt`, tries the usual locations, follows sitemap indexes to any depth, and reads gzip files, plain-text sitemaps and RSS or Atom feeds. No browser, no proxy: a 50,000-URL sitemap is read in a few seconds.

### Why use it?

- **Seed a crawler with the right URLs.** Feed the list to a scraper instead of crawling blindly, and save most of the cost.
- **Audit a site before a migration or redesign.** Get every URL the site declares, with dates, to build redirect maps and check nothing is forgotten.
- **Monitor new content.** Schedule a daily run with **Only URLs modified since** and get only what changed. Sitemaps that are entirely older are not even downloaded.
- **Prepare a knowledge base for an AI assistant (RAG).** Collect the documentation or blog URLs of a site, filtered by pattern.
- **Count pages by section**, find orphan sections, compare competitors' publishing pace.

### What makes it reliable

- **Tolerant reader.** Real sitemaps are often slightly broken XML. The Actor still reads them, including CDATA, namespaces and relative addresses.
- **No duplicates.** A URL listed in several sitemaps is returned once.
- **Honest summary.** For each website you get one free summary row: where the sitemap was found, how many files were read, which ones failed and why.
- **Safe limits.** Loops between sitemap indexes end, files over 60 MB are refused, and you can cap URLs and sitemap files.

### How to use it

1. Put websites in **Websites or sitemaps**, one per line: `example.com`, or a sitemap address such as `https://example.com/sitemap_index.xml` to read that one only.
2. Optional: set a date, an include or exclude pattern, a maximum number of URLs.
3. Click **Start**. Export as JSON, CSV or Excel, or call the API.

### Input

```json
{
    "websites": ["https://crawlee.dev", "https://yoast.com/sitemap_index.xml"],
    "maxUrlsPerWebsite": 0,
    "modifiedSince": "2026-11-01",
    "includePattern": "/blog/",
    "excludePattern": "/tag/|/author/",
    "includeExtras": true
}
```

### Output

One row per URL:

```json
{
    "type": "url",
    "site": "https://yoast.com",
    "url": "https://yoast.com/",
    "lastmod": "2026-12-01T10:07:21.000Z",
    "changefreq": null,
    "priority": null,
    "images": 8,
    "videos": 0,
    "newsTitle": null,
    "alternates": [],
    "sitemap": "https://yoast.com/page-sitemap.xml"
}
```

One summary row per website (free):

```json
{
    "type": "summary",
    "input": "https://www.orange.sn",
    "site": "https://www.orange.sn",
    "ok": true,
    "discoveredVia": "/sitemap.xml",
    "sitemapsRead": 1,
    "sitemapsFailed": 0,
    "urlsFound": 587,
    "urlsReturned": 587,
    "duplicatesRemoved": 0,
    "filteredOut": 0,
    "newestLastmod": "2026-11-13T12:18:50.000Z",
    "oldestLastmod": "2018-10-04T10:26:01.000Z",
    "sitemaps": [{ "url": "https://www.orange.sn/sitemap.xml", "type": "urlset", "urls": 587, "error": null }],
    "notice": null,
    "error": null
}
```

Dates are always ISO 8601 in UTC. A field is `null` when the sitemap does not give it.

### Pricing

**$0.20 per 1,000 URLs** returned, plus the standard Actor start fee of $0.00005 per run. Summary rows, websites without a sitemap and failed files cost nothing. Set a maximum cost per run and the Actor stops when it is reached.

### Limits

- The Actor returns what the site **declares** in its sitemaps. Pages a site left out of its sitemaps are not found; use a crawler for those.
- Some sites have no sitemap at all, or refuse automated visitors. The summary row then says so and nothing is charged.
- A site can refuse some files for a moment when asked too fast. The Actor reads three files at a time, retries refused files twice, and lists in the summary any file it could not read.
- `lastmod`, `priority` and `changefreq` are written by the site and are not always kept up to date.
- Files larger than 60 MB after decompression are skipped (the sitemap standard allows 50 MB).

### FAQ

**Does it render JavaScript?** No, and it does not need to: sitemaps are plain files.

**Can I pass several websites?** Yes, as many as you want. Each gets its own summary row.

**How do I get only new pages every day?** Save a task, schedule it daily, and set **Only URLs modified since** to yesterday through the API or an integration.

**Something looks wrong?** Open an issue in the Issues tab with the website and the run ID.

### More tools from the same developer

Same approach in each: public sources only, no login, one clear row per result, errors explained.

- [Security Headers Checker](https://apify.com/laudedignus/security-headers-audit): grade the HTTP security headers of any list of websites.
- [SEO Audit Tool](https://apify.com/laudedignus/seo-page-audit): score the on-page SEO of any list of URLs.
- [Tech Stack Detector](https://apify.com/laudedignus/tech-stack-detector): find the CMS, shop platform, analytics and hosting behind any list of websites.
- [Broken Link Checker](https://apify.com/laudedignus/broken-link-checker): crawl a website and list its dead links and 404s.
- [SPF, DKIM & DMARC Checker](https://apify.com/laudedignus/email-security-audit): check SPF, DKIM and DMARC for any list of domains.
- [App Store Reviews Scraper](https://apify.com/laudedignus/app-store-reviews): get the App Store reviews of an iOS app across 50+ countries.
- [Bulk WHOIS Lookup (RDAP)](https://apify.com/laudedignus/domain-rdap-lookup): look up registration, expiry and availability for thousands of domains.
- [Wayback Machine Scraper](https://apify.com/laudedignus/wayback-snapshots): list every archived capture of a page, folder or domain.
- [RSS Feed Reader](https://apify.com/laudedignus/rss-feed-reader): read RSS and Atom feeds and get only the new items on each run.

# Actor input Schema

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

One per line. Give a website (example.com) and its sitemaps are found for you, or give the address of a sitemap to read that one only.

## `maxUrlsPerWebsite` (type: `integer`):

Stop after this many URLs for one website. 0 means no limit.

## `modifiedSince` (type: `string`):

Keep URLs whose last modification date (lastmod) is on or after this date. URLs without a date are left out. Sitemaps that are entirely older are not even downloaded.

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

Text or regular expression the URL must contain, for example /blog/ or /products/.\*-shoes.

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

Text or regular expression. Matching URLs are left out, for example /tag/|/author/.

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

Turn off for a lighter output with only url, lastmod, changefreq, priority and the source sitemap.

## `maxSitemapsPerWebsite` (type: `integer`):

Safety limit on the number of sitemap files read for one website.

## Actor input object example

```json
{
  "websites": [
    "https://crawlee.dev"
  ],
  "maxUrlsPerWebsite": 0,
  "includeExtras": true,
  "maxSitemapsPerWebsite": 500
}
```

# Actor output Schema

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

No description

# 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://crawlee.dev"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("laudedignus/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://crawlee.dev"] }

# Run the Actor and wait for it to finish
run = client.actor("laudedignus/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://crawlee.dev"
  ]
}' |
apify call laudedignus/sitemap-url-extractor --silent --output-dataset

```

## MCP server setup

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