# Scraper Change Monitor: price & website changes + Slack alerts (`bosco_labs/dataset-change-monitor`) Actor

Website change detection for any scraper: compare each run with the previous one and get only new, changed and removed items (new products, price changes), matched by your key fields (e.g. url). Slack notification, Discord, Telegram, email or webhook alert per run. Add it as an integration.

- **URL**: https://apify.com/bosco_labs/dataset-change-monitor.md
- **Developed by:** [Bosco Labs](https://apify.com/bosco_labs) (community)
- **Categories:** Automation, Integrations, 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 $1.00 / 1,000 change reporteds

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

## Change Monitor: new, changed & removed items + Slack alerts

**Run any scraper on a schedule, get only what changed, and an alert.** This Actor compares
each run of your scraper with the previous one and outputs only the **new**, **changed** and
(optionally) **removed** items, matched by your key fields such as `url`, `placeId` or `sku`.
One summary per run goes to Slack, Discord, Telegram, email or any webhook. For price
tracking, new listings, job boards, stock and competitor monitoring.

**Pricing (pay per event):** $0.001 per change reported ($1 per 1,000); unchanged items, the
baseline run and alerts are free; no start fee. The run stops at your max charge limit, and
changes it couldn't report are reported on the next run.

### Try it: paste items

Open the Actor and click **Start**: the input is prefilled with four job listings in **Or
paste items**, and every one comes back as `new` (4 rows, $0.004). Without a `monitorName`
nothing is saved, so this try-out gives the same result every time.

To see a change, set `monitorName` (e.g. `jobs-test`) and run it once, then change a salary in
the pasted items and run again: you get one `changed` row with `changed_fields: ["salary_eur"]`.
Pasted items are reported as new on a monitor's first run (there is no silent baseline for
them). Delete the `jobs-test` records afterwards (see the FAQ) or just leave them.

### Setup: run it after every scraper run (integration)

1. Open your scraper (the Actor or, better, its saved **task**) in Apify Console and give it a
   **schedule** (Schedules > Create), e.g. daily.
2. On the same Actor or task, open the **Integrations** tab and click **Connect Actor or task**.
   Pick **Change Monitor**, trigger **Run succeeded**.
3. Set the input to:

```json
{
  "datasetId": "{{resource.defaultDatasetId}}",
  "monitorName": "shop-prices",
  "keyFields": ["url"],
  "watchFields": ["price", "stock"],
  "slackWebhookUrl": "https://hooks.slack.com/services/..."
}
```

`{{resource.defaultDatasetId}}` is filled in by Apify with the finished run's dataset. The
first run saves the baseline (free, nothing reported); from the second run on you get only
the changes. Use one `monitorName` per scraper or task: one name = one watched list.

You can also run it by hand or from the API: pick the dataset in **Dataset to check** and keep
the same `monitorName` every time.

### Input

| Field | Meaning |
|---|---|
| `datasetId` | The dataset to check, usually the scraper run's default dataset |
| `items` | Or paste a JSON array of items (checked before the dataset). Reported as new on a monitor's first run |
| `monitorName` | Name of the saved state. Runs with the same name are compared. Empty = `default` with a `datasetId`; with only pasted items, empty = a try-out that saves nothing |
| `keyFields` | Fields that identify an item across runs, e.g. `["url"]`. Dot paths work: `product.sku` |
| `compareWholeItem` | No ID field? Identify items by all their fields: only new/removed, never changed |
| `ignoreFields` | Never compared. Default: `scrapedAt`, `scraped_at`, `crawledAt`, `retrieved_at`, `timestamp`, `#debug` |
| `watchFields` | Only these fields count as a change, and the output shows their old values. Empty = all fields |
| `report` | Which changes become rows: `new`, `changed`, `removed`. Default `["new", "changed"]` |
| `reportOnFirstRun` | Report every item as new on the first run (charged). Default false |
| `slackWebhookUrl`, `discordWebhookUrl`, `webhookUrl` | Alert targets (secret inputs) |
| `telegramBotToken` + `telegramChatId` | Telegram alert via your own bot (token is a secret input) |
| `email` | Email alert, comma-separated addresses |
| `alertMaxItems` | Example lines per alert (default 10) |
| `alertWhenNoChanges` | Also alert when nothing changed (default false) |

The default `ignoreFields` cover the run timestamps that common scrapers add to every item
(for example `scrapedAt` from Google Maps and e-commerce scrapers, `#debug` from Web Scraper).
If your scraper adds another field that differs on every run, add it here or use
`watchFields`; otherwise every item shows up as changed.

### Output

One row per change, in the run's default dataset. With `keyFields: ["url"]`:

```json
[{"change_type": "changed", "key": {"url": "https://shop.example/p/1"},
  "changed_fields": ["price"], "previous": {"price": 19.99},
  "item": {"url": "https://shop.example/p/1", "title": "Desk lamp", "price": 17.49, "stock": 12},
  "monitor_name": "shop-prices", "checked_at": "2026-11-05T06:00:12+00:00", "schema_version": "1"},
 {"change_type": "new", "key": {"url": "https://shop.example/p/9"}, "changed_fields": [],
  "previous": null, "item": {"url": "https://shop.example/p/9", "title": "Floor lamp", "price": 49, "stock": 3},
  "monitor_name": "shop-prices", "checked_at": "2026-11-05T06:00:12+00:00", "schema_version": "1"},
 {"change_type": "removed", "key": {"url": "https://shop.example/p/4"}, "changed_fields": [],
  "previous": null, "item": {"url": "https://shop.example/p/4"},
  "monitor_name": "shop-prices", "checked_at": "2026-11-05T06:00:12+00:00", "schema_version": "1"}]
```

| Field | Meaning |
|---|---|
| `change_type` | `new`, `changed` or `removed` |
| `key` | The key field values (null with `compareWholeItem`) |
| `changed_fields` | For `changed`: the top-level fields that differ, or your `watchFields` paths |
| `previous` | For `changed`: the old values of the changed fields that the Actor kept (see below); null when none is known, and for `new` and `removed` |
| `item` | The current item, unchanged. For `removed`: the key values (with `compareWholeItem`: the removed item minus ignored fields) |
| `monitor_name`, `checked_at` | Which monitor, and when (UTC) |
| `schema_version` | Output format version, `"1"` |

Without `watchFields`, every top-level field is compared (`price.amount` changing shows as
`price`). To stay small, the Actor stores a 4-byte fingerprint per field plus the old values of
small fields only: text up to 200 characters, numbers, true/false and null, up to 20 fields and
400 characters per item. So `previous` shows the old price, title, stock or status; a changed
long text, list or object is listed in `changed_fields` but left out of `previous`, and a field
that was missing before shows as `null`. With `watchFields`, the values of those fields are
always stored and shown, whatever their size.

### Alerts

One message per run, only when something changed (unless `alertWhenNoChanges`). Slack,
Discord, Telegram and email get the same text:

```text
Change monitor 'shop-prices': 3 changes (1 new, 1 changed, 1 removed)
- changed: https://shop.example/p/1: price 19.99 -> 17.49
- new: https://shop.example/p/9
- removed: https://shop.example/p/4
https://console.apify.com/storage/datasets/<changes dataset ID>
```

- **Slack:** create an [incoming webhook](https://api.slack.com/messaging/webhooks) for a
  channel and paste its URL.
- **Discord:** channel settings > Integrations > Webhooks > New webhook > Copy URL.
- **Telegram:** create a bot with @BotFather, add it to your chat, and paste the bot token and
  the chat ID.
- **Email:** sent with the public Actor [apify/send-mail](https://apify.com/apify/send-mail),
  which runs in your own Apify account and uses a few seconds of compute per email.
- **Webhook (Zapier, Make, n8n, your API):** a JSON POST:

```json
{"monitor_name": "shop-prices", "dataset_id": "aBcD1234efGH5678i",
 "changes_dataset_id": "jKlM9012noPQ3456r",
 "changes_dataset_url": "https://console.apify.com/storage/datasets/jKlM9012noPQ3456r",
 "baseline": false, "counts": {"new": 1, "changed": 1, "removed": 1},
 "stopped_at_charge_limit": false, "examples": [{"change_type": "changed", "...": "..."}],
 "text": "Change monitor 'shop-prices': 3 changes ...", "checked_at": "2026-11-05T06:00:12+00:00", "schema_version": "1"}
```

A failed alert (wrong URL, Slack down) is a warning in the log: the run still succeeds and the
changes are saved.

### Use cases

- **Price and stock tracking:** watch `price` and `stock` on a shop scraper, get "19.99 ->
  17.49" in Slack.
- **New listings:** real estate, cars, jobs or tenders: report only `new`.
- **Competitor pages:** a website crawler with `keyFields: ["url"]` and
  `watchFields: ["text"]` tells you which pages changed.
- **Google Maps:** new places in an area, or changed ratings and opening hours, by `placeId`.

### Use with AI agents (MCP)

Agents can call this Actor as a tool through the
[Apify MCP server](https://github.com/apify/apify-mcp-server). Add this server URL to your MCP
client (Claude, Cursor, VS Code, ...):

```text
https://mcp.apify.com?tools=bosco_labs/dataset-change-monitor
```

Example prompt: *"Compare today's run of my shop scraper with the previous one by url and
tell me which prices changed."* The agent passes:

```json
{"datasetId": "<the run's dataset ID>", "monitorName": "shop", "keyFields": ["url"], "watchFields": ["price"]}
```

**Cost:** $0.001 per change reported, billed to the Apify account the MCP server is signed in
with.

### FAQ

**Why does the first run report nothing?** There is nothing to compare with yet. It saves the
baseline for free, so you don't pay for every item on day one. Turn on `reportOnFirstRun` if
you do want them all as new. Pasted items are the exception: they are always reported as new
on a monitor's first run.

**Where is the saved state?** In a named key-value store `dataset-change-monitor-state` in your
own Apify account, under the records `<monitorName>-meta` and `<monitorName>-000` to `-127`.
It holds fingerprints (hashes), the key values and the old values of small fields (with
`watchFields`, the watched values; with `compareWholeItem`, the items themselves, so removals can
be shown). Delete those records to start over.

**I updated from an older version: why is `previous` null?** Older versions kept fingerprints
only. The first run after the update can't know the old values, so `previous` is null for that
run's changes; it saves them, and from the next run on `previous` is filled. Nothing else
changes: no new baseline, no extra charges.

**What if I change `keyFields`, `ignoreFields` or `watchFields`?** The monitor starts a new
baseline on the next run (with a warning in the log), because old and new fingerprints can't
be compared.

**Why is "removed" off by default?** A scraper run that stopped early, or was blocked, still
"succeeds" with fewer items, and every missing item would be reported as removed. Turn it on
when your scraper reliably returns the full list.

**How many items can one monitor hold?** Millions. Measured with 1 million shop items of 10
small fields: the state took 117 MB (the largest of the 128 records 0.95 MB, far under Apify's
9 MB record limit) and about 600 MB of memory, under the 1 GB default; comparing them took about
a minute. Items with 20+ text fields need up to about 1.3 GB per million: give such a monitor
2 GB of memory. Up to 8 GB of memory covers roughly 8 million small items. Past that, a state record
would pass 9 MB: the run then saves fingerprints only (`previous` stays null, with a warning in
the log; use `watchFields` for the fields whose old values you need). If even that passes 9 MB,
the run fails before saving and the old state stays intact: split the list over several
monitors.

**What if the run hits my max charge limit?** It stops pushing rows. Changes that weren't
reported are not marked as seen, so the next run reports them.

**What if the run crashes or is restarted?** The state is saved only at the end, after the
changes are in the dataset, so a crash loses nothing: the next run finds the same changes.
After a platform restart, rows already written are not charged again.

**Two items with the same key in one dataset?** The first one counts; the rest are skipped and
counted as `duplicate_keys` in the log. Items without any key field are skipped too.

**Which datasets can it read?** Only the one you pick or pass in `datasetId`. The Actor runs
with limited permissions.

# Actor input Schema

## `datasetId` (type: `string`):

Apify dataset to compare with the previous run, e.g. "aBcD1234efGH5678i": usually your scraper run's default dataset. As an integration on your scraper, set it to "{{resource.defaultDatasetId}}" (see the README). Optional if you paste items.

## `items` (type: `array`):

Items to check directly, as a JSON array of objects, e.g. \[{"url": "https://jobs.example.com/1042", "salary_eur": 65000}]. Checked before the dataset. Pasted items are all reported as new on a monitor's first run (no silent baseline). Without a monitorName nothing is saved, so every run is a fresh try-out; give a monitorName and paste again with an edit to see a change.

## `monitorName` (type: `string`):

Name of the saved state: one name = one watched list, e.g. "shop-prices". Runs with the same name are compared with each other; use a different name per scraper or task. Letters, digits, - and \_. Empty = "default" with a datasetId; with only pasted items, empty = a try-out that saves nothing.

## `keyFields` (type: `array`):

Fields that identify the same item in every run, e.g. \["url"] or \["placeId"]. Dot paths work: \["product.sku"]. Required unless you use whole-item comparison. Items without any key field are skipped.

## `compareWholeItem` (type: `boolean`):

For datasets without an ID field: an item is identified by all its fields (minus ignored ones), so items are only reported as new or removed, never as changed. Default false. E.g. `true`.

## `ignoreFields` (type: `array`):

Fields that change on every run and are never compared, as dot paths. Default: scrapedAt, scraped_at, crawledAt, retrieved_at, timestamp and #debug. Set \[] to compare everything. E.g. \["scrapedAt", "#debug"].

## `watchFields` (type: `array`):

Only changes in these fields count, e.g. \["price", "stock", "offer.status"]. The output then also shows the old values (previous). Empty = every field except the ignored ones.

## `report` (type: `array`):

Which changes become output rows (and are charged): new, changed and/or removed items. Removed is off by default, because a scraper run that stopped early would make many items look removed. E.g. \["new", "changed"].

## `reportOnFirstRun` (type: `boolean`):

The first run of a monitor only saves the baseline and reports nothing (free). Turn on to report every item as new on that first run (charged per item). E.g. `true`.

## `slackWebhookUrl` (type: `string`):

Slack incoming webhook URL (https://hooks.slack.com/services/...). Secret input, stored encrypted. E.g. "https://hooks.slack.com/services/T000/B000/XXXX".

## `discordWebhookUrl` (type: `string`):

Discord channel webhook URL (https://discord.com/api/webhooks/...). Secret input, stored encrypted. E.g. "https://discord.com/api/webhooks/123/abc".

## `webhookUrl` (type: `string`):

Any URL that receives a JSON POST with the counts, example rows and the link (Zapier, Make, n8n, your own API). Secret input, stored encrypted. E.g. "https://hooks.zapier.com/hooks/catch/123/abc/".

## `telegramBotToken` (type: `string`):

Token of your Telegram bot from @BotFather. Needs the chat ID too. Secret input, stored encrypted. E.g. "123456:ABC-DEF1234ghIkl" (digits, colon, letters).

## `telegramChatId` (type: `string`):

Chat, group or channel ID the bot posts to, e.g. "123456789" or "@mychannel".

## `email` (type: `string`):

Address(es) for an email alert, comma-separated. Sent by the public Actor apify/send-mail, which runs in your account (a few seconds of compute). E.g. "alerts@example.com, ops@example.com".

## `alertMaxItems` (type: `integer`):

How many changes to list in the alert as examples (key values and what changed). Default 10. E.g. 5.

## `alertWhenNoChanges` (type: `boolean`):

Send the alert even when a run found no changes (a daily "all quiet"). Default false.

## Actor input object example

```json
{
  "items": [
    {
      "url": "https://jobs.example.com/1042",
      "title": "Data Engineer",
      "company": "Northwind",
      "location": "Amsterdam",
      "salary_eur": 65000
    },
    {
      "url": "https://jobs.example.com/1043",
      "title": "Backend Developer (Python)",
      "company": "Contoso",
      "location": "Remote",
      "salary_eur": 58000
    },
    {
      "url": "https://jobs.example.com/1044",
      "title": "Product Analyst",
      "company": "Fabrikam",
      "location": "Berlin",
      "salary_eur": 52000
    },
    {
      "url": "https://jobs.example.com/1045",
      "title": "Site Reliability Engineer",
      "company": "Northwind",
      "location": "Rotterdam",
      "salary_eur": 70000
    }
  ],
  "keyFields": [
    "url"
  ],
  "compareWholeItem": false,
  "ignoreFields": [
    "scrapedAt",
    "scraped_at",
    "crawledAt",
    "retrieved_at",
    "timestamp",
    "#debug"
  ],
  "report": [
    "new",
    "changed"
  ],
  "reportOnFirstRun": false,
  "alertMaxItems": 10,
  "alertWhenNoChanges": false
}
```

# Actor output Schema

## `results` (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 = {
    "items": [
        {
            "url": "https://jobs.example.com/1042",
            "title": "Data Engineer",
            "company": "Northwind",
            "location": "Amsterdam",
            "salary_eur": 65000
        },
        {
            "url": "https://jobs.example.com/1043",
            "title": "Backend Developer (Python)",
            "company": "Contoso",
            "location": "Remote",
            "salary_eur": 58000
        },
        {
            "url": "https://jobs.example.com/1044",
            "title": "Product Analyst",
            "company": "Fabrikam",
            "location": "Berlin",
            "salary_eur": 52000
        },
        {
            "url": "https://jobs.example.com/1045",
            "title": "Site Reliability Engineer",
            "company": "Northwind",
            "location": "Rotterdam",
            "salary_eur": 70000
        }
    ],
    "keyFields": [
        "url"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bosco_labs/dataset-change-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 = {
    "items": [
        {
            "url": "https://jobs.example.com/1042",
            "title": "Data Engineer",
            "company": "Northwind",
            "location": "Amsterdam",
            "salary_eur": 65000,
        },
        {
            "url": "https://jobs.example.com/1043",
            "title": "Backend Developer (Python)",
            "company": "Contoso",
            "location": "Remote",
            "salary_eur": 58000,
        },
        {
            "url": "https://jobs.example.com/1044",
            "title": "Product Analyst",
            "company": "Fabrikam",
            "location": "Berlin",
            "salary_eur": 52000,
        },
        {
            "url": "https://jobs.example.com/1045",
            "title": "Site Reliability Engineer",
            "company": "Northwind",
            "location": "Rotterdam",
            "salary_eur": 70000,
        },
    ],
    "keyFields": ["url"],
}

# Run the Actor and wait for it to finish
run = client.actor("bosco_labs/dataset-change-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 '{
  "items": [
    {
      "url": "https://jobs.example.com/1042",
      "title": "Data Engineer",
      "company": "Northwind",
      "location": "Amsterdam",
      "salary_eur": 65000
    },
    {
      "url": "https://jobs.example.com/1043",
      "title": "Backend Developer (Python)",
      "company": "Contoso",
      "location": "Remote",
      "salary_eur": 58000
    },
    {
      "url": "https://jobs.example.com/1044",
      "title": "Product Analyst",
      "company": "Fabrikam",
      "location": "Berlin",
      "salary_eur": 52000
    },
    {
      "url": "https://jobs.example.com/1045",
      "title": "Site Reliability Engineer",
      "company": "Northwind",
      "location": "Rotterdam",
      "salary_eur": 70000
    }
  ],
  "keyFields": [
    "url"
  ]
}' |
apify call bosco_labs/dataset-change-monitor --silent --output-dataset

```

## MCP server setup

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