# Sitemap Change Feed: new and updated URLs (`asunoki/sitemap-change-feed`) Actor

Monitor sitemaps for new and updated URLs. Reads robots.txt, sitemap indexes and .gz files and returns every URL with lastmod; scheduled runs can return only URLs added or changed since the last run, e.g. competitors' new products, articles or docs.

- **URL**: https://apify.com/asunoki/sitemap-change-feed.md
- **Developed by:** [Seisuke Nagahara](https://apify.com/asunoki) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $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 Change Feed: new and updated URLs

Give it websites; it reads their sitemaps (found via robots.txt, then /sitemap.xml; sitemap indexes and .gz files included) and returns every URL with its `lastmod`. Switch the output to **Only new or updated URLs** and run it on a schedule to see what a site added or changed since the last run: new products, new articles, new docs pages.

### What you get (one row per URL)

`site`, `url`, `lastmod`, `change` (`new`, `updated`, `unchanged`, or empty on the first run), `status`.

### Input

- **Websites**: `https://example.com` (or provide sitemap file URLs directly).
- **What to return**: all URLs, or only new/updated ones since the last run.
- Optional: only URLs with lastmod on/after a date; limits per site.

### How changes are detected

The Actor remembers each site's URLs and lastmod in a named key-value store. A URL not seen before is `new`; a URL whose lastmod moved forward is `updated`. Sites that do not publish lastmod can still show `new` URLs.

### Sample output

Real rows from a test run on 2026-11-14 (shortened to one result). Error rows are not charged.

```json
[
  {
    "site": "https://nodejs.org",
    "url": "https://nodejs.org/en/download/alpha",
    "lastmod": "2026-11-12T14:01:22.349Z",
    "change": null,
    "status": "ok",
    "sitemapsRead": 1
  }
]
```

### Typical uses

- **Competitor monitoring**: get a daily list of the product, pricing or landing pages a competitor added or updated.
- **Content and SEO teams**: see which articles or docs pages a site published this week, with their `lastmod` dates.
- **Your own site**: check that new pages actually appear in your sitemap after a release.

### Getting only new and updated URLs

1. First run with **What to return = Only new or updated URLs** and a memory store name, for example `competitor-a`. The first run returns all URLs (`change` is empty) and remembers them.
2. Schedule the same input (Apify Schedules, e.g. daily). Each later run returns only URLs that are `new` or whose `lastmod` moved forward (`updated`).
3. Use a different memory store name for each list you track. A run with no changes saves no URL rows and charges no `url` events.

### Run it from code

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('asunoki/sitemap-change-feed').call({
  sites: ['https://example.com'], output: 'changesOnly', stateStoreName: 'example-daily',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

The same input works from Python (`apify-client`), the REST API, Make, Zapier, n8n and Apify integrations (Slack, Google Sheets, webhooks).

### Pricing

Pay per event: **`url` = $0.0005 per URL row saved ($0.50 per 1,000 URLs).**

- Sites without a readable sitemap and invalid inputs are saved as error rows and **are not charged**.
- Examples: a site with 1,000 URLs, first full run ≈ $0.50. A daily changes-only run that finds 30 new or updated URLs ≈ $0.015. A run with no changes ≈ $0.00005 (start fee only).
- You do not pay Apify platform usage (compute) on top of these events: the Actor's publisher covers it. A small `apify-actor-start` fee ($0.00005 per run at the default 256 MB memory) is charged once per run.
- Limit spend per run with **Max URLs per site** or Apify's maximum charge per run setting.

### Limits

- Only what the site lists in its sitemaps. Pages missing from the sitemap are not found.
- `lastmod` is whatever the site writes; some sites update it on every build, others never. This Actor does not read the pages themselves, so it cannot detect a content change that the site does not reflect in the sitemap.

# Actor input Schema

## `sites` (type: `array`):

Sites to read, e.g. https://example.com. Sitemaps are found from robots.txt, then /sitemap.xml.

## `sitemapUrls` (type: `array`):

Use these sitemap files instead of discovery (must be on the same site).

## `output` (type: `string`):

All URLs found in the sitemaps, or only URLs that are new or have a newer lastmod than in the previous run with the same memory store.

## `lastmodSince` (type: `string`):

YYYY-MM-DD

## `keepUndated` (type: `boolean`):

When a date filter is set, also return URLs that have no lastmod value. Off by default.

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

Upper limit of URL rows saved (and charged) per site in one run.

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

Upper limit of sitemap files (including nested sitemap indexes) read per site.

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

How many sites are read at the same time.

## `stateStoreName` (type: `string`):

Name of the key-value store that remembers URLs between runs. Use a different name for each list of sites you track.

## Actor input object example

```json
{
  "sites": [
    "https://nodejs.org"
  ],
  "sitemapUrls": [],
  "output": "all",
  "keepUndated": false,
  "maxUrlsPerSite": 100,
  "maxSitemapsPerSite": 50,
  "maxConcurrency": 3,
  "stateStoreName": "sitemap-change-feed-state"
}
```

# Actor output Schema

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

All rows.

## `runStatistics` (type: `string`):

Counts and charged events (key-value store record STATS).

# 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 = {
    "sites": [
        "https://nodejs.org"
    ],
    "maxUrlsPerSite": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("asunoki/sitemap-change-feed").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 = {
    "sites": ["https://nodejs.org"],
    "maxUrlsPerSite": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("asunoki/sitemap-change-feed").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 '{
  "sites": [
    "https://nodejs.org"
  ],
  "maxUrlsPerSite": 100
}' |
apify call asunoki/sitemap-change-feed --silent --output-dataset

```

## MCP server setup

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

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/FaIsl9Mbc4sZMmhFb/builds/YaVUKFnw5Tk1vqCQc/openapi.json
