# AI Website Change Intelligence (`gifted_wagon/ai-website-change-intelligence`) Actor

Turn noisy website snapshots into meaningful pricing, product, availability, legal, contact, and structural change alerts with importance, confidence, and before/after evidence—no AI key required.

- **URL**: https://apify.com/gifted\_wagon/ai-website-change-intelligence.md
- **Developed by:** [Michael Olmos](https://apify.com/gifted_wagon) (community)
- **Categories:** Automation, Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.00 / 1,000 page change analyzeds

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/platform/actors/running/actors-in-store#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

## AI Website Change Intelligence

Monitor public pages without drowning in cookie banners, timestamps, duplicate text, and raw line diffs. This Actor deterministically normalizes each page, saves a stateful baseline, classifies meaningful content and structural changes, and returns importance, confidence, alerts, and before/after evidence. The MVP does not call an external AI model and requires no API key.

### What you get

- Meaningful `content-added`, `content-removed`, and `content-modified` events.
- Heading, link, and form-structure changes.
- Pricing, product, availability, legal, contact, or general classification.
- A 0–100 importance score, confidence score, severity, bounded alerts, and evidence.
- Default suppression for scripts, styles, cookie UI, duplicate lines, generated timestamps, hashes, and copyright-year churn.
- A persistent baseline in your named key-value store for scheduled runs.

### Input options

Use any combination of:

- `targets[].url` for a public HTTP or HTTPS page.
- `targets[].currentContent` plus optional `previousContent` for private, local, or already-fetched HTML/text.
- `datasetId` for a dataset containing the same target fields.
- No input for the built-in before/after product-page sample.

Per-page `ignoreSelectors` and `noisePatterns` handle known dynamic widgets. `sensitivity` controls how readily removed and added lines are paired as one modification. `includeEvidenceText: false` removes full normalized text while retaining per-change snippets.

### Stateful behavior

The first successful URL check creates a `baseline`. A later check returns `unchanged` or `changed`. Supplying `previousContent` performs an immediate comparison and takes precedence over stored state. `resetBaseline` replaces state without turning the replacement into an alert. State is updated only after a successful output record and successful pay-per-event charge.

### Charging and failure safety

A one-time `$0.0004` Actor-start event covers measured platform startup and URL-safety validation. The primary `page-change-analyzed` event is charged only after a page is fetched or accepted inline, normalized, compared, and prepared as a useful result. Invalid URLs, blocked private-network targets, HTTP errors, oversized responses, empty pages, and other failed pages return dataset diagnostics with no value-event charge. The `OUTPUT` summary is written separately and uncharged. The Actor checks the run's PPE budget before work and stops cleanly when the event limit is reached.

### Network and privacy safety

HTTP fetching is bounded by time, response size, content type, and five redirects. Every initial URL and redirect is revalidated. Localhost plus private, loopback, link-local, carrier-grade NAT, benchmarking, multicast, reserved IPv4, unique-local IPv6, and link-local IPv6 destinations are rejected. URL mode reads a public page; inline mode lets you avoid network access. Normalized evidence and snapshots are stored in your Apify storage—use a private run and disable evidence text when content is sensitive.

### Output

Each dataset row contains status, page identity, source, fingerprint, `change`, `evidence`, warnings, error, pricing model, and `valueEvent`. `change.details` contains typed before/after evidence. `change.alerts` contains only changes scoring at least 75. `OUTPUT` contains uncharged run counts and budget status.

### Limitations

This HTTP-first MVP does not execute client-side JavaScript, log in, bypass bot defenses, or interpret images. Deterministic semantic heuristics are transparent and inexpensive but may miss paraphrases or personalized content. Verify evidence before consequential action. Only monitor pages you are allowed to access and follow applicable terms, privacy rules, and laws.

### Local verification

```bash
npm install
npm run typecheck
npm test
npm run build
npm run benchmark
npm run launch:verify
```

# Actor input Schema

## `targets` (type: `array`):

Each item needs a public URL or currentContent. Supply previousContent for an immediate diff; otherwise the first successful run creates a baseline.

## `datasetId` (type: `string`):

Optional dataset containing the same fields as each target.

## `maxPages` (type: `integer`):

Maximum targets attempted across inline and dataset sources.

## `timeoutSecs` (type: `integer`):

Maximum duration for each HTTP request.

## `maxContentBytes` (type: `integer`):

Maximum downloaded response size per page.

## `sensitivity` (type: `number`):

Higher values require stronger similarity before a removed and added line are classified as one modification.

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

Named key-value store that preserves baselines across runs.

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

Replace existing stored baselines without emitting a change alert.

## `includeEvidenceText` (type: `boolean`):

Disable when structured before/after snippets alone are sufficient.

## Actor input object example

```json
{
  "targets": [
    {
      "url": "https://www.example.com/",
      "label": "Example homepage",
      "tags": [
        "homepage"
      ]
    }
  ],
  "maxPages": 25,
  "timeoutSecs": 20,
  "maxContentBytes": 2000000,
  "sensitivity": 0.55,
  "stateStoreName": "ai-website-change-intelligence-state",
  "resetBaseline": false,
  "includeEvidenceText": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

Meaningful content and structural changes, scores, alerts, and evidence.

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

Uncharged counts, source, baseline store, budget status, and limitations. Saving this record never triggers a value event.

# 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 = {
    "targets": [
        {
            "url": "https://www.example.com/",
            "label": "Example homepage",
            "tags": [
                "homepage"
            ]
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gifted_wagon/ai-website-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 = { "targets": [{
            "url": "https://www.example.com/",
            "label": "Example homepage",
            "tags": ["homepage"],
        }] }

# Run the Actor and wait for it to finish
run = client.actor("gifted_wagon/ai-website-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 '{
  "targets": [
    {
      "url": "https://www.example.com/",
      "label": "Example homepage",
      "tags": [
        "homepage"
      ]
    }
  ]
}' |
apify call gifted_wagon/ai-website-change-intelligence --silent --output-dataset

```

## MCP server setup

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