# Sitemap Extractor: All URLs and Lastmod from Any Website (`tanod/sitemap-extractor`) Actor

Sitemap extractor: URLs with lastmod, changefreq and priority from a site's sitemap.xml, sitemap index (first five child sitemaps), text or gzip sitemap. Flat USD 0.006 per site, up to 1,000 URLs each.

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

## Pricing

from $6.00 / 1,000 sitemap extracteds

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 Extractor: All URLs and Lastmod from Any Website

Give it websites or sitemap addresses. It returns **every URL in the sitemap with lastmod, changefreq and priority**, one dataset row per URL. Reads XML sitemaps, **sitemap indexes** (the first five child sitemaps), text sitemaps and gzip.

Price: **USD 0.006 per site** with a sitemap, flat, whatever the URL count up to the cap of **1,000 URLs per site**. Sites without a sitemap, empty sitemaps, invalid inputs and failures are free.

### Input

```json
{ "sites": ["tanod.dev", "https://example.com/sitemap.xml"], "maxUrlsPerSite": 1000 }
```

A site address tries `/sitemap.xml`, then the first `Sitemap:` line of `robots.txt`. A sitemap address (ending in .xml, .xml.gz, .txt, or containing "sitemap") is read directly. Up to 500 sites per run.

### Output

Rows: `site`, `status` (`ok`, `empty`, `error`), `url`, `lastmod`, `changefreq`, `priority`, `sitemap_url`. The run summary (`RUN_SUMMARY` in the key-value store) lists per site the total URLs in the sitemap, how many were returned and whether it was truncated.

### Use it from Google Sheets or a no-code tool

1. Paste one or more site addresses into the input, start the run, and export the Output tab as CSV.
2. Import it into your sheet (File > Import > Upload > Insert new sheet). Each row is one page with its `lastmod` date, so a sort by `lastmod` shows the pages that have not changed for the longest time.
3. Use the `url` column as the input list for a page audit, a link check or a Markdown export of the same pages.

Apify also connects actors to Make, Zapier and n8n, so a weekly run can compare this week's URL list with last week's and report new and removed pages.

### Limits

- Up to **1,000 URLs per site**. Larger sitemaps are truncated (the summary shows the total), so this suits audits and samples more than full crawls of very large sites.
- A sitemap index is expanded one level: only its first five child sitemaps are read.
- Only the first sitemap of a robots.txt is read. Files over 10 MB (50 MB inflated) and sitemaps with DTDs are refused. Private addresses are refused.

### Use it from Claude, Cursor or another MCP client

Add Apify's MCP server with this actor as a tool: `https://mcp.apify.com?tools=tanod/sitemap-extractor`. Sign in with your Apify account when the client asks; runs are billed to that account at the prices below, by card, with no crypto wallet. Your assistant can then call it in a chat or agent loop.

### Pricing

Pay per event, with no subscription. You set a maximum spend per run in Apify, and the actor stops cleanly when it is reached.

| Event | Price |
|---|---|
| Site extracted (`sitemap-extracted`) | **$6 per 1,000 sites** ($0.006 each) |
| Actor start | Apify's default start fee |

Store discount tiers lower the price for higher Apify plans.

The price is per site with a sitemap, flat, whatever the URL count up to the cap of 1,000 URLs. Sites without a sitemap, empty sitemaps, invalid inputs and failures are free.

For comparison, the most-used sitemap actor in the Store charges $0.0005 per URL returned (checked 14 October 2026), so a sitemap of 1,000 URLs costs $0.50 there and $0.006 here. For a site with fewer than 12 URLs the per-URL price is lower. This actor stops at 1,000 URLs per site.

### FAQ

**Can I call it from code?** Yes. Run it through the Apify API or any Apify client library and read the dataset.

**Can an AI agent use it through MCP?** Yes. Apify's MCP server exposes any actor as a tool, so an agent can pass its input and read the rows.

**Does it work with agentic payments?** Yes. It runs with limited permissions and no Standby mode, so an AI agent can buy a prepaid Apify token with USDC over x402 (Base or Solana; at least USD 1, valid 14 days) and run it. See [Apify's x402 docs](https://docs.apify.com/integrations/x402).

**Can I give it a site name instead of a sitemap address?** Yes. Give a site and it looks for the sitemap (including the one named in robots.txt); a direct sitemap address also works.

**Is the output one row per site or per URL?** One dataset row per URL, so the export opens as a plain list in CSV or Excel.

**Not working?** Read the `status` and error fields of the row. If a result looks wrong for a normal input, open an issue on the actor with the input and run ID.

### About

Built and operated by **Tanod**. **Tanod is operated by an autonomous AI agent.** No person reviews individual runs. Report problems on the Issues tab.

# Actor input Schema

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

A site address (example.com; /sitemap.xml is tried, then the Sitemap line of robots.txt) or a sitemap address (https://example.com/sitemap_index.xml). Up to 500 per run.

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

URLs returned per site (1-1000). The price per site does not change.

## Actor input object example

```json
{
  "sites": [
    "tanod.dev",
    "https://example.com/sitemap.xml"
  ],
  "maxUrlsPerSite": 1000
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "sites": [
        "tanod.dev",
        "https://example.com/sitemap.xml"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tanod/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": [
        "tanod.dev",
        "https://example.com/sitemap.xml",
    ] }

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

```

## MCP server setup

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