# Sitemap Extractor: All URLs of a Site, Lastmod & Priority (`arnaud437/sitemap-extractor`) Actor

Every URL a site lists in its sitemaps: robots.txt and sitemap indexes followed, with last modified date, change frequency, priority and images. 1,000 sites.

- **URL**: https://apify.com/arnaud437/sitemap-extractor.md
- **Developed by:** [Open Data Tools](https://apify.com/arnaud437) (community)
- **Categories:** SEO tools, Developer tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 url extracteds

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 Extractor: All URLs of a Site, Lastmod & Priority

Give a list of **sites** or **sitemap URLs**, get **every page URL** they list for search engines, one row each, with its **last modified date**, **change frequency**, **priority**, number of **images** and **language versions**. The extractor finds the sitemaps itself in **robots.txt**, follows **sitemap indexes**, and reads XML and plain-text sitemaps. Fast and cheap: **$0.50 per 1,000 URLs**.

### What you get

One row per page URL:

- **URL**, **path** and **site**.
- **Last modified** date (ISO 8601), **change frequency**, **priority**.
- Number of **images** and of **language versions** (hreflang) listed with the page.
- The **sitemap file** the URL comes from.

Each URL appears once per site, even when several sitemaps list it.

### Use cases

- **SEO audits**: get the full list of pages a site wants indexed, then check them with other tools (status codes, redirects, broken links).
- **Content monitoring**: sort by last modified date to see what a competitor published or updated recently.
- **Crawling**: feed the URL list to a scraper instead of crawling the whole site.
- **Migrations**: compare the sitemaps before and after a site moves.

### How to use

- **Without changing anything**: the first 100 URLs of apify.com and of the Apify blog sitemap.
- **Sites or sitemaps**: one per line, up to 1,000 per run. For a site, the sitemaps announced in its robots.txt are read; otherwise /sitemap.xml, then /sitemap_index.xml.
- **Maximum URLs per site**: from 1 to 50,000 (5,000 by default).

### Input example

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

### Output example

```json
{
  "recordType": "url",
  "id": "https://apify.com/store",
  "url": "https://apify.com/store",
  "input": "apify.com",
  "site": "apify.com",
  "path": "/store",
  "sitemapUrl": "https://apify.com/sitemap-pages.xml",
  "lastModified": "2026-11-18T00:00:00.000Z",
  "changeFrequency": "daily",
  "priority": 0.9,
  "imageCount": 0,
  "alternateCount": 0,
  "status": "ok",
  "sourceName": "Sitemap of apify.com",
  "sourceUrl": "https://apify.com/sitemap-pages.xml",
  "licence": "Sitemap the site publishes for search engines; the pages are not visited",
  "sourceUpdatedAt": null,
  "actorVersion": "0.1.1",
  "retrievedAt": "2026-11-19T10:12:41.207Z"
}
```

### Pricing

Pay per event: **$0.50 per 1,000 URLs extracted** (`url-extracted`, $0.0005 each), plus Apify's start fee of $0.00005 per run. A site without a sitemap and text that is not a web address give a **free** error row.

| URLs         | Price |
| ------------ | ----- |
| 1,000 URLs   | $0.50 |
| 10,000 URLs  | $5    |
| 100,000 URLs | $50   |

### Data source

The sitemaps each site publishes for search engines (sitemaps.org protocol): robots.txt `Sitemap:` lines, sitemap indexes, XML and plain-text sitemaps, up to 200 sitemap files per site. Pages themselves are not visited. Each site's robots.txt is respected. Compressed `.gz` sitemaps are not read yet.

### Is it legal?

Sitemaps are published so that robots can read them. The extractor reads only those files, waits between requests to the same site, follows robots.txt and never visits private addresses.

### FAQ

- **Why are some dates empty?** The site does not give a last modified date for that page: it is optional in sitemaps.
- **Why fewer URLs than the site has?** A sitemap lists only the pages its owner chose, and the extractor stops at your maximum per site.
- **My site has no sitemap.** You get a free error row: the extractor does not crawl pages.

### Related Actors

- [Website Logo Finder](https://apify.com/arnaud437/website-logo-finder): Logos, Favicons & Brand Colors
- [Redirect Checker](https://apify.com/arnaud437/redirect-checker): Full Chain, Status Codes, Loops & Timing
- [SSL Certificate Checker](https://apify.com/arnaud437/ssl-certificate-checker): Expiry, Issuer, Chain, HSTS & Grade
- [Domain Checker](https://apify.com/arnaud437/domain-checker): Availability, Expiry, Registrar & Age (RDAP)
- [Website to Markdown](https://apify.com/arnaud437/website-to-markdown): Fast Crawler for LLM & RAG (No Browser)

Every Actor here also works as a tool for AI agents (Claude, ChatGPT, Cursor…) through [Apify’s MCP server](https://mcp.apify.com).

### Changelog

See [CHANGELOG.md](CHANGELOG.md).

### En français

#### Toutes les adresses d'un site, d'après ses sitemaps

Donnez des sites ou des adresses de sitemap, obtenez une ligne par page avec sa date de mise à jour, sa fréquence, sa priorité, ses images et ses versions en d'autres langues. Les sitemaps sont trouvés tout seuls dans robots.txt.

#### Prix

0,50 $ les 1 000 adresses. Les lignes d'erreur sont gratuites.

#### Source et légalité

Les sitemaps que chaque site publie pour les moteurs de recherche. Seuls ces fichiers sont lus, robots.txt respecté.

# Changelog

This Actor's version history is a separate document: https://apify.com/arnaud437/sitemap-extractor/changelog.md

# Actor input Schema

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

One per line: a site (apify.com), its home page, or a sitemap URL. For a site, the sitemaps listed in its robots.txt are read, else /sitemap.xml and /sitemap_index.xml. Up to 1,000 per run.

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

Stop after this many URLs for each site (1 to 50,000). Each URL is one charged row.

## Actor input object example

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

# Actor output Schema

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

One row per URL listed in the sitemaps: page, sitemap file, last modified date, change frequency, priority, images and language versions.

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

URLs extracted, error rows, and dates of the 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 = {
    "sites": [
        "apify.com",
        "https://blog.apify.com/sitemap.xml"
    ],
    "maxUrlsPerSite": 100
};

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

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

```

## MCP server setup

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