# Extract all URLs from a website's sitemap

**Use case:** 

Enter a domain and get every URL listed in its XML sitemaps as a table with lastmod and the source sitemap. Sitemaps are found through robots.txt, sitemap indexes are followed and gzip files are read. $0.10 per 1,000 URLs, no API key.

## Input

```json
{
  "startUrls": [
    {
      "url": "https://www.sitemaps.org/"
    }
  ],
  "mode": "all",
  "maxUrls": 10000,
  "includeUrlsWithoutLastmod": false,
  "dedupeUrls": true,
  "includeExtensions": true,
  "firstRunOutput": "baseline-only",
  "allowMassRemoval": false,
  "resetSnapshot": false,
  "checkStatus": false,
  "maxStatusChecks": 5000,
  "aiBotSummary": true,
  "maxSitemaps": 2000,
  "maxDepth": 5,
  "maxSitemapMegabytes": 100,
  "maxConcurrency": 5,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "link"
  },
  "change": {
    "label": "Change",
    "format": "text"
  },
  "lastmod": {
    "label": "Last modified",
    "format": "text"
  },
  "previousLastmod": {
    "label": "Previous lastmod",
    "format": "text"
  },
  "changefreq": {
    "label": "Change freq",
    "format": "text"
  },
  "priority": {
    "label": "Priority",
    "format": "number"
  },
  "status": {
    "label": "HTTP status",
    "format": "number"
  },
  "sitemap": {
    "label": "From sitemap",
    "format": "link"
  },
  "images": {
    "label": "Images",
    "format": "array"
  },
  "alternates": {
    "label": "Hreflang",
    "format": "array"
  }
}
```

## How it works

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

The Sitemap URL Extractor & Change Monitor – $0.10/1k Actor is ready to run with the inputs already set for "Extract all URLs from a website's sitemap". [Sign up or log in](https://console.apify.com/create-task-from-example/YbGJYha2VJrZiA81i) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Extract all URLs from a website's sitemap" task

The Sitemap URL Extractor & Change Monitor – $0.10/1k Actor will start running based on the input automatically. You can also change all the input fields, like websites or sitemaps, what to output, and more, to match your specific use case.

### 3. Receive the "Extract all URLs from a website's 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, change, last modified, 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 "Extract all URLs from a website's sitemap" task via API](https://apify.com/osel_house/sitemap-extractor-monitor.md).

## FAQ

### Do I need to know the sitemap URL to extract all URLs from a website?

No. To extract all URLs from a website sitemap enter just the domain. The task reads robots.txt and the usual sitemap locations, follows sitemap indexes and reads gzip files. A direct sitemap or robots.txt link also works.

### How much does it cost to extract URLs from a sitemap?

Extracting URLs from a sitemap with this task costs $0.10 per 1,000 URLs written, so a 10,000-URL site is about $1. There is no subscription and no API key.

### Can I get only the URLs that are new or changed since the last run?

Yes. The Sitemap URL Extractor Actor behind this task has an "Only changes since the last run" mode that outputs the URLs added, removed or with a changed lastmod. You can also keep only URLs modified after a date.

## About this Actor

This example demonstrates how to use [Sitemap URL Extractor & Change Monitor – $0.10/1k](https://apify.com/osel_house/sitemap-extractor-monitor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/osel_house/sitemap-extractor-monitor.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/osel_house/sitemap-extractor-monitor.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`).
