# Website Change Monitor (Text Diff) (`klyve1/website-change-monitor`) Actor

Watch web pages for changes: each run compares the page text with the previous run and returns what was added and removed. Optional CSS selector to watch one part. Schedule it for alerts.

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

## Pricing

from $1.00 / 1,000 page checkeds

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 (Page Text Diff)

Watch web pages and **know exactly what changed**. On each run the Actor loads every page, extracts its visible text (the whole page or only the part matching a **CSS selector**), compares it with the version saved on the previous run, and returns the **lines that were added and removed**. Schedule it every hour or every day and plug it into email, Slack or a webhook to get change alerts.

### Who uses it

- **Competitive and price watch**: competitor pricing pages, product pages, terms and conditions.
- **Compliance and legal teams**: privacy policies, regulations, public tenders, official notices.
- **Recruiters and job seekers**: careers pages of target companies.
- **Developers and SEO**: detect unexpected content changes after a deploy.

### How it works

1. First run: each page is saved as a reference (`firstCheck: true`).
2. Next runs: the new text is compared line by line with the saved one; `changed`, `addedLines` and `removedLines` tell you what moved, then the new version becomes the reference.
3. The history lives in a key-value store of your account (`klyve1-website-change-monitor` by default; if that name cannot be opened, the run still checks the pages and warns you), so it keeps working between scheduled runs.

### Example output

```json
{
  "url": "https://example.com/",
  "ok": true,
  "statusCode": 200,
  "title": "Example Domain",
  "selector": null,
  "firstCheck": false,
  "changed": true,
  "previousCheckedAt": "2026-11-20T18:05:06.468Z",
  "addedLinesCount": 0,
  "removedLinesCount": 1,
  "addedLines": [],
  "removedLines": ["Another old line"],
  "textLength": 156,
  "contentHash": "0a080719be9fbb82a86a45b80dc8c2a430fbe17dc93d23758debac092864d00f",
  "textPreview": "This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.",
  "checkedAt": "2026-11-20T18:05:16.832Z"
}
```

### Input

| Field | What it does | Default |
|---|---|---|
| `urls` | Pages to watch, one per line | |
| `cssSelector` | Only watch this part of the page, e.g. `#price`, `.job-list` | whole body |
| `ignoreSelectors` | Elements removed before comparing (ads, dates, counters) | |
| `outputOnlyChanges` | Write only changed pages (and first checks) to the dataset | false |
| `stateStoreName` | Key-value store holding the last versions | klyve1-website-change-monitor |

### Pricing

Pay per result: **$0.001 per page checked**. Pages that fail to load, are blocked by robots.txt or where the selector matches nothing are free. Watching 10 pages every hour costs about $7 per month.

### Good to know

- The Actor reads the page HTML without a browser, so content built only by JavaScript after loading is not seen. Choose a CSS selector on server-rendered content for the best results.
- Use `ignoreSelectors` to skip parts that change on every visit (timestamps, view counters, rotating banners), otherwise every run reports a change.
- The Actor respects each site's robots.txt and only loads the pages you list (no crawling). Up to 200 added or removed lines are listed per page; the counts are always complete.

# Actor input Schema

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

Page URLs to watch, one per line. Each run compares the visible text of each page with the previous run.

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

Only watch the part of the page matching this CSS selector, e.g. #price, .job-list, main article. Empty = the whole page body.

## `ignoreSelectors` (type: `array`):

CSS selectors of elements to remove before comparing (ads, dates, counters, cookie banners), e.g. .ad, time, #cookie-banner.

## `outputOnlyChanges` (type: `boolean`):

When on, unchanged pages are not written to the dataset (they are still checked and remembered). First checks are always written.

## `stateStoreName` (type: `string`):

Name of the key-value store where the last version of each page is kept. Use a different name per monitoring task if you want separate histories.

## Actor input object example

```json
{
  "urls": [
    "https://news.ycombinator.com/",
    "https://www.apify.com/pricing"
  ],
  "outputOnlyChanges": false,
  "stateStoreName": "klyve1-website-change-monitor"
}
```

# Actor output Schema

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

All rows produced by the run.

# 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://news.ycombinator.com/",
        "https://www.apify.com/pricing"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("klyve1/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://news.ycombinator.com/",
        "https://www.apify.com/pricing",
    ] }

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

```

## MCP server setup

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