# Extract Every URL of a Website from Its Sitemap

**Use case:** 

List all the pages of a website from its sitemaps: the tool finds them through robots.txt, follows sitemap indexes, reads XML and plain-text sitemaps, and returns each URL with its last modification date. Use the list to plan a crawl, audit a migration or follow new pages of a competitor. Give domains or sitemap links: $0.50 per 1,000 URLs.

## Input

```json
{
  "sites": [
    "apify.com",
    "https://blog.apify.com/sitemap.xml"
  ],
  "maxUrlsPerSite": 100
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "link"
  },
  "site": {
    "label": "Site",
    "format": "text"
  },
  "lastModified": {
    "label": "Last modified",
    "format": "date"
  },
  "changeFrequency": {
    "label": "Change frequency",
    "format": "text"
  },
  "priority": {
    "label": "Priority",
    "format": "number"
  },
  "imageCount": {
    "label": "Images",
    "format": "number"
  },
  "alternateCount": {
    "label": "Languages",
    "format": "number"
  },
  "sitemapUrl": {
    "label": "Sitemap",
    "format": "link"
  },
  "status": {
    "label": "Status",
    "format": "text"
  },
  "errorMessage": {
    "label": "Error",
    "format": "text"
  }
}
```

## How it works

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

The Sitemap Extractor: All URLs of a Site, Lastmod & Priority Actor is ready to run with the inputs already set for "Extract Every URL of a Website from Its Sitemap". [Sign up or log in](https://console.apify.com/create-task-from-example/LlGCkiZMaQiejMoXD) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Extract Every URL of a Website from Its Sitemap" task

The Sitemap Extractor: All URLs of a Site, Lastmod & Priority Actor will start running based on the input automatically. You can also change all the input fields, like sites or sitemaps and maximum urls per site, to match your specific use case.

### 3. Receive the "Extract Every URL of a Website from Its 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, site, 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 Every URL of a Website from Its Sitemap" task via API](https://apify.com/arnaud437/sitemap-extractor.md).

## FAQ

### What does the sitemap URL task return?

The sitemap URL task returns one row per page found in the website's sitemaps, with the URL, the sitemap it came from and the last modification date when the site gives it.

### Do I need the sitemap link for the sitemap URL task?

No. Give the sitemap URL task a domain and it finds the sitemaps listed in robots.txt or at the usual places; a direct sitemap link also works.

### How much does extracting sitemap URLs cost?

Extracting URLs with the sitemap URL task costs $0.50 per 1,000 URLs on the free plan and less on paid Apify plans.

## About this Actor

This example demonstrates how to use [Sitemap Extractor: All URLs of a Site, Lastmod & Priority](https://apify.com/arnaud437/sitemap-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/arnaud437/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/arnaud437/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`).
