# Discover all site URLs via sitemap.xml

**Use case:** 

Find every URL in a website XML sitemap via robots.txt and common paths, follow sitemap indexes, and tag PDF/DOCX/XLSX links for SEO audits or RAG ingest. Exports DOC_TO_MARKDOWN_INPUT for the PDF/DOCX Actor.

## Input

```json
{
  "startUrls": [
    {
      "url": "https://www.apify.com"
    }
  ],
  "maxUrls": 100,
  "maxUrlsPerInput": 0,
  "includeUrlsWithoutLastmod": true,
  "sameDomainOnly": false,
  "checkContentType": "off",
  "useRobotsTxt": true,
  "tryCommonPaths": true,
  "maxDepth": 5,
  "maxSitemaps": 500,
  "maxConcurrency": 4,
  "maxConcurrencyPerHost": 2,
  "requestTimeoutSecs": 30,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "link"
  },
  "fileType": {
    "label": "Type",
    "format": "text"
  },
  "lastmod": {
    "label": "Last modified",
    "format": "text"
  },
  "changefreq": {
    "label": "Change freq.",
    "format": "text"
  },
  "priority": {
    "label": "Priority",
    "format": "number"
  },
  "sitemapUrl": {
    "label": "Source sitemap",
    "format": "link"
  },
  "inputUrl": {
    "label": "Input",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [Sitemap URL Extractor — PDF/DOCX Tags + robots.txt](https://apify.com/ingenious_quip_bxq/sitemap-url-discovery.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/ingenious_quip_bxq/sitemap-url-discovery.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/ingenious_quip_bxq/sitemap-url-discovery.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`).
