# Sitemap URL Inventory & Change API (`ursog/sitemap-url-inventory-change-api`) Actor

- **URL**: https://apify.com/ursog/sitemap-url-inventory-change-api.md
- **Developed by:** [andre donda de sa](https://apify.com/ursog) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 url batch processeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Inventory & Change API

Create a compact, deterministic URL inventory from public sitemap XML, then receive only `new_url`, `removed_from_observed_inventory`, `lastmod_changed`, and `sitemap_structure_changed` events.

Use explicit sitemap URLs or domains. Domain discovery reads public `robots.txt` Sitemap declarations and falls back to `/sitemap.xml`. Sitemap indexes, nested indexes, gzip, loops, duplicates, missing `lastmod`, and rolling inventories are handled within hard limits.

The first run emits one free summary by default; it does not dump a giant baseline. The complete contracted inventory remains in persistent state. Optional baseline URL rows are capped and warned. Ã¢â‚¬Å“RemovedÃ¢â‚¬Â means absent from the latest complete observed inventory, never proof that a page was deleted.

Every request and redirect is SSRF-checked. No browser, proxy, login, AI, or private endpoints. Hard controls cover targets, documents, depth, URLs, concurrency, retries, redirects, transaction time, wire bytes, and gzip-decoded bytes.

Only committed change events fire `sitemap-change`. Recommended provisional PPE: **$0.001 per change**.

### Who this Actor is for

Operations, monitoring, research, and data teams that need monitor public sitemap inventories for deterministic url additions, metadata changes and complete-only removals. It is designed for scheduled Apify, API, webhook, integration, and MCP-compatible workflowsÃ¢â‚¬â€not for unsupported professional conclusions.

### Input reference

- `sitemapUrls`: Configure Explicit sitemap URLs.
- `domains`: Checks robots.txt Sitemap declarations, then the conventional /sitemap.xml fallback.
- `monitorKey`: Configure Monitor key.
- `emitBaselineUrls`: Configure Emit capped baseline URL rows.
- `maxBaselineRows`: Configure Maximum baseline URL rows.
- `maxTargets`: Configure Maximum targets.
- `maxSitemapDocuments`: Configure Maximum sitemap documents per target.
- `maxDepth`: Configure Maximum nested index depth.
- `maxUrls`: Configure Maximum URLs across the run.
- `maxConcurrency`: Configure Concurrent targets.
- `requestTimeoutSecs`: Configure Request timeout.
- `maxRequestRetries`: Configure Retries.
- `maxWireBytes`: Configure Maximum wire bytes per document.
- `maxDecodedBytes`: Configure Maximum decoded bytes per document.
- `maxRedirects`: Configure Maximum redirects.

Representative input (replace placeholders and use only sources you are authorized to access):

```json
{
  "sitemapUrls": [],
  "domains": [],
  "monitorKey": "default",
  "emitBaselineUrls": false,
  "maxBaselineRows": 100,
  "maxTargets": 50,
  "maxSitemapDocuments": 100,
  "maxDepth": 5,
  "maxUrls": 50000,
  "maxConcurrency": 6,
  "requestTimeoutSecs": 12,
  "maxRequestRetries": 1,
  "maxWireBytes": 5000000,
  "maxDecodedBytes": 20000000,
  "maxRedirects": 5
}
```

### Output reference

- `recordType`: Structured output field.
- `eventId`: Structured output field.
- `stableId`: Structured output field.
- `targetId`: Structured output field.
- `entryUrl`: Structured output field.
- `urlsInBaseline`: Structured output field.
- `sitemapsInBaseline`: Structured output field.
- `baselineRowsEmitted`: Structured output field.
- `message`: Structured output field.
- `changeType`: Structured output field.
- `url`: Structured output field.
- `lastmod`: Structured output field.
- `previous`: Structured output field.
- `current`: Structured output field.
- `sourceSitemap`: Structured output field.
- `code`: Structured output field.
- `retryable`: Structured output field.
- `observedAt`: Structured output field.

The first complete run creates an expected baseline where the product uses state. Later comparable runs emit only the documented observations or changes. Dataset records retain deterministic identity and source evidence where the contract requires it.

### Limitations and known semantics

- Only the documented source, input forms, fields, identities, and completeness rules are supported.
- An empty, partial, blocked, timed-out, or malformed upstream response is never silently reported as a successful empty result.
- Absence or removal is reported only with the exact observational wording and completeness evidence documented by this Actor; it is not proof of a real-world deletion or status unless the source explicitly says so.
- Upstream publication schedules, schemas, coverage, terms, and availability can change.

### Errors and troubleshooting

Check the run status and OUTPUT summary before consuming Dataset rows. For invalid input, correct the named field. For retryable source failures, preserve the monitor key/state and retry later. For schema or completeness failures, do not reset state or infer changes; report the run ID and non-secret diagnostics to support.

### API, integrations, and MCP

Run the Actor through the Apify API, Schedule, webhook, or supported integration. Read structured records from the default Dataset and the run summary from the default Key-value store. MCP/agent consumers must preserve source, status, uncertainty, and limitation fields and must not convert observational outputs into unsupported claims.

### Privacy and legal notes

Submit only data necessary for the documented workflow and only sources you are authorized to access. Do not include credentials, sensitive personal data, or private URLs unless the Actor explicitly documents secure support for them. Outputs are factual automation evidence, not legal, financial, safety, employment, regulatory, or compliance advice. You remain responsible for source rights, downstream use, retention, and professional review.

### Supported-use boundary

This Actor accepts only public URLs or caller-controlled Apify data that you own or are authorized to process. `sourceRightsConfirmed` must be `true`. The Actor does not grant rights to source material, bypass authentication or access controls, or make an otherwise prohibited collection lawful. Submit the minimum data needed and comply with source terms, privacy duties, retention rules, and applicable law.

# Changelog

This Actor's version history is a separate document: https://apify.com/ursog/sitemap-url-inventory-change-api/changelog.md

# Actor input Schema

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

Configure Explicit sitemap URLs.

## `domains` (type: `array`):

Checks robots.txt Sitemap declarations, then the conventional /sitemap.xml fallback.

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

Configure Monitor key.

## `emitBaselineUrls` (type: `boolean`):

Configure Emit capped baseline URL rows.

## `maxBaselineRows` (type: `integer`):

Configure Maximum baseline URL rows.

## `maxTargets` (type: `integer`):

Configure Maximum targets.

## `maxSitemapDocuments` (type: `integer`):

Configure Maximum sitemap documents per target.

## `maxDepth` (type: `integer`):

Configure Maximum nested index depth.

## `maxUrls` (type: `integer`):

Configure Maximum URLs across the run.

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

Configure Concurrent targets.

## `requestTimeoutSecs` (type: `integer`):

Configure Request timeout.

## `maxRequestRetries` (type: `integer`):

Configure Retries.

## `maxWireBytes` (type: `integer`):

Configure Maximum wire bytes per document.

## `maxDecodedBytes` (type: `integer`):

Configure Maximum decoded bytes per document.

## `maxRedirects` (type: `integer`):

Configure Maximum redirects.

## `sourceRightsConfirmed` (type: `boolean`):

Required. Confirm that every submitted public URL is owned by you or that you are authorized to automate access and process the resulting metadata under the source terms and applicable law.

## Actor input object example

```json
{
  "sitemapUrls": [],
  "domains": [],
  "monitorKey": "default",
  "emitBaselineUrls": false,
  "maxBaselineRows": 100,
  "maxTargets": 50,
  "maxSitemapDocuments": 100,
  "maxDepth": 5,
  "maxUrls": 50000,
  "maxConcurrency": 6,
  "requestTimeoutSecs": 12,
  "maxRequestRetries": 1,
  "maxWireBytes": 5000000,
  "maxDecodedBytes": 20000000,
  "maxRedirects": 5
}
```

# Actor output Schema

## `changes` (type: `string`):

No description

## `baselines` (type: `string`):

No description

## `diagnostics` (type: `string`):

No description

## `runSummary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ursog/sitemap-url-inventory-change-api").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("ursog/sitemap-url-inventory-change-api").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 '{}' |
apify call ursog/sitemap-url-inventory-change-api --silent --output-dataset

```

## MCP server setup

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

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/fbuf1oq4ZGCl7u3OA/builds/TEqPhoeDnJDJxmjIf/openapi.json
