# Website Change Monitor – Text Diff, Links & Status Alerts (`adamplaenitz/website-change-monitor`) Actor

Watch a list of web pages (or a CSS selector per page) and see what changed since the last run: added and removed lines as a unified diff, change ratio, HTTP status changes, new and removed links. First run creates the baseline. Ignore patterns and change threshold.

- **URL**: https://apify.com/adamplaenitz/website-change-monitor.md
- **Developed by:** [Adam Plänitz](https://apify.com/adamplaenitz) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 12.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 url 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

## Website Change Monitor – Text Diff, Links & Status Alerts

**Watch a list of web pages and find out exactly what changed since the last run: added and removed lines as a unified diff, the share of changed lines, HTTP status changes and – optionally – new and removed links.** Watch the whole main content or only the part you care about with a CSS selector. Run it on a schedule and send the changes to e-mail, Slack, Google Sheets, Make, Zapier, n8n or a webhook.

### What does it do?

- **First run = baseline.** Every URL is reported as `new` and its text is stored. From the second run on, each URL is compared with the stored version.
- **Readable diffs.** For changed pages you get the added and removed lines, a unified diff (truncated to a configurable length) and a `changeRatio` (changed lines ÷ all lines of both versions, 0–1).
- **Focus on what matters.** Without a selector the *main content* is compared (`<main>`, the single `<article>`, or the page without header, navigation and footer), which avoids alarms caused by menus or cookie banners. Add a CSS selector to watch only a price, a table or a job list: `https://example.com/pricing #plans`.
- **Fewer false alarms.** Ignore patterns (regular expressions) remove timestamps, dates or counters before comparing. A minimum change threshold suppresses tiny edits – they are not saved as the new baseline, so small changes add up until they cross the threshold.
- **Status and links.** HTTP status changes (e.g. `200 → 404`) are reported as a change. With *Track links* on, new and removed links inside the monitored content are listed too.
- **Two output modes.** *All URLs with status* (default) gives one row per URL – good for reports and dashboards. *Only changes* outputs rows only for new, changed or failed URLs – ideal for alerts with the "new dataset item" integrations. A URL that keeps failing (e.g. a selector that no longer matches) is reported on every run until it is fixed.
- **Separate watch lists.** The state is stored per watch list name, so several tasks (competitor pricing, terms of service, job pages …) can run side by side.

### Who is it for?

- **SEO and marketing teams** watching competitor pages, landing pages, pricing and product pages.
- **Website owners and agencies** checking that important pages stay online and unchanged (legal notices, terms, banners).
- **Researchers, buyers and compliance teams** tracking policy pages, tender or job listings, documentation and changelogs.

### Input

| Field | Example |
|---|---|
| Pages to monitor | `https://example.com/pricing #plans`, `https://example.com/terms` |
| Watch list name | `competitor-pricing` |
| Output | All URLs with status / Only changes |
| CSS selector for all URLs | `main article` (optional) |
| Content without selector | Main content / Whole page |
| Ignore text matching | `\d{1,2}:\d{2}`, `\d+ (views\|comments)` |
| Minimum change (%) | `0` |
| Track added / removed links | off |
| Include current text | off |
| Maximum diff lines | `200` |
| Reset baseline | off |

Tip: create one **task** per watch list and add a **schedule** (e.g. daily). Then connect an integration (e-mail, Slack, webhook) to the task's dataset – with *Only changes* you are notified only when something changed.

### Output example (shortened)

```json
{
  "url": "https://example.com/pricing",
  "selector": "#plans",
  "status": "changed",
  "changeTypes": ["content"],
  "statusCode": 200,
  "previousStatusCode": 200,
  "title": "Pricing – Example",
  "lineCount": 14,
  "changeRatio": 0.0714,
  "addedLineCount": 1,
  "removedLineCount": 1,
  "addedLines": ["Pro $35 per month"],
  "removedLines": ["Pro $29 per month"],
  "diff": "@@ -3,5 +3,5 @@\n Basic\n $9 per month\n-Pro $29 per month\n+Pro $35 per month\n Enterprise",
  "contentHash": "5f0c…",
  "previousContentHash": "a91e…",
  "checkedAt": "2026-11-12T08:00:03.120Z",
  "previousCheckedAt": "2026-11-11T08:00:02.871Z",
  "lastChangedAt": "2026-11-12T08:00:03.120Z",
  "watchListName": "competitor-pricing"
}
```

`status` is `new` (first check, baseline created), `changed`, `unchanged` or `error`. `changeTypes` lists `content`, `status` and/or `links`. Error rows contain `errorType` (`dns`, `timeout`, `ssl`, `connection`, `selector-not-found`, `invalid-selector`, `invalid-url`) and `errorMessage`; the stored baseline is kept when a check fails. Pages that answer with an HTTP error (e.g. 404) are reported with that status code; their content is not compared and the last good content stays the baseline.

### Pricing and speed

See the **Pricing** tab. You pay per URL check – in both output modes, because every URL is fetched and compared. Checks that fail (DNS, timeout, selector not found, invalid URL) are free. A check takes about one second per page; up to 5 pages are fetched in parallel (max. 2 per website).

### Data source, robots.txt and privacy

- The Actor fetches the pages you list, one request per page and run, with the User-Agent `website-change-monitor/0.1 (Apify Actor)`. **Only monitor pages you are allowed to access**, respect the website's terms, and do not schedule more often than needed.
- **No personal data is extracted.** The text of the monitored content is stored only in your own Apify account – in the run's dataset and in the named key-value store `website-change-monitor-state` (one record per URL and watch list). State of URLs that have not been part of a watch list for 180 days is deleted automatically. If you monitor pages that contain personal data, you are responsible for that data.

### Limits

- **Static HTML only (v0.1):** the page is fetched without a browser. Content that is rendered by JavaScript after loading (many single-page apps, some shops and dashboards) is not visible – a selector for such content will report `selector-not-found`. Pages behind a login are not supported.
- PDFs and other binary files are compared by their hash only (changed / unchanged, no text diff). Plain-text and JSON responses are compared line by line.
- Very large pages are capped at 20,000 lines; very different versions use an approximate diff (marked `diffApproximate: true`).
- Some websites block requests from cloud servers – use a proxy in the input if needed.

Questions or feature requests? Please open an issue in the **Issues** tab.

# Actor input Schema

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

One URL per line. To watch only part of a page, add a CSS selector after a space, e.g. `https://example.com/pricing #plans`. Without a selector the main text content is compared (or the whole page, see below).

## `watchListName` (type: `string`):

The previous state is remembered per watch list. Use a different name for every task or schedule (letters, digits, dashes), e.g. `competitor-pricing`.

## `outputMode` (type: `string`):

All URLs: one row per URL with its status (new / changed / unchanged / error) – good for reports. Only changes: rows only for new, changed or failed URLs – good for alerts (e-mail, Slack, webhooks on new dataset items).

## `cssSelector` (type: `string`):

Optional. Compare only the elements matching this selector on every page (a selector written after a URL takes precedence), e.g. `main article` or `.price`.

## `contentScope` (type: `string`):

Main content: the <main>/article area, or the page without header, navigation and footer – fewer false alarms. Whole page: all visible text of the body.

## `ignorePatterns` (type: `array`):

Optional regular expressions (case-insensitive). Matching text is removed before comparing, e.g. timestamps `\d{1,2}:\d{2}(:\d{2})?`, dates `\d{4}-\d{2}-\d{2}` or counters `\d+ (views|comments)`.

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

Report content changes only if at least this share of lines changed (0 = every change). Smaller changes are not saved as the new baseline, so they add up until they cross the threshold.

## `trackLinks` (type: `boolean`):

Also compare the links (href) inside the monitored content and report new and removed links.

## `includeContent` (type: `boolean`):

Adds the current text of the monitored content (up to 50,000 characters) to each row.

## `maxDiffLines` (type: `integer`):

The unified diff in each row is truncated after this many lines.

## `resetBaseline` (type: `boolean`):

Forget the stored state of these URLs and report them as new.

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

Time to wait for each page (one retry on timeouts and server errors).

## `proxyConfiguration` (type: `object`):

Optional. Only needed if a website blocks requests from cloud servers.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://crawlee.dev"
  ],
  "watchListName": "default",
  "outputMode": "all",
  "contentScope": "main",
  "minChangePercent": 0,
  "trackLinks": false,
  "includeContent": false,
  "maxDiffLines": 200,
  "resetBaseline": false,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One item per monitored URL (or only new/changed/failed URLs in 'only changes' mode) with status, diff and change ratio.

## `summary` (type: `string`):

Counts of new, changed, unchanged and failed URLs for the watch list.

# 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",
        "https://crawlee.dev"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("adamplaenitz/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",
        "https://crawlee.dev",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("adamplaenitz/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",
    "https://crawlee.dev"
  ]
}' |
apify call adamplaenitz/website-change-monitor --silent --output-dataset

```

## MCP server setup

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