# Sitemap URL Extractor - Get All URLs of a Website, Fast (`gosoul9/sitemap-url-extractor`) Actor

Extract every URL of a website from its XML sitemaps, with last modified date, change frequency, priority and image count. Finds sitemaps automatically (robots.txt), follows sitemap indexes and .gz files. No browser: fast and cheap. $0.50 per 1,000 URLs.

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

## Pricing

from $0.50 / 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.

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 - Get All URLs of a Website, Fast

Get **every URL of a website** from its XML sitemaps, with **last modified date, change frequency, priority and image count**. Give a domain: the sitemaps are **found automatically** (robots.txt + usual locations), **sitemap indexes are followed** and **.gz files** are handled.

No browser, no crawling: a 50,000-page site is listed in seconds, for a fraction of the cost of a crawler.

![Sitemap URL Extractor example output: URLs with last modified date and image count](https://api.apify.com/v2/key-value-stores/JJdNTW6mHqsclEqNv/records/sitemap-url-extractor-output)

### What you get

One row per URL:

| Field | Example |
|---|---|
| `website` | `lemonde.fr` |
| `url` | `https://www.lemonde.fr/international/article/2026/11/20/...` |
| `lastmod` | `2026-11-20T22:20:04+01:00` |
| `changefreq` | `daily` |
| `priority` | `0.8` |
| `images` | `1` (number of `<image:loc>` tags) |
| `sitemap` | the sitemap file the URL comes from |

### How to use

1. Paste domains (`apify.com`) or direct sitemap URLs (`https://example.com/sitemap.xml`), one per line.
2. Optional: **Max URLs per website** (default 5,000) and **Only URLs containing** (e.g. `/blog/`, `/products/`).
3. Run, then export to CSV / Excel / JSON, or feed the URLs to another Actor (a scraper, an SEO audit...).

#### Input example

```json
{
  "websites": ["apify.com", "https://www.leslipfrancais.fr/sitemap.xml"],
  "maxUrlsPerSite": 10000,
  "urlContains": "/products/"
}
```

#### Output example

```json
{
  "website": "lemonde.fr",
  "url": "https://www.lemonde.fr/international/article/2026/11/20/en-suisse-aussi-la-jeunesse-descend-dans-la-rue-contre-un-avenir-bouche_6813714_3210.html",
  "lastmod": "2026-11-20T22:20:04+01:00",
  "changefreq": null,
  "priority": null,
  "images": 1,
  "sitemap": "https://www.lemonde.fr/sitemap_news.xml"
}
```

### Pricing

**$0.50 per 1,000 URLs** returned. Websites without a reachable sitemap are free. Use *Only URLs containing* to pay only for the pages you need.

### Use cases

- **SEO**: list all indexable pages, find recently updated content, compare with what Google indexes.
- **Scraping pipelines**: get the product, article or job URLs first, then scrape only those.
- **Content & competitor monitoring**: track new pages (sort by `lastmod`) on competitor sites.
- **Site migrations**: export the full URL list before a redesign to build redirects.

### FAQ

**The site has no sitemap.** You get one row with an error (free). Many small sites do not publish one.

**Does it follow sitemap indexes?** Yes, up to 300 sitemap files per website, including `.xml.gz`.

**Text sitemaps?** Yes, plain-text sitemaps (one URL per line) are supported too.

### Other Actors you may like

- [SEO Audit & Broken Link Checker](https://apify.com/gosoul9/seo-audit-broken-link-checker): find broken links and SEO issues.
- [AI Readiness & GEO Audit](https://apify.com/gosoul9/ai-readiness-audit): is a website visible in ChatGPT and AI search?.
- [Keyword Suggestions Research](https://apify.com/gosoul9/keyword-suggestions-research): keyword ideas from Google, YouTube, Amazon and Bing.
- [Website Technology Detector](https://apify.com/gosoul9/website-technology-detector): the tech stack of any website.
- [WHOIS Domain Lookup](https://apify.com/gosoul9/whois-domain-lookup): domain age, registrar and expiry date.

# Actor input Schema

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

One per line: a domain (apify.com) - the sitemaps are found automatically from robots.txt - or a direct sitemap URL (https://example.com/sitemap.xml). Sitemap indexes and .gz files are followed.

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

Stop after this many URLs for each website. You only pay for the URLs returned.

## `urlContains` (type: `string`):

Optional filter, e.g. /blog/ or /products/. Only matching URLs are returned (and charged).

## Actor input object example

```json
{
  "websites": [
    "apify.com",
    "leslipfrancais.fr"
  ],
  "maxUrlsPerSite": 5000
}
```

# 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": [
        "apify.com",
        "leslipfrancais.fr"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gosoul9/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": [
        "apify.com",
        "leslipfrancais.fr",
    ] }

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

```

## MCP server setup

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