# Sitemap URL Extractor: Every Page URL of Any Domain (`physealabs/sitemap-url-harvester`) Actor

Type a domain and get every URL it publishes in its sitemaps, with lastmod, changefreq, priority and image/hreflang counts. Follows robots.txt, sitemap indexes and .gz files. Built by Physea Labs (Liminal). Launch Sale: 90% OFF for the first week. $0.10 per 1,000 URLs.

- **URL**: https://apify.com/physealabs/sitemap-url-harvester.md
- **Developed by:** [jay casey](https://apify.com/physealabs) (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

$0.10 / 1,000 url harvesteds

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: Every Page URL of Any Domain

Type a domain and get the full list of URLs it publishes in its sitemaps, one row per URL with last-modified date, change frequency and priority. A fast way to inventory a site before crawling, auditing or monitoring it.

🚀 **Launch Sale: 90% OFF for the first week!** Prices below are the regular rates; launch-week runs are billed at a tenth of them.

### What can it do?

| What you get | Features |
|---|---|
| 🗺️ Every sitemap URL, deduplicated | ⚡ Pure XML parsing: thousands of URLs per second |
| 📅 lastmod, changefreq, priority per URL | 🔁 Follows robots.txt, nested sitemap indexes, .xml.gz and text sitemaps |
| 🖼️ Image, video, hreflang and Google News counts | 🎯 Glob and modified-since filters |

### Who this is for

- SEO audits: compare what the sitemap promises against what is indexed
- Seeding a crawler with every product, blog or docs URL
- Monitoring competitors: new pages since last week (`modifiedSince`)
- Site migrations: a full URL inventory for redirect maps

### What you get back

| Field | Type | What you get | Example |
|---|---|---|---|
| `url` | `string` | Page URL from the sitemap | `https://apify.com/about` |
| `path` | `string` | URL path | `/about` |
| `lastmod` | `string` | Last modified date as published | `2026-10-01` |
| `changefreq` | `string` | Declared change frequency | `weekly` |
| `priority` | `number` | Declared priority 0-1 | `0.8` |
| `image_count` | `integer` | <image:image> entries | `2` |
| `hreflang_alternates` | `integer` | Language alternates | `0` |
| `sitemap_url` | `string` | Sitemap file it came from | `https://apify.com/sitemap/pages.xml` |
| `status` | `string` | `ok` or `error` | `ok` |

Every run also writes `RUN_SUMMARY.json` to the key-value store (counts, spend-limit flag, pricing).

### What you need to provide

| Field | Type | What it does | Example |
|---|---|---|---|
| `domains` | `array` | One domain or homepage per line. We read robots.txt for its sitemaps and fall back to /sitemap.xml. | `["apify.com"]` |
| `sitemapUrls` | `array` | Direct links to sitemap.xml, sitemap index or .xml.gz files, if you already know them. | `-` |
| `maxUrls` | `integer` | Stop after this many unique URLs. | `200` |
| `maxSitemaps` | `integer` | Safety cap on how many sitemap files to read. | `50` |
| `includeGlobs` | `array` | Glob patterns, e.g. https://apify.com/blog/\* | `-` |
| `excludeGlobs` | `array` | Glob patterns, e.g. */tag/* | `-` |
| `modifiedSince` | `string` | Only keep URLs whose sitemap lastmod is on or after this date. | `-` |

#### Quick start

1. Click **Try for free**.
2. Press **Start**: the sample input finishes in under a minute with no API keys or setup.
3. Replace the sample with your own values and run again.
4. Open the dataset, or export it as JSON, CSV or Excel.

### Pricing

🚀 **Launch Sale: 90% OFF for the first week!**

- `url-harvested`: **$0.0001** per unique URL ($0.10 per 1,000 URLs).
- Duplicates and URLs removed by your filters are not charged.
- Set a max cost per run in the run options and the run stops cleanly when it hits it.
- Normal Apify platform usage applies.

### Limits and honest notes

- Only URLs the site lists in its sitemaps are returned; this actor does not crawl links. Use our *Website to Markdown Crawler* for that.
- Sites without a sitemap return one `error` row (not charged).
- lastmod, changefreq and priority are whatever the site declares; many sites leave them empty.
- No other Apify actor is called: everything is collected in-house over plain HTTP.

### Run it from code

Same input as the Console sample:

```json
{
  "domains": [
    "apify.com"
  ],
  "maxUrls": 200
}
```

```sh
curl -X POST "https://api.apify.com/v2/acts/physealabs~sitemap-url-harvester/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" -d @input.json
```

```python
from apify_client import ApifyClient
items = ApifyClient("YOUR_APIFY_TOKEN").actor("physealabs/sitemap-url-harvester").call(run_input={"domains": ["apify.com"], "maxUrls": 200})
```

It also works from Zapier, Make, n8n and Apify schedules.

### About Physea Labs · Liminal

Built and maintained by **Physea Labs**: the same extraction layer that feeds [Liminal](https://physea.ai), our grounded research and decision engine. If it is good enough to feed Liminal's citations, it is good enough for your pipeline.

# Actor input Schema

## `domains` (type: `array`):

One domain or homepage per line. We read robots.txt for its sitemaps and fall back to /sitemap.xml.

## `sitemapUrls` (type: `array`):

Direct links to sitemap.xml, sitemap index or .xml.gz files, if you already know them.

## `maxUrls` (type: `integer`):

Stop after this many unique URLs.

## `maxSitemaps` (type: `integer`):

Safety cap on how many sitemap files to read.

## `includeGlobs` (type: `array`):

Glob patterns, e.g. https://apify.com/blog/\*

## `excludeGlobs` (type: `array`):

Glob patterns, e.g. */tag/*

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

Only keep URLs whose sitemap lastmod is on or after this date.

## Actor input object example

```json
{
  "domains": [
    "apify.com"
  ],
  "maxUrls": 200,
  "maxSitemaps": 50
}
```

# Actor output Schema

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

One row per item; error rows explain anything that was skipped and are never charged.

## `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 = {
    "domains": [
        "apify.com"
    ],
    "maxUrls": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("physealabs/sitemap-url-harvester").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 = {
    "domains": ["apify.com"],
    "maxUrls": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("physealabs/sitemap-url-harvester").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 '{
  "domains": [
    "apify.com"
  ],
  "maxUrls": 200
}' |
apify call physealabs/sitemap-url-harvester --silent --output-dataset

```

## MCP server setup

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

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/YctIurmydM7Mf6Ex0/builds/5OHhivyYolBsIDn5X/openapi.json
