# Sitemap Extractor — All URLs of a Website with Lastmod (`jeffev/sitemap-url-extractor`) Actor

Get every URL of a website from its sitemaps: finds them in robots.txt and usual locations, opens nested indexes and .gz files. Each URL with lastmod, changefreq, priority, images, videos, news and hreflang. Filter by text or date, optionally check HTTP status.

- **URL**: https://apify.com/jeffev/sitemap-url-extractor.md
- **Developed by:** [Jefferson Valandro](https://apify.com/jeffev) (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

from $0.14 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Extractor — All URLs of a Website with Lastmod

Give a domain and get **every URL listed in its sitemaps**, with the metadata search engines see:

- Finds sitemaps in **robots.txt** and the usual locations: `/sitemap.xml`, `/sitemap_index.xml`, `/wp-sitemap.xml` (WordPress), Yoast and Rank Math indexes, Shopify, Wix, Squarespace and plain-text sitemaps
- Opens **nested sitemap indexes** and **.gz** files
- Each URL with `lastmod`, `changefreq`, `priority`, **images**, **videos**, **Google News** data and **hreflang alternates**
- **Filters**: URL contains / does not contain (e.g. only `/products/`), and **modified since** a date
- Optional **HTTP status check** of every URL, to find 404s and redirects listed in your own sitemap

Fast and cheap: no browser, tens of thousands of URLs per minute.

**Who uses it:** SEO audits (what is in the sitemap vs. what is indexed), **feeding other scrapers** with a full list of product or article URLs, competitor monitoring (new pages published this week via `modifiedSince`), content inventories and site migrations.

### Input

All product URLs of a Shopify store:

```json
{
  "startUrls": ["https://www.allbirds.com"],
  "urlContains": ["/products/"]
}
```

Pages a competitor added or changed since a date:

```json
{
  "startUrls": ["competitor.com"],
  "modifiedSince": "2026-11-01"
}
```

A specific sitemap, checking each URL's status:

```json
{
  "startUrls": ["https://example.com/post-sitemap.xml"],
  "checkStatus": true
}
```

### Output

One item per URL:

| Field | Description |
|---|---|
| `url` | page address |
| `lastmod`, `changefreq`, `priority` | sitemap metadata (when the site provides it) |
| `images`, `imageCount` | image sitemap entries |
| `videos` | video sitemap entries (title, thumbnail, content URL, duration) |
| `news` | Google News sitemap data (title, publication, date) |
| `alternates` | hreflang versions in other languages |
| `sitemapUrl`, `site` | where the URL was found |
| `statusCode`, `finalUrl` | with **Check HTTP status** on |

A free summary per site (`type: "site-summary"`) lists every sitemap found with its number of URLs and child sitemaps.

### Example output

One real item from a test run (long texts and lists shortened):

```json
{
  "type": "url",
  "site": "https://www.allbirds.com",
  "url": "https://www.allbirds.com/products/mens-wool-runners",
  "lastmod": "2026-11-23T14:53:44-08:00",
  "changefreq": "daily",
  "priority": null,
  "images": [
    "https://cdn.shopify.com/s/files/1/1104/4168/files/Allbirds_WL_RN_SF_PDP_Natural_Grey_LAT.png?v=1751143404"
  ],
  "imageCount": 1,
  "videos": null,
  "alternates": null,
  "news": null,
  "sitemapUrl": "https://www.allbirds.com/sitemap_products_1.xml?from=1878193471557&to=7486155325520"
}
```

### Tips

- URLs removed by the filters are free: filter as much as you like.
- No sitemap found? Pass the sitemap URL directly. Some sites simply have none.
- Combine `modifiedSince` with **Schedule** to get a daily feed of new or updated pages of any site.

### Feedback

Found a problem? Open an issue in the **Issues** tab: every issue is read and answered. If the actor helped you, a review on the Store helps a lot.

### How much does it cost?

You pay only for results delivered, at a fixed price per item. **Apify platform usage is included** in that price, so there are no compute costs on top. Errors and items that couldn't be found are free.

| What you get | Price | Example |
|---|---|---|
| URL with status check | $0.0008 each | 1,000 URLs with status check = $0.80 |
| URL | $0.0002 each | 1,000 URLs = $0.20 |

The Apify **Free plan includes $5 of monthly credit**, enough for about **6,250 URLs with status check** per month at no cost. You can also set a maximum spend per run.

On paid Apify plans it gets cheaper automatically: **10% off on Starter, 20% on Scale and 30% on Business**.

# Actor input Schema

## `startUrls` (type: `array`):

A domain (sitemaps are found automatically) or a sitemap URL (e.g. https://example.com/sitemap_index.xml).

## `maxUrlsPerSite` (type: `integer`):

Stop after this many URLs per site. You pay per URL returned.

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

Keep URLs that contain any of these texts, e.g. '/products/' or '/blog/'.

## `urlNotContains` (type: `array`):

Drop URLs that contain any of these texts, e.g. '/tag/'.

## `modifiedSince` (type: `string`):

Keep only URLs whose lastmod is on or after this date (URLs without lastmod are dropped).

## `checkStatus` (type: `boolean`):

Request each URL and add its status code (finds 404s and redirects listed in your sitemap). Slower; priced per URL checked.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.allbirds.com",
    "wordpress.org"
  ],
  "maxUrlsPerSite": 500,
  "checkStatus": false
}
```

# Actor output Schema

## `results` (type: `string`):

One item per URL and one summary per site (type 'site-summary').

# 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 = {
    "startUrls": [
        "https://www.allbirds.com",
        "wordpress.org"
    ],
    "maxUrlsPerSite": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("jeffev/sitemap-url-extractor").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 = {
    "startUrls": [
        "https://www.allbirds.com",
        "wordpress.org",
    ],
    "maxUrlsPerSite": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("jeffev/sitemap-url-extractor").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 '{
  "startUrls": [
    "https://www.allbirds.com",
    "wordpress.org"
  ],
  "maxUrlsPerSite": 500
}' |
apify call jeffev/sitemap-url-extractor --silent --output-dataset

```

## MCP server setup

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

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/3Bf91MK9fQF1ToHW5/builds/k5QT5j6T81FLU6JgG/openapi.json
