# Sitemap URL Extractor & New-Page Monitor (`hydrocore/sitemap-url-extractor-monitor`) Actor

Paste a website or sitemap.xml and get every URL as a clean row: last-modified date, age in days, section, priority, images and hreflang. Finds sitemaps via robots.txt, reads indexes and .gz files. Date and URL filters, newest-first sort, new-page monitor.

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

## Pricing

from $0.70 / 1,000 url saveds

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 URL Extractor & New-Page Monitor

Paste any website or sitemap address and get every page URL as one clean row: last-modified date (ISO), age in days, section, priority, image count and hreflang language versions. The Actor finds sitemaps for you (robots.txt `Sitemap:` lines, then /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /wp-sitemap.xml and /sitemap.xml.gz), follows sitemap indexes and reads .xml.gz and plain-text sitemaps. Filter by date or URL pattern, sort newest first, and switch on **monitor mode** to get only pages that are new since your last run.

### ✅ What you get

- Automatic sitemap discovery from a plain website address
- Sitemap indexes, gzip (.xml.gz) and .txt sitemaps
- `lastModifiedAt` as ISO 8601 UTC plus `lastModifiedAgeDays` for easy sorting
- Include / exclude URL patterns with `*` wildcards
- "Modified in the last N days" and "Modified after" date filters
- Sort newest, oldest, priority or URL A-Z, applied **before** the limit
- Monitor mode: only URLs not returned before (per monitor key)
- Duplicates, filtered URLs and already-seen URLs (monitor mode) are never saved or charged
- Per-site run summary: how the sitemap was found, files read, failures

### 💡 Use cases

**Apify Store use cases:** SEO & marketing analysis · Monitor competitors · Website content extraction

- Seed a crawler, RAG pipeline or AI agent with the exact list of pages on a site
- Watch competitors for new product, pricing, blog or docs pages (schedule daily with monitor mode)
- SEO audits: find stale pages, missing lastmod, hreflang coverage, image sitemaps
- Content inventories and migrations

### 🚀 How to use

1. Add one or more websites or sitemap URLs.
2. Optionally set filters (URL patterns, modified in the last N days) and a sort.
3. Run. Download the results as JSON, CSV or Excel, or call the API / MCP.
4. For change alerts, enable "Only new URLs", set a monitor key and schedule the Actor.

### ⚙️ Input

| Field | What it does |
|---|---|
| `startUrls` | Websites or sitemap addresses (required). |
| `includePatterns / excludePatterns` | Keep or drop URLs containing these texts; `*` is a wildcard. |
| `lastModifiedWithinDays / lastModifiedAfter` | Date filters on sitemap lastmod. URLs without lastmod are dropped while a date filter is on. |
| `requireLastModified` | Drop URLs with no lastmod. |
| `sortBy` | sitemapOrder (fastest), newest, oldest, priority, url. On very large sites the sort covers the first 20,000 URLs read (or 5x the per-site cap). |
| `maxUrlsPerSite / maxResults` | Caps per site and per run (defaults 100 / 200). |
| `maxSitemapsPerSite` | How many sitemap files to read per site (default 50). |
| `onlyNew / monitorKey` | Monitor mode: return only URLs not seen in earlier runs with the same key. Already-seen URLs are skipped before the per-site cap, so new pages are found even on big sites. |

Example input:

```json
{
  "startUrls": [
    "https://blog.cloudflare.com",
    "https://docs.apify.com"
  ],
  "sortBy": "newest",
  "lastModifiedWithinDays": 30,
  "excludePatterns": [
    "/tag/",
    "/author/"
  ],
  "maxUrlsPerSite": 100
}
```

### ⬆️ Output

One row per page URL. Every row has the same keys in the same order; missing values are `null`.

Overview fields:

| Field | Type | Example | Description |
|---|---|---|---|
| `url` | string | "https://blog.cloudflare.com/vole-mole" | Page address from <loc>, fragment removed. Dedupe key. |
| `lastModifiedAt` | string | "2026-11-09T23:27:34.849Z" | Sitemap lastmod as ISO 8601 UTC (day-only values become midnight UTC). Null when the sitemap has none. |
| `lastModifiedAgeDays` | integer | 0 | Whole days since lastmod. |
| `section` | string | "vole-mole" | First path segment (blog, docs, product...). Useful for grouping. |
| `changeFrequency` | string | null | Sitemap changefreq (daily, weekly...). |
| `priority` | number | null | Sitemap priority 0.0-1.0. |
| `imageCount` | integer | 1 | Number of <image:image> entries. |
| `alternateCount` | integer | 2 | Number of hreflang alternates. |
| `sitemapUrl` | string | "https://blog.cloudflare.com/sitemap-posts-5.xml" | The sitemap file this URL came from. |

All 17 fields (in order): `recordType`, `url`, `domain`, `path`, `section`, `lastModifiedAt`, `lastModifiedAgeDays`, `changeFrequency`, `priority`, `imageCount`, `alternateCount`, `newsTitle`, `newsPublishedAt`, `alternates`, `sitemapUrl`, `sourceInput`, `scrapedAt`.

Real row from a test run of the current build:

```json
{
  "recordType": "url",
  "url": "https://blog.cloudflare.com/vole-mole",
  "domain": "blog.cloudflare.com",
  "path": "/vole-mole",
  "section": "vole-mole",
  "lastModifiedAt": "2026-11-09T23:27:34.849Z",
  "lastModifiedAgeDays": 0,
  "changeFrequency": null,
  "priority": null,
  "imageCount": 1,
  "alternateCount": 2,
  "newsTitle": null,
  "newsPublishedAt": null,
  "alternates": [
    {
      "hreflang": "en-us",
      "url": "https://blog.cloudflare.com/vole-mole"
    },
    {
      "hreflang": "x-default",
      "url": "https://blog.cloudflare.com/vole-mole"
    }
  ],
  "sitemapUrl": "https://blog.cloudflare.com/sitemap-posts-5.xml",
  "sourceInput": "https://blog.cloudflare.com",
  "scrapedAt": "2026-11-10T12:33:45.568Z"
}
```

Views: **Overview**, **SEO & languages**, **Detailed (all fields)**. Export as JSON, CSV, Excel, XML or HTML from the Storage tab or the API (`/datasets/{id}/items?format=csv&view=overview`). A run summary with per-input status and skipped counts is saved as the `OUTPUT` record in the key-value store.

### 💰 Pricing

Pay per result: **$0.00085 per URL** on the Free plan ($0.0008 Bronze, $0.00075 Silver, $0.0007 Gold and above), plus a $0.0005 Actor start. 1,000 URLs cost about $0.85. Duplicates, filtered-out URLs and URLs already returned in monitor mode are free. Set a maximum charge in run options to cap spend.

### 🔁 Integrations

Works with the Apify API, MCP (AI agents), Make, n8n, Zapier, Google Sheets and webhooks. Field names are stable camelCase, so mappings do not break between runs.

### ❓ FAQ

**Does it render JavaScript or open every page?**

No. It reads only sitemap files and robots.txt, so it is fast and cheap. Use our [Website to Markdown & Text Crawler](https://apify.com/hydrocore/website-to-markdown-text) if you need the page text.

**A site has no sitemap. What happens?**

The run summary (`OUTPUT` record) marks it `no-sitemap-found` and no rows are saved for it, so nothing is charged. If no site in the run could be read, the run ends as failed with the reason.

**Why are some lastModifiedAt values null?**

The site did not put a lastmod in its sitemap. Use requireLastModified or a date filter to drop those rows.

**Is this legal?**

Sitemaps are published by site owners specifically so that tools can discover their pages. The Actor reads only those public files.

### 🛟 Support

Found a problem or need a field? Open an issue on the Issues tab; we read every issue.

### Changelog

- 1.0 (2026-11-10): first release.

### Ready-made examples

Open one, click **Try for free** and change the inputs to your own:

- [New blog pages from competitor sitemaps](https://apify.com/hydrocore/sitemap-url-extractor-monitor/examples/competitor-blog-new-pages-last-30-days)

# Actor input Schema

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

A website (https://example.com, the sitemap is found via robots.txt or common paths) or a sitemap address (sitemap.xml, sitemap index, .xml.gz or .txt). One per line.

## `includePatterns` (type: `array`):

Keep only URLs that contain any of these texts (case-insensitive). Use \* as a wildcard, e.g. /blog/\*/2026. Empty = keep all.

## `excludePatterns` (type: `array`):

Drop URLs that contain any of these texts, e.g. /tag/ or /author/. Skipped URLs are never charged.

## `lastModifiedWithinDays` (type: `integer`):

Keep only URLs whose sitemap lastmod is within this many days. 0 or empty = no date filter. URLs without a lastmod are dropped when a date filter is on.

## `lastModifiedAfter` (type: `string`):

Keep only URLs modified on or after this date (YYYY-MM-DD).

## `requireLastModified` (type: `boolean`):

Drop URLs that have no lastmod in the sitemap.

## `sortBy` (type: `string`):

Sorting happens before the limits, so 'newest, max 50' returns the 50 most recently modified pages. On very large sites the sort covers the first 20,000 URLs read (or 5x the per-site cap, if higher); with 'newest', newer child sitemaps are read first.

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

Cap per website or sitemap input. Example: 5000.

## `maxResults` (type: `integer`):

Hard cap for the whole run. Example: 1000.

## `maxSitemapsPerSite` (type: `integer`):

How many sitemap files (including child sitemaps of an index) to read per site.

## `onlyNew` (type: `boolean`):

Return only URLs not returned by earlier runs with the same monitor key. Schedule the Actor daily to get new pages on any site.

## `monitorKey` (type: `string`):

Separate monitors by using different keys (e.g. competitor-a).

## Actor input object example

```json
{
  "startUrls": [
    "https://blog.cloudflare.com",
    "https://docs.apify.com"
  ],
  "requireLastModified": false,
  "sortBy": "sitemapOrder",
  "maxUrlsPerSite": 100,
  "maxResults": 200,
  "maxSitemapsPerSite": 50,
  "onlyNew": false,
  "monitorKey": "default"
}
```

# Actor output Schema

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

URL, last modified, age, section, priority and source sitemap.

## `seo` (type: `string`):

Images, hreflang alternates and news tags per URL.

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

Every field for each row.

## `summary` (type: `string`):

Per-site status (how the sitemap was found, files read, failures), filtered/duplicate/already-seen counts (never charged).

# 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://blog.cloudflare.com",
        "https://docs.apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydrocore/sitemap-url-extractor-monitor").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://blog.cloudflare.com",
        "https://docs.apify.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hydrocore/sitemap-url-extractor-monitor").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://blog.cloudflare.com",
    "https://docs.apify.com"
  ]
}' |
apify call hydrocore/sitemap-url-extractor-monitor --silent --output-dataset

```

## MCP server setup

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

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/h3q4i7tC053mW7Rx6/builds/mnkdJhCQm25Y7TyEi/openapi.json
