# Competitor Price & Page Change Monitor with Alerts (`lmhsolutions/website-change-monitor`) Actor

Returns changed, unifiedDiff, addedLines/removedLines, addedLinks/removedLinks, oldSha256/newSha256, and an Ed25519-signed receipt per URL. Watch competitor pricing, product, and landing pages. First check and failed fetches free. $0.003/check, $0.02/change.

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

## Pricing

from $3.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

## Competitor Price & Page Change Monitor with Alerts

**Output fields per URL:** `changed`, `unifiedDiff`, `addedLines`, `removedLines`, `addedLinks`, `removedLinks`, `oldSha256`, `newSha256`, `title`, `finalUrl`, `checkedAt`, `status`, `error`, `chargedEvents`, and an **Ed25519-signed `receipt`** over old/new/diff hashes.

Watch competitor **pricing**, product, and landing pages (or any public URL). Stores the last text snapshot, returns a unified text diff plus added/removed links, and signs a change receipt. Built for AI agents, schedules, SEO and competitive intel — not just a boolean flag.

### Why use it

- **$0.003 per successful repeat check** (`page-checked`). **$0.02 when content changed** (`change-detected`, includes the signed diff).
- **First check of each URL is free** (baseline snapshot only).
- **Failed fetches are free** (DNS error, HTTP 4xx/5xx, not HTML, SSRF-blocked).
- **Bad / empty input does not crash** — returns a helpful error item and exits successfully (free).
- Accepts `urls`, `startUrls`, or a single `url` string (common Apify / agent shapes).
- **Named KV store** `change-monitor-snapshots` keeps the last snapshot across runs — schedule it on Apify Schedules.
- **Optional CSS selector** to watch only a region (e.g. `#price`, `.product-price`).
- **Ignore regexes** to strip timestamps, counters and ads before hashing.
- **Signed proof.** Receipt domain `website-change-monitor-receipt-v1`; same production Ed25519 key as LMH Solutions' other Actors (`p2j-JX8i4uxGCZqSSDrd`).
- **Plain HTTP, no browser.** Fast and cheap to run.

### Ready-to-run example input

```json
{
  "urls": ["https://example.com", "https://example.com/pricing"],
  "ignoreRegexes": ["Updated \\d+:\\d+", "\\d+ comments"]
}
```

### Output (one item per URL)

```json
{
  "url": "https://example.com/pricing",
  "finalUrl": "https://example.com/pricing",
  "title": "Pricing",
  "changed": true,
  "firstCheck": false,
  "oldSha256": "…",
  "newSha256": "…",
  "addedLines": 2,
  "removedLines": 1,
  "unifiedDiff": "@@\n-old line\n+new line\n",
  "addedLinks": ["https://example.com/new"],
  "removedLinks": [],
  "checkedAt": "2026-11-09T12:00:00.000Z",
  "status": "ok",
  "error": null,
  "chargedEvents": ["page-checked", "change-detected"],
  "receipt": {
    "v": 1,
    "url": "https://example.com/pricing",
    "oldSha256": "…",
    "newSha256": "…",
    "diffSha256": "…",
    "changed": true,
    "checkedAt": "2026-11-09T12:00:00.000Z",
    "alg": "Ed25519",
    "keyId": "p2j-JX8i4uxGCZqSSDrd",
    "domain": "website-change-monitor-receipt-v1",
    "signature": "…"
  }
}
```

Failed URLs return `{ "url", "status": "failed", "error", "chargedEvents": [] }` and are **not charged**.

### Pricing

Pay per event:
| Event | Price (FREE plan) | When |
|---|---|---|
| `page-checked` | $0.003 | Successful non-first check |
| `change-detected` | $0.02 | Content changed (includes signed diff) |
| `apify-actor-start` | $0.00005 | Apify synthetic start |

First check of a URL and every failed fetch are **free**.

### Use cases

- Competitor price and packaging page monitoring
- Detect copy or feature changes on rival landing pages
- Poll a status / winners / listings page for agents that have no webhook
- Watch terms, rules or submit pages and get a signed proof of what changed
- Feed diffs into Slack / email / another Actor via Apify integrations

### Notes

- Snapshots live in the named key-value store `change-monitor-snapshots` (shared across runs of this Actor on your account).
- Text is normalized (whitespace collapsed, blank lines dropped, ignore-regex matches stripped) before hashing.
- Only public http(s) URLs; private/metadata destinations are blocked (SSRF guard).

# Actor input Schema

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

Absolute http(s) URLs (or bare domains) to check for content changes. Also accepts startUrls or a single url string. Each URL is compared to its last stored snapshot. Empty/invalid input returns a helpful error item and succeeds (free) instead of crashing.

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

If set, only text inside matching elements is hashed and diffed (linkedom querySelectorAll). If empty, Readability main content (or main/article/body) is used.

## `ignoreRegexes` (type: `array`):

JavaScript regex patterns (as strings) stripped from each line before hashing/diffing. Use for timestamps, counters, ads. Example: Updated \d+:\d+

## `maxConcurrency` (type: `integer`):

URLs processed in parallel.

## `startUrls` (type: `array`):

Optional Apify-style alias for urls. Same effect as urls. Use either field.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://example.com/pricing"
  ],
  "maxConcurrency": 5
}
```

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

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

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

```

## MCP server setup

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