# Sitemap URL Extractor (all pages of a website) (`tenderwire/sitemap-urls`) Actor

Get every page URL of a website from its sitemaps: finds them in robots.txt, follows sitemap indexes, reads gzip, adds last modified date, priority and images. Filters and new URLs only mode.

- **URL**: https://apify.com/tenderwire/sitemap-urls.md
- **Developed by:** [TenderWire Data](https://apify.com/tenderwire) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 urls

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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

# README

## Sitemap URL Extractor (all pages of a website)

Get **every page URL of a website** from its XML sitemaps, as a clean list with last modified dates, change frequency, priority and image URLs. Paste a website and the Actor finds its sitemaps in robots.txt (or the usual addresses), follows sitemap indexes, and reads gzipped sitemaps too.

### What does Sitemap URL Extractor do?

- Finds sitemaps from `robots.txt` (`Sitemap:` lines), or tries /sitemap.xml, /sitemap_index.xml and /wp-sitemap.xml.
- Follows sitemap indexes (several levels deep) and reads `.xml.gz` files.
- Returns each URL with `lastmod`, `changefreq`, `priority` and image URLs from image sitemaps.
- Filters URLs by text they contain or exclude, and by last modified date.
- **Only new URLs since last run**: perfect for watching a competitor's new pages, products or blog posts.

### Who uses it?

- **SEO specialists** auditing indexable pages and finding stale or missing content.
- **Competitor and market watchers** alerted when a site publishes new pages or products.
- **Scraping and AI pipelines** that need the full list of pages to crawl or embed.
- **Developers and QA** checking site migrations and broken sitemap entries.

### What data do you get?

| Field | Example |
|---|---|
| url | https://example.org/a?x=1\&y=2 |
| lastmod | 2026-10-01 |
| changefreq | weekly |
| priority | 0.8 |
| images | image URLs listed for the page |
| sitemapUrl | the sitemap file the URL came from |
| website | the website you entered |

### How to use it

1. Click **Try for free**.
2. Paste websites (or sitemap URLs) into **Websites or sitemap URLs**, one per line.
3. Optionally filter with **URL contains** (for example /blog/) or **Modified within last N days**.
4. Click **Start**. Tens of thousands of URLs take seconds.
5. Export to Excel, CSV or JSON, or pass the URLs to another Actor.

### Input example

```json
{
    "websites": ["https://www.nasa.gov", "https://apify.com/sitemap.xml"],
    "urlContains": ["/blog/", "/news/"],
    "lastmodWithinDays": 30,
    "onlyNewSinceLastRun": true
}
```

### Output example

```json
{
    "source": "sitemap",
    "id": "https://example.org/a?x=1&y=2",
    "website": "https://example.org",
    "sitemapUrl": "https://example.org/sitemap.xml.gz",
    "url": "https://example.org/a?x=1&y=2",
    "lastmod": "2026-10-01",
    "changefreq": "weekly",
    "priority": 0.8,
    "images": ["https://example.org/a.jpg"],
    "scrapedAt": "2026-11-05T17:00:00.000Z"
}
```

### How much does it cost?

**Pay per result: $0.50 per 1,000 URLs** delivered, plus a tiny Apify start fee per run. A 10,000 page website costs $5 once; daily "new URLs only" runs usually cost cents.

### FAQ

**Is this allowed?**
Sitemaps and robots.txt exist so that crawlers can find a site's pages. The Actor only reads these files, not the pages themselves.

**The website has no sitemap.**
Some sites do not publish one. The run then fails with a clear message, and nothing is charged.

**Does it crawl pages that are missing from the sitemap?**
No. It lists exactly what the site declares in its sitemaps, which is also what search engines use.

**Something looks wrong?**
Open an issue on the Issues tab with the website. An automatic self-check runs every day.

# Actor input Schema

## `websites` (type: `array`):

Website addresses (the Actor finds their sitemaps in robots.txt or the usual places) or direct sitemap URLs (.xml or .xml.gz). One per line.

## `urlContains` (type: `array`):

Keep only URLs containing any of these texts, e.g. /blog/, /products/.

## `urlExcludes` (type: `array`):

Drop URLs containing any of these texts, e.g. /tag/, ?page=.

## `lastmodWithinDays` (type: `integer`):

Keep only URLs whose sitemap last modified date is within N days. URLs without a date are dropped when set.

## `includeImages` (type: `boolean`):

Image addresses listed in image sitemaps.

## `onlyNewSinceLastRun` (type: `boolean`):

Remember delivered URLs and output only new pages next time. Ideal for watching a competitor's new pages or products.

## `stateKey` (type: `string`):

Use a different name for each list of websites that runs in this mode.

## `maxItems` (type: `integer`):

Stop after this many URLs. You only pay for URLs delivered.

## `proxyConfiguration` (type: `object`):

Only needed if a website blocks sitemap downloads.

## `selfCheck` (type: `boolean`):

For the maintainer. Reads a known sitemap index and checks the result. Outputs nothing.

## Actor input object example

```json
{
  "websites": [
    "https://www.nasa.gov"
  ],
  "includeImages": true,
  "onlyNewSinceLastRun": false,
  "stateKey": "default",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "selfCheck": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `allFields` (type: `string`):

No description

## `selfCheck` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "websites": [
        "https://www.nasa.gov"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("tenderwire/sitemap-urls").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "websites": ["https://www.nasa.gov"],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("tenderwire/sitemap-urls").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "websites": [
    "https://www.nasa.gov"
  ],
  "maxItems": 100
}' |
apify call tenderwire/sitemap-urls --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tenderwire/sitemap-urls"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bc6wCUXzZ99tnSRve/builds/Z6yPkObUgeBNGtAbO/openapi.json
