# Sitemap extractor: list every URL in an XML sitemap

**Use case:** 

Find every sitemap for a domain (robots.txt, nested indexes, .gz, .txt, common paths) and return all URLs with lastmod, priority, images, hreflang, path groups and duplicates. Optional broken-link, redirect, noindex checks. Partial results never fail the run. $0.001 per sitemap file / link checked.

## Input

```json
{
  "startUrls": [
    "https://crawlee.dev"
  ],
  "maxUrlsPerSite": 50,
  "checkMode": "off",
  "checkPageStatus": false,
  "maxSitemapFiles": 3,
  "maxCrawlingDepth": 6,
  "includeDuplicates": false,
  "maxLinksToCheck": 100,
  "checkIndexability": true,
  "checkCanonical": false,
  "checkConcurrency": 5,
  "requestDelayMs": 300,
  "requestTimeoutSecs": 20,
  "timeBudgetSecs": 540,
  "userAgent": "SitemapLinkInventoryBot/1.0 (+https://apify.com/transparent_meteorite)",
  "monitorMode": false,
  "reportRemoved": false,
  "monitorName": "default"
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "link"
  },
  "lastmod": {
    "label": "Last modified",
    "format": "text"
  },
  "priority": {
    "label": "Priority",
    "format": "number"
  },
  "changefreq": {
    "label": "Change freq",
    "format": "text"
  },
  "pathGroup": {
    "label": "Path group",
    "format": "text"
  },
  "sourceSitemap": {
    "label": "Source sitemap",
    "format": "link"
  },
  "flags": {
    "label": "Flags",
    "format": "array"
  },
  "statusCode": {
    "label": "HTTP",
    "format": "number"
  },
  "redirects": {
    "label": "Redirects",
    "format": "number"
  },
  "responseMs": {
    "label": "ms",
    "format": "number"
  },
  "lastmodAgeDays": {
    "label": "Days since lastmod",
    "format": "number"
  },
  "fileExtension": {
    "label": "Extension",
    "format": "text"
  },
  "isHttps": {
    "label": "HTTPS",
    "format": "boolean"
  },
  "urlLength": {
    "label": "URL length",
    "format": "number"
  },
  "slug": {
    "label": "Slug",
    "format": "text"
  }
}
```

## How it works

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

The Sitemap Extractor & Broken Link Checker: All URLs, $1/1k Actor is ready to run with the inputs already set for "Sitemap extractor: list every URL in an XML sitemap". [Sign up or log in](https://console.apify.com/create-task-from-example/3BuylKhUXTJGxaGQ4) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Sitemap extractor: list every URL in an XML sitemap" task

The Sitemap Extractor & Broken Link Checker: All URLs, $1/1k Actor will start running based on the input automatically. You can also change all the input fields, like domains or sitemap urls, max urls per site, and more, to match your specific use case.

### 3. Receive the "Sitemap extractor: list every URL in an XML sitemap" 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 URL, last modified, priority, 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 "Sitemap extractor: list every URL in an XML sitemap" task via API](https://apify.com/transparent_meteorite/sitemap-link-inventory.md).

## About this Actor

This example demonstrates how to use [Sitemap Extractor & Broken Link Checker: All URLs, $1/1k](https://apify.com/transparent_meteorite/sitemap-link-inventory.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/transparent_meteorite/sitemap-link-inventory.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/transparent_meteorite/sitemap-link-inventory.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`).
