# Website Change Monitor — Diff & Alert (Bulk) (`hipersoft/website-change-monitor`) Actor

Watch web pages for changes on a schedule. Extract text from a CSS region, hash and diff against the previous snapshot, and get a change percentage per URL. Trigger n8n/Make/Zapier workflows when a page changes.

- **URL**: https://apify.com/hipersoft/website-change-monitor.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.001 / page checked

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Website Change Monitor — Diff & Alert (Bulk)

**Watch any set of web pages for changes on a schedule and get a clean per-URL diff.** Point it at your URLs, optionally narrow it to a single CSS region, and every run tells you exactly what changed — added lines, removed lines and a change percentage.

### What it does

- **Monitors many URLs at once** — fetches each page and extracts its content.
- **CSS-region watching** — pass a `selector` to track just a price, a status banner or a headline instead of the whole page.
- **Text or HTML mode** — compare visible text (ignores formatting noise) or raw HTML.
- **Snapshots between runs** — the previous state of each URL is stored, so scheduled runs compare against the last check, not a blank slate.
- **Diff + change percentage** — line-level added/removed counts and a `changePct` per URL.
- The first check of a new URL is a **baseline** (`changed: false`); every run after that reports real changes.

### Use cases

- **Get notified when a page changes** — schedule the Actor (e.g. hourly) and trigger an n8n, Make or Zapier workflow whenever `changed` is `true`.
- **Track prices, stock or status pages** — narrow to a CSS region and watch a single value.
- **Competitor & content monitoring** — know when a rival updates pricing, docs or a landing page.
- **Compliance / uptime signals** — detect when terms, policies or published data quietly change.

Typical flow: schedule it, let it store a snapshot on the first run, then fire a workflow on every run where a page changed.

### Running it on a schedule (you do NOT leave it running)

This Actor is **not** an always-on service — each run wakes up, checks your URLs, saves a fresh snapshot, and **exits in seconds**. You only pay for the checks it actually does, never for idle time. State is kept between runs, so the next run always compares against the last one. Set it up once:

1. **Save your URLs as a Task** (Console → the Actor → *Create task*), so you don't re-enter the input each time.
2. **Add a Schedule** (Console → *Schedules* → *Create schedule* → add your Task) and pick a cadence — every 15 min, hourly, daily, whatever fits. That's it: it now runs itself on that interval and remembers each previous snapshot.
3. **Act on changes** — route the runs where a row has `changed: true` to a notification (email/Slack) or another workflow.

**From n8n / Make / Zapier instead:** use a **Schedule / Cron trigger** node to run the Actor on your interval, then branch on `changed === true` to send an alert or kick off the next step. Same idea — the trigger does the timing, the Actor does one quick check per run.

### Input

```json
{
  "urls": ["https://example.com", "https://example.org/pricing"],
  "selector": "#price",
  "mode": "text"
}
```

| Field | Type | Description |
|---|---|---|
| `urls` | array | One or more page URLs to monitor. |
| `selector` | string | Optional CSS selector — monitor only that region (e.g. `#price`, `.status`, `main`). Blank = whole page. |
| `mode` | string | `text` (visible text) or `html` (raw HTML). |

### Output

One dataset row per URL.

```json
{
  "url": "https://example.com",
  "changed": true,
  "changePct": 12.5,
  "addedLines": 3,
  "removedLines": 1,
  "prevHash": "9f2a…",
  "newHash": "c17b…",
  "checkedAt": "2026-08-22T10:00:00.000Z",
  "ok": true
}
```

#### Output schema

| Field | Type | Description |
|---|---|---|
| `url` | string | The page that was checked. |
| `changed` | boolean | Whether the content changed since the last snapshot. |
| `changePct` | number | Percentage of lines added or removed. |
| `addedLines` | integer | Number of lines added. |
| `removedLines` | integer | Number of lines removed. |
| `prevHash` | string | Hash of the previous snapshot (`null` on the first check). |
| `newHash` | string | Hash of the current content. |
| `checkedAt` | string | ISO timestamp of the check. |
| `ok` | boolean | `false` if the URL could not be fetched (with an `error` message). |

### FAQ

**Can I automate it with n8n / Make / Zapier?** Yes — connect it through [integrations on the Apify platform](https://apify.com/integrations) and the [Apify API](https://docs.apify.com/api/v2). Schedule the Actor to run on an interval and trigger your workflow when a row has `changed: true`.

**Does it remember previous runs?** Yes. It stores a snapshot of each URL between runs, so a scheduled run always compares against the last check. The first check of a new URL is a baseline.

**Why did the first run report no change?** The first check of a URL establishes the baseline snapshot, so `changed` is `false`. Changes are reported from the second run onward.

**What if a URL is down?** That URL gets `ok: false` with an `error` and the run still finishes — one bad URL never fails the whole run.

### Notes

Original clean-room implementation.

# Actor input Schema

## `urls` (type: `array`):

One or more page URLs to watch for changes. Each URL is fetched, extracted, hashed and compared against its previous snapshot.

## `selector` (type: `string`):

Optional CSS selector. If set, only the matching region of each page is monitored (e.g. '#price', '.status', 'main'). Leave blank to monitor the whole page body.

## `mode` (type: `string`):

Compare the visible text (ignores markup/formatting noise) or the raw HTML of the monitored region.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "mode": "text"
}
```

# Actor output Schema

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

The results as dataset items.

# 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 = {
    "urls": [
        "https://example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/website-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 = { "urls": ["https://example.com"] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/website-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 '{
  "urls": [
    "https://example.com"
  ]
}' |
apify call hipersoft/website-change-monitor --silent --output-dataset

```

## MCP server setup

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