# Competitor Change Monitor API (`s3nafps/competitor-change-monitor-api`) Actor

Detect meaningful text changes on public competitor pages between Apify actor runs.

- **URL**: https://apify.com/s3nafps/competitor-change-monitor-api.md
- **Developed by:** [mohamed senator](https://apify.com/s3nafps) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.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 Change Monitor API

Detect meaningful text changes on public competitor pages between Actor runs.

### What this Actor does

Competitor Change Monitor API fetches public pages, extracts main text, stores snapshots in Apify Key-Value Store, compares later runs against the previous snapshot, and saves structured change records to the Apify Dataset.

The first run creates a baseline. Later runs can report added text, removed text, change score, keywords, and likely change types.

### Use cases

- Monitor competitor pricing pages.
- Watch changelogs and docs for product updates.
- Track public legal, policy, blog, and marketing page edits.
- Feed structured change records into Slack, dashboards, or reporting workflows.

### Who this is for

Competitor intelligence teams, founders, marketers, product teams, agencies, and analysts who monitor public website changes.

### Input

- `urls` - Public pages to monitor. Required, 1-100 items.
- `compareMode` - Text comparison mode. Current supported value: `text`.
- `includeScreenshot` - Reserved for a browser-based upgrade. Current version returns `screenshotUrl: null`. Default: `false`.
- `maxPages` - Maximum pages to check in one run. Default: `50`, maximum: `100`.
- `changeSensitivity` - How small a text difference must be before a change is marked. Values: `low`, `medium`, `high`. Default: `medium`.

### Example input

```json
{
  "urls": ["https://www.apify.com/pricing", "https://www.apify.com/changelog"],
  "compareMode": "text",
  "includeScreenshot": false,
  "maxPages": 10,
  "changeSensitivity": "medium"
}
```

### Output

The Actor saves one Dataset item per checked URL.

- `sourceUrl` - Final fetched page URL.
- `pageTitle` - HTML page title.
- `currentHash` - SHA-1 hash of current main text.
- `previousHash` - SHA-1 hash from the previous run, or `null` on the first baseline run.
- `changeDetected` - Whether a change passed the selected sensitivity threshold.
- `changeScore` - Approximate changed-line ratio from 0 to 1.
- `changedSections` - Added text snippets used as a quick summary.
- `addedText` - New text snippets.
- `removedText` - Removed text snippets.
- `importantKeywords` - Detected keywords such as pricing, security, API, deprecated, or launch.
- `detectedChangeTypes` - Heuristic categories such as `pricing_change`, `feature_change`, `docs_change`, or `legal_change`.
- `screenshotUrl` - Always `null` in this version.
- `scrapedAt` - ISO timestamp for the run.
- `previousScrapedAt` - Timestamp from the previous snapshot when available.
- `errorMessage` - Failure reason when a page request fails.

### Example output

```json
{
  "sourceUrl": "https://www.apify.com/pricing",
  "pageTitle": "Pricing",
  "currentHash": "abc123",
  "previousHash": "def456",
  "changeDetected": true,
  "changeScore": 0.2,
  "changedSections": ["New plan launched"],
  "addedText": ["New plan launched"],
  "removedText": ["Old plan removed"],
  "importantKeywords": ["pricing"],
  "detectedChangeTypes": ["pricing_change"],
  "screenshotUrl": null,
  "scrapedAt": "2026-07-04T00:00:00.000Z",
  "previousScrapedAt": "2026-07-03T00:00:00.000Z",
  "errorMessage": null
}
```

### How it works

- Reads the Actor input.
- Deduplicates public URLs.
- Fetches each page and extracts main text.
- Stores the latest snapshot in Apify Key-Value Store.
- Compares against the previous snapshot for that URL.
- Saves change records to the Apify Dataset.

### Limitations

- First runs create a baseline and do not report a change.
- Public pages only.
- No login, private data, cookies, CAPTCHA bypass, or restricted content.
- Text diff is heuristic and may include navigation or layout text if the page structure changes.
- Screenshot diff is not implemented in this version.
- Dynamic pages may need a browser-based upgrade for better extraction.

### Error handling

Invalid or empty `urls` input fails run validation. Failed requests return a Dataset item with `extractionStatus: "failed"`, `errorMessage`, `changeDetected: false`, and null hashes. Snapshot read/write is handled through Apify Key-Value Store during normal Actor runs.

### Troubleshooting

- If no change is reported on the first run, that is expected: the first run creates the baseline.
- If changes look noisy, lower sensitivity by setting `changeSensitivity` to `low` or monitor more stable page URLs.
- If small edits are missed, use `changeSensitivity: "high"`.
- If a page fails, confirm it is publicly accessible and does not require login, cookies, or browser-only rendering.

### API usage

```bash
curl -X POST "https://api.apify.com/v2/acts/USERNAME~competitor-change-monitor-api/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": ["https://www.apify.com/pricing"],
    "compareMode": "text",
    "includeScreenshot": false,
    "maxPages": 10,
    "changeSensitivity": "medium"
  }'
```

### Integration ideas

- Schedule daily or weekly monitoring runs.
- Send records with `changeDetected: true` to Slack or email.
- Store changes in a competitor intelligence dashboard.
- Pair with Sitemap Intelligence API to discover URLs before monitoring them.

### SEO keywords

competitor monitor, website change API, pricing change monitor, changelog monitor, docs monitor, public page monitoring, Apify monitor, text diff API, competitor intelligence, change detection

### Ethical use

This Actor is designed for public data and user-provided URLs only. Do not use it to access private, login-protected, or restricted content.

# Actor input Schema

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

Public pages to monitor.

## `compareMode` (type: `string`):

Text comparison is supported in this version.

## `includeScreenshot` (type: `boolean`):

Reserved for a browser-based upgrade. Text diff runs now.

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

Maximum public pages to check in one run.

## `changeSensitivity` (type: `string`):

How small a text difference must be before the actor marks a change.

## Actor input object example

```json
{
  "urls": [
    "https://www.apify.com/pricing"
  ],
  "compareMode": "text",
  "includeScreenshot": false,
  "maxPages": 50,
  "changeSensitivity": "medium"
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("s3nafps/competitor-change-monitor-api").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://www.apify.com/pricing"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s3nafps/competitor-change-monitor-api"
        }
    }
}
```

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/Mg28RP6eF52poQO3h/builds/ggp4aZC3ushJrxlxq/openapi.json
