# Data Change Monitor: Alerts for Prices, Stock & Any Scraper (`ingeniela/data-change-monitor`) Actor

Re-run any Actor or task on a schedule and get only what changed since the last run: new items, removed items and field changes like price, stock, followers or rating. Alerts by webhook or email.

- **URL**: https://apify.com/ingeniela/data-change-monitor.md
- **Developed by:** [Ingeniela](https://apify.com/ingeniela) (community)
- **Categories:** Automation, E-commerce, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 monitor checks

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

## Data Change Monitor: Alerts for Prices, Stock and Any Scraper

Watch any scraped data and get told only what changed. Point it at an Actor (with its input), a saved task or a dataset. Schedule it, and each run compares the results with the previous run: new items, removed items, and every field that changed, such as a price, a follower count, a rating or stock. Alerts go to a webhook (Slack, Make, Zapier, n8n) or by email, after every run or as one **daily digest**, and every change can be added as a row to a **Google Sheet**. Start in seconds with a **ready template**: Amazon prices, Instagram, TikTok or YouTube followers, Google Maps ratings or website text.

> 🔁 Schedule it daily (or hourly) and you only hear about what changed: new, removed and changed items, in one digest by email or webhook.

![The alert and the change list from a real run: two new pages found on the second run](https://api.apify.com/v2/key-value-stores/RXaOr7FspyrQ4JP88/records/data-change-monitor-alert-example.png)

*Real run on Apify watching docs.apify.com through Website Content Crawler. The first run saved the snapshot; the second found the 2 pages that were new. The text in the box is exactly what the webhook and the email contain.*

### Tutorial (1 minute)

![Step-by-step tutorial: what to fill in, click Start, the real result and the price](https://api.apify.com/v2/key-value-stores/RXaOr7FspyrQ4JP88/records/data-change-monitor-tutorial.gif)

*The change rows in the tutorial show the output format; the run itself was tested on Apify with the Amazon template.*

### Ready templates

Pick a template, paste the targets, schedule it. Each template collects the data for that site at the lowest cost and compares the right fields.

| Template | Targets | Compares | Data collection (about) |
|---|---|---|---|
| Amazon prices and stock | ASINs or product links | price, list price, stock, seller, coupon, discount, rating | US$0.0025 per product |
| Instagram followers and bio | usernames or links | followers, following, posts, bio, link | US$0.0026 per profile |
| TikTok followers and likes | usernames or links | followers, likes, videos, bio | US$0.003 per profile |
| YouTube subscribers | channel links or @handles | subscribers, total views, videos, name | US$0.0013 per channel |
| Google Maps rating | place links | rating, number of reviews, open/closed, phone, website, hours | US$0.004 per place |
| Website text | page links | page text, title, description | platform usage only |

```json
{ "template": "amazon-prices", "targets": ["B077Z99YGY", "https://www.amazon.com/dp/B0CHX1W1XY"], "minChangePercent": 2,
  "notifyEmail": "me@example.com" }
```

Prices written as text (`"$19.99"`, `"19,99"`) are compared as numbers, so you get the percent change.

### Daily digest

Set **When to notify** to *One digest per period*. Schedule the monitor as often as you like (every hour, for example). Changes are collected and sent once per period (24 hours by default, 168 for weekly) in one message.

### Google Sheets

Every change can be added as a row to your own Google Sheet. No API keys, about 2 minutes:

1. Open the sheet and choose **Extensions > Apps Script**.
2. Replace the code with this and save:

```javascript
function doPost(e) {
  var body = JSON.parse(e.postData.contents);
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName(body.sheet) || ss.insertSheet(body.sheet);
  if (sheet.getLastRow() === 0) sheet.appendRow(body.columns);
  if (body.rows.length) {
    sheet.getRange(sheet.getLastRow() + 1, 1, body.rows.length, body.columns.length).setValues(body.rows);
  }
  return ContentService.createTextOutput(JSON.stringify({ ok: true, added: body.rows.length }))
    .setMimeType(ContentService.MimeType.JSON);
}
```

3. Click **Deploy > New deployment**, type **Web app**, *Execute as*: Me, *Who has access*: Anyone. Authorize it.
4. Copy the web app URL (it ends in `/exec`) into **Google Sheets web app URL**.

Columns: detectedAt, monitorName, changeType, title, field, before, after, changePercent, url, itemId.

### Use cases

- Competitor prices and stock (any e-commerce scraper).
- New Google Maps reviews or rating drops for your business.
- Follower and engagement changes on competitor Instagram or TikTok profiles.
- New job posts, new listings (Zillow, Airbnb), new ads in the Facebook Ad Library.
- Content changes on web pages (Website Content Crawler).

### Input example

```json
{
  "monitorName": "competitor-prices",
  "sourceActorId": "apify/e-commerce-scraping-tool",
  "sourceInput": { "startUrls": [{ "url": "https://competitor.com/collections/serums" }] },
  "idFields": ["url"],
  "compareFields": ["price", "inStock"],
  "minChangePercent": 2,
  "webhookUrl": "https://hooks.slack.com/services/...",
  "notifyEmail": "me@company.com"
}
```

Then create a **Schedule** in Apify Console (for example every day at 8:00) that runs this Actor with this input.

### Output (one row per change)

```json
{
  "changeType": "changed",
  "title": "Sérum Vitamina C 30 ml",
  "field": "price",
  "before": 24.9,
  "after": 19.9,
  "changePercent": -20.08,
  "url": "https://competitor.com/products/serum-c",
  "detectedAt": "2026-11-06T08:00:12Z"
}
```

`changeType` is `added`, `removed` or `changed`. A run with nothing to report adds one free status row instead (`baseline` on the first run, `no-changes` afterwards), so you can always see that the check ran. The `SUMMARY` record has the counts and a readable text version, which is also what the webhook and the email contain.

### How it works

- **First run**: saves a baseline snapshot and reports nothing.
- **Next runs**: compares with the last snapshot, then replaces it.
- Snapshots live in the named key-value store `change-monitor-state`, one per **Monitor name**, so several monitors can share this Actor.
- Timestamps (`scrapedAt`, `updatedAt`…) are ignored automatically. Add your own noisy fields to **Fields to ignore**.
- A source that returns 0 items is treated as a broken scrape: the run fails and the snapshot is kept, unless you allow empty results.

### How to use it

1. Find the Actor whose results you want to watch (for example a price, profile or reviews scraper) and copy its ID, such as `apify/instagram-profile-scraper`, into **Actor to run**.
2. Paste the input you would give that Actor into **Input for that Actor**.
3. In **Item ID fields**, say what identifies one item (usually `url`, `id` or `username`). In **Fields to compare**, list what you care about (`price`, `followersCount`…), or leave it empty to compare everything.
4. Add a **Webhook URL** (Slack, Make, Zapier, n8n) or an **Email**.
5. Run it once to save the baseline. Then create a **Schedule** in Apify Console (Schedules → Create) that runs this Actor with the same input every day or hour.

### Pricing

| Event | Price | When |
| --- | --- | --- |
| `monitor-check` | US$0.01 | Each comparison run |
| `change-detected` | US$0.001 | Each change row |

**Example:** a daily check that finds 20 changes a day costs about US$0.03 a day, under US$1 a month, plus the source Actor's own usage. The source Actor and the email Actor are billed separately on your account.

### FAQ

**Why did the first run report nothing?** The first run only saves the snapshot to compare against. Changes start from the second run.

**Can I watch several things?** Yes. Use a different **Monitor name** for each; every name keeps its own snapshot.

**I get too many small changes.** Set **Ignore number changes smaller than (%)**, add noisy fields to **Fields to ignore**, or list only the fields you care about in **Fields to compare**.

**Can it watch any website?** Yes: pick the **Website text** template and paste the pages you care about.

### Development

```bash
python -m pytest tests -q
python scripts/smoke_test.py ./tmp-smoke
apify push
```

# Actor input Schema

## `template` (type: `string`):

Pick a ready-made monitor and paste the targets below, or choose Custom to watch any Actor. Templates collect each site at the lowest cost and already know which fields to compare.

## `targets` (type: `array`):

One per line. Amazon: ASINs or product links. Instagram / TikTok: usernames or profile links. YouTube: channel links or @handles. Google Maps: place links. Website: page links.

## `amazonDomain` (type: `string`):

Marketplace for ASINs.

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

A name for this watch, e.g. 'competitor-prices'. Each name keeps its own last snapshot, so use one name per thing you monitor. Empty with a template = the template name.

## `sourceActorId` (type: `string`):

Custom template only. ID of any Actor whose results you want to watch (from Apify Store or your own). It runs on your account each time.

## `sourceInput` (type: `object`):

Exactly the input you would give the Actor yourself.

## `sourceTaskId` (type: `string`):

ID or name of a saved Apify task (username~task-name). Used instead of the Actor above.

## `sourceDatasetId` (type: `string`):

Compare a dataset that something else already filled (no Actor is run).

## `sourceMaxCostUsd` (type: `integer`):

Optional limit for the Actor or task this monitor starts.

## `maxItems` (type: `integer`):

Items beyond this number are ignored.

## `idFields` (type: `array`):

Field(s) that identify an item across runs, e.g. url, id, sku, username. Dots for nested fields (author.id). Empty: the item's URL or id is used.

## `compareFields` (type: `array`):

Only watch these fields, e.g. price, followersCount, rating. Empty: compare every field.

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

Fields that change on every run and are not news (timestamps are ignored already).

## `minChangePercent` (type: `integer`):

E.g. 5 ignores a follower count moving from 10,000 to 10,200.

## `reportAdded` (type: `boolean`):

Items that were not there last time.

## `reportRemoved` (type: `boolean`):

Items that disappeared since last time.

## `allowEmpty` (type: `boolean`):

Off: a run with 0 items is treated as a failed scrape and the last snapshot is kept.

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

We POST a JSON summary here when something changed (Slack/Make/Zapier/n8n incoming webhooks work).

## `notifyEmail` (type: `string`):

Send the summary by email. Comma-separate several addresses.

## `notifyWhenNoChanges` (type: `boolean`):

Useful as a daily 'all good' heartbeat.

## `notifyMode` (type: `string`):

With a digest you can check often (for example every hour) and still get one message a day with all changes.

## `digestHours` (type: `integer`):

24 = daily, 168 = weekly.

## `googleSheetsWebhookUrl` (type: `string`):

Optional. Every change is appended as a row. Paste the URL of the small Apps Script from the README (2 minutes, no API keys).

## `googleSheetName` (type: `string`):

Tab where rows are added. It is created if missing.

## Actor input object example

```json
{
  "template": "amazon-prices",
  "targets": [
    "B077Z99YGY"
  ],
  "amazonDomain": "amazon.com",
  "monitorName": "default",
  "sourceActorId": "apify/website-content-crawler",
  "sourceInput": {
    "startUrls": [
      {
        "url": "https://docs.apify.com/academy/web-scraping-for-beginners"
      }
    ],
    "maxCrawlPages": 5,
    "maxCrawlDepth": 0
  },
  "maxItems": 100000,
  "idFields": [
    "url"
  ],
  "minChangePercent": 0,
  "reportAdded": true,
  "reportRemoved": true,
  "allowEmpty": false,
  "notifyWhenNoChanges": false,
  "notifyMode": "each-run",
  "digestHours": 24,
  "googleSheetName": "Changes"
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "template": "amazon-prices",
    "targets": [
        "B077Z99YGY"
    ],
    "sourceActorId": "apify/website-content-crawler",
    "sourceInput": {
        "startUrls": [
            {
                "url": "https://docs.apify.com/academy/web-scraping-for-beginners"
            }
        ],
        "maxCrawlPages": 5,
        "maxCrawlDepth": 0
    },
    "idFields": [
        "url"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ingeniela/data-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 = {
    "template": "amazon-prices",
    "targets": ["B077Z99YGY"],
    "sourceActorId": "apify/website-content-crawler",
    "sourceInput": {
        "startUrls": [{ "url": "https://docs.apify.com/academy/web-scraping-for-beginners" }],
        "maxCrawlPages": 5,
        "maxCrawlDepth": 0,
    },
    "idFields": ["url"],
}

# Run the Actor and wait for it to finish
run = client.actor("ingeniela/data-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 '{
  "template": "amazon-prices",
  "targets": [
    "B077Z99YGY"
  ],
  "sourceActorId": "apify/website-content-crawler",
  "sourceInput": {
    "startUrls": [
      {
        "url": "https://docs.apify.com/academy/web-scraping-for-beginners"
      }
    ],
    "maxCrawlPages": 5,
    "maxCrawlDepth": 0
  },
  "idFields": [
    "url"
  ]
}' |
apify call ingeniela/data-change-monitor --silent --output-dataset

```

## MCP server setup

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