# Sitemap Extractor — Every URL with Dates, Images & hreflang (`highbrow_fame/sitemap-url-extractor`) Actor

Every URL in a website's sitemaps — found through robots.txt, nested indexes and .gz files followed — with last-modified date, change frequency, priority, images, hreflang and news tags.

- **URL**: https://apify.com/highbrow\_fame/sitemap-url-extractor.md
- **Developed by:** [yestrue](https://apify.com/highbrow_fame) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.20 / 1,000 url delivereds

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 Extractor — Every URL with Dates, Images & hreflang

Get every URL listed in a website's sitemaps — with last-modified date, change frequency, priority, images, hreflang language versions and Google News tags. Give a website and its sitemaps are found through robots.txt; nested sitemap indexes and gzipped `.xml.gz` files are followed.

**Why this one**

- 🧭 **Finds the sitemaps for you.** From robots.txt (the BBC lists 39, the New York Times 25), or `/sitemap.xml` and `/sitemap_index.xml` when robots.txt names none.
- 🪆 **Follows everything.** Sitemap indexes inside indexes, gzipped sitemaps (recognised by their bytes, whatever the server calls them), and plain-text sitemaps.
- 🏷️ **All the tags.** `lastmod`, `changefreq`, `priority`, image links, `hreflang` alternates, and news titles and dates.
- 🧾 **Honest results.** A sitemap that fails is reported; the others are still delivered. A website without a sitemap comes back as a free record saying so. In a live test run, 40,770 URLs from five websites were delivered in one run.
- 💸 **You pay only for URLs delivered.** Filters — URL contains, URL excludes, changed since — skip URLs for free.

### What you get

For every URL:

| Field | What it is |
|---|---|
| `url` | the page |
| `lastmod`, `changefreq`, `priority` | as the sitemap gives them |
| `images` | image links listed for the page |
| `alternates` | language versions: `hreflang` and `url` |
| `news` | for news sitemaps: `title`, `publicationDate`, `publication` |
| `sitemap`, `site`, `input` | which sitemap file and website it came from |
| `scrapedAt`, `status`, `error` | when it was read, and why a website gave nothing |

#### Example

A real record from a live run, 24 September 2026:

```json
{
  "site": "https://www.allbirds.com",
  "sitemap": "https://www.allbirds.com/sitemap_products_1.xml?from=1878194389061&to=7369944137808",
  "url": "https://www.allbirds.com/products/mens-wool-runners-natural-white",
  "lastmod": "2026-09-24T09:26:42-07:00",
  "changefreq": "daily",
  "images": ["https://cdn.shopify.com/s/files/1/1104/4168/files/Allbirds_WL_RN_SF_PDP_Natural_White_LAT_5a1e9e6b-9fa1-47d5-a34e-0ab02a0d2e2e.png?v=1751143945"],
  "alternates": [],
  "news": null,
  "status": "OK"
}
```

### How to use it

1. Add **Websites or sitemaps**, one per line: `example.com`, or a sitemap link.
2. Optionally keep only URLs containing some text (`/products/`, `/blog/`), skip others, or keep only URLs changed since a date.
3. Set **Max URLs per website**.
4. Press **Start**, and download the results from the **Output** tab as JSON, CSV or Excel.

To catch new and changed pages, schedule it daily with **Changed since** set to yesterday.

You can also call it from the Apify API, from Make, Zapier or n8n, or from an AI agent through the Apify MCP server.

### Pricing

You are charged **per URL delivered** — see the price on this page. Websites without sitemaps and URLs your filters skip are free.

### FAQ

**Does it crawl the website?** No. It reads what the sitemaps list, which is fast and gentle on the site. For pages missing from the sitemaps, use a crawler.

**Why do some URLs have no lastmod?** The sitemap does not give one. They are kept when you filter by **Changed since**.

**Like it?** A short review on the Store page helps other people find this Actor. Something missing or broken? Tell us on the Issues tab — we read every one.

# Actor input Schema

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

A website (example.com) — its sitemaps are found through robots.txt — or a sitemap link (…/sitemap.xml, …/sitemap.xml.gz). One per line.

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

Stops each website after this many URLs.

## `urlIncludes` (type: `string`):

Optional: keep only URLs with this text, e.g. /products/ or /blog/.

## `urlExcludes` (type: `string`):

Optional: drop URLs with this text.

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

Optional, YYYY-MM-DD: keep only URLs whose lastmod is on or after this date (URLs without a lastmod are kept).

## `maxConcurrency` (type: `integer`):

How many websites to work on at the same time.

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

Used only to try again after a network error: the first try goes out directly.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.allbirds.com"
  ],
  "maxUrlsPerSite": 100,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every result as a JSON record, with a status for each input.

## `resultsCsv` (type: `string`):

The same records as CSV, for a spreadsheet.

# 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"
    ],
    "maxUrlsPerSite": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("highbrow_fame/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"],
    "maxUrlsPerSite": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("highbrow_fame/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"
  ],
  "maxUrlsPerSite": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call highbrow_fame/sitemap-url-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,highbrow_fame/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/WPrsTLMVmxducOAyn/builds/ko9rdojhO361T62US/openapi.json
