# List all page URLs from a website sitemap.xml

**Use case:** 

Give a sitemap.xml or sitemap index URL and get every page URL it lists, with lastmod, changefreq and priority. Nested sitemap indexes and gzip sitemaps are followed. Filter by regex or last-modified date to get only the pages you need for crawling, audits or change tracking.

## Input

```json
{
  "startUrls": [
    {
      "url": "https://docs.apify.com/sitemap.xml"
    }
  ],
  "maxUrls": 25,
  "maxSitemaps": 100,
  "includeRegex": "",
  "excludeRegex": "",
  "lastmodSince": "",
  "delayMillis": 1000,
  "maxResponseMb": 10
}
```

## Output

```json
{
  "loc": {
    "label": "loc",
    "format": "string"
  },
  "lastmod": {
    "label": "lastmod",
    "format": "string"
  },
  "changefreq": {
    "label": "changefreq",
    "format": "string"
  },
  "priority": {
    "label": "priority",
    "format": "number"
  },
  "sitemapSource": {
    "label": "sitemapSource",
    "format": "string"
  },
  "alternates": {
    "label": "alternates",
    "format": "array"
  },
  "images": {
    "label": "images",
    "format": "array"
  },
  "videos": {
    "label": "videos",
    "format": "array"
  },
  "news": {
    "label": "news",
    "format": "array"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Sitemap Extractor - Sitemap URL Scraper for XML & Gzip Actor is ready to run with the inputs already set for "List all page URLs from a website sitemap.xml". [Sign up or log in](https://console.apify.com/create-task-from-example/swXyh7fldyqACqzPX) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "List all page URLs from a website sitemap.xml" task

The Sitemap Extractor - Sitemap URL Scraper for XML & Gzip Actor will start running based on the input automatically. You can also change all the input fields, like starturls, maxurls, and more, to match your specific use case.

### 3. Receive the "List all page URLs from a website sitemap.xml" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as loc, lastmod, changefreq, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "List all page URLs from a website sitemap.xml" task via API](https://apify.com/ahmed.fouaad82/sitemap-extractor.md).

## FAQ

### What does the sitemap URLs task return?

The sitemap URLs task returns one row per unique page URL found in the sitemap, with lastmod, changefreq, priority and the sitemap it came from.

### Does the sitemap URLs task follow sitemap index files?

Yes. The sitemap URLs task follows nested sitemap index files and gzip sitemaps up to the maxSitemaps limit, and removes duplicate URLs.

### How much does the sitemap URLs task cost?

The first 25 saved unique URLs of every run of the sitemap URLs task are free. After that the Actor charges per saved URL; the Pricing tab shows the current price.

## About this Actor

This example demonstrates how to use [Sitemap Extractor - Sitemap URL Scraper for XML & Gzip](https://apify.com/ahmed.fouaad82/sitemap-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/ahmed.fouaad82/sitemap-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/ahmed.fouaad82/sitemap-extractor.md

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`).
