# Website Change Detector & Diff API (`industrial_platform/web-change-intelligence`) Actor

Detect page changes and deterministic diffs. Price: $0.01 per successful comparison.

- **URL**: https://apify.com/industrial\_platform/web-change-intelligence.md
- **Developed by:** [Gavin Coates](https://apify.com/industrial_platform) (community)
- **Categories:** AI, Developer tools, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.01 / page comparison

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 Detector & Diff API

Deterministic website change detection for AI agents and automated workflows.

Use this Actor when a machine needs to answer **did this public web page change?** It can capture a baseline, compare a previous SHA-256 hash for a compact changed/unchanged result, or compare previous normalized text for deterministic diff excerpts and change metrics.

**Actor:** `industrial_platform/web-change-intelligence`

### Price

**$0.01 per successful page comparison** using the `page-comparison` pay-per-event billing event.

A failed fetch or failed comparison does not produce the successful comparison event.

Examples:

- 1 comparison: $0.01
- 100 comparisons: $1.00
- 1,000 comparisons: $10.00

### Good uses

- website change detector
- price-page monitoring
- stock or availability changes
- documentation changes
- policy or terms changes
- competitor-page monitoring
- compact hash-based change checks
- deterministic text diffs

### Input

Baseline:

```json
{
  "url": "https://example.com/"
}
```

Hash comparison:

```json
{
  "url": "https://example.com/",
  "previous_hash": "previous-current-hash",
  "include_current_text": false
}
```

Detailed text comparison:

```json
{
  "url": "https://example.com/",
  "previous_text": "previous normalized text",
  "selector": "main",
  "ignore_selectors": [".clock", ".rotating-banner"]
}
```

### Output

Results can include `changed`, `comparison_status`, `current_hash`, normalized text, added/removed excerpts, change ratio, HTTP metadata, title, final URL, and fetch timing.

### Comparison behavior

- `baseline`: no previous text/hash was supplied.
- `hash`: compact changed/unchanged comparison.
- `text`: deterministic text-diff comparison.
- Keep selector, ignore selectors, and text-length settings consistent between repeated checks.

### Limits and security

- public HTTP/HTTPS only
- private/local/link-local/reserved targets blocked
- redirect targets revalidated
- response size bounded
- request timeout bounded
- static HTTP content only; client-side JavaScript is not executed

### MCP

The Actor is available through Apify's hosted MCP server and the Industrial Platform MCP portfolio. Its required input is `url`.

# Actor input Schema

## `url` (type: `string`):

Public http:// or https:// URL to inspect.

## `previous_text` (type: `string`):

Optional current\_text returned by a previous run. When provided, the Actor returns deterministic added/removed excerpts and change metrics.

## `previous_hash` (type: `string`):

Optional current\_hash from a previous run. Use this for compact changed/unchanged checks when a detailed diff is not required.

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

Optional CSS selector that restricts monitoring to a specific part of an HTML page, such as main, #pricing, or .inventory.

## `ignore_selectors` (type: `array`):

Optional HTML selectors to remove before comparison, useful for clocks, rotating banners, ads, or other volatile regions.

## `include_current_text` (type: `boolean`):

Return current\_text so a later run can perform a detailed text comparison.

## `max_text_chars` (type: `integer`):

Maximum characters retained before hashing and comparison. Keep this value consistent across repeated checks.

## `max_diff_chars` (type: `integer`):

Maximum length returned for each added/removed excerpt.

## `timeout_seconds` (type: `integer`):

Maximum time allowed for the target request.

## Actor input object example

```json
{
  "url": "https://example.com/",
  "ignore_selectors": [],
  "include_current_text": true,
  "max_text_chars": 100000,
  "max_diff_chars": 12000,
  "timeout_seconds": 30
}
```

# Actor output Schema

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

The default dataset containing the comparison result.

## `result` (type: `string`):

The same result stored as OUTPUT in the default key-value store.

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

// Run the Actor and wait for it to finish
const run = await client.actor("industrial_platform/web-change-intelligence").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 = { "url": "https://example.com/" }

# Run the Actor and wait for it to finish
run = client.actor("industrial_platform/web-change-intelligence").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 '{
  "url": "https://example.com/"
}' |
apify call industrial_platform/web-change-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,industrial_platform/web-change-intelligence"
        }
    }
}
```

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/evOPxF0aZJhyq50wB/builds/602JiLi8zB5RPgDlY/openapi.json
