# Competitor Pricing & Docs Page Monitor (`lumispring/competitor-page-monitor`) Actor

Track public competitor pricing and docs pages. Extracts titles, visible prices, and feature bullets, then diffs them against the last snapshot. Cheerio-based (static/SSR). Schedule separately. No login, no AI, no built-in alerts.

- **URL**: https://apify.com/lumispring/competitor-page-monitor.md
- **Developed by:** [lumispring](https://apify.com/lumispring) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 page scrapeds

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 Pricing & Docs Page Monitor

Monitor **public** competitor documentation and pricing pages. Each run fetches the URLs you list (no link following), extracts a title, visible price strings, and feature-like bullets, stores a snapshot, and writes a structured **diff summary** to the Dataset.

Built with **TypeScript + Crawlee Cheerio** (HTTP HTML). Best for static or server-rendered pages. Heavy client-only SPAs may return incomplete prices unless you supply precise CSS selectors—**Playwright is not included in this version**.

### Features

- Batch URL list (docs / pricing / marketing pages you are allowed to access)
- Optional CSS hints: title, price region, feature list (global or per URL)
- Extracts: `title`, `prices[]`, `features[]`, `textFingerprint`
- Compares with the previous snapshot in named Key-Value Store `page-snapshots`
- Dataset row per URL including `diff` (`changed`, added/removed prices & features, Chinese `summary` string)
- Optional Apify Proxy (`useApifyProxy`)
- Does **not** follow outbound links

### Not included (v0.1)

- No login / authenticated scraping
- No Playwright / browser rendering
- No screenshots or visual diffs
- No built-in Slack, email, or webhook alerts (use Apify Schedule + your own webhook on the run)
- No AI classification of “meaningful” changes

### How to use

1. Paste competitor pricing or docs URLs into `startUrls`.
2. Run once to create baselines (`diff.summary` will say first scrape / no history).
3. Create an **Apify Schedule** (e.g. daily) with the same input. `suggestedPollIntervalMinutes` is documentation only.
4. Filter Dataset rows where `diff.changed === true`.

#### Example input

```json
{
  "startUrls": [
    { "url": "https://apify.com/pricing" },
    { "url": "https://www.digitalocean.com/pricing" }
  ],
  "maxRequestsPerCrawl": 50,
  "useApifyProxy": false,
  "suggestedPollIntervalMinutes": 1440
}
```

#### Example output fields

| Field | Description |
| --- | --- |
| `url` | Final URL after redirects |
| `scrapedAt` | ISO-8601 UTC timestamp |
| `title` | From selector / `h1` / `<title>` |
| `prices` | Deduped visible price-like strings ($, €, £, ¥, …) |
| `features` | Heuristic feature bullets (or your selector) |
| `diff` | Object: `changed`, price/feature deltas, `summary` |
| `textFingerprint` | Normalized fingerprint for quick compare |

Snapshots are stored under KV store `page-snapshots` with keys `SNAPSHOT-<hash>`.

### Pricing (Pay-per-event)

See the Pricing tab.

- **`page-scraped`** — charged when a URL is successfully scraped and a Dataset row is written (including first/baseline runs).
- **`diff-detected`** — charged when `diff.changed` is true.
- Platform **`apify-actor-start`** may apply at the default micro rate.

Failed fetches are **not** billed (`Actor.charge` only runs after a successful scrape + Dataset write).

### Limitations

- Public pages only; respect robots.txt and site Terms of Service.
- Price extraction is regex + optional CSS—not a full product catalog parser.
- JS-heavy pages may need better selectors or a future browser mode.
- Concurrent runs that share the same snapshot store can race; prefer one Schedule.

### Compliance

You are responsible for lawful use. Do not scrape behind logins or collect personal data (PII). This Actor is not affiliated with the sites it reads. Follow [Apify Acceptable Use Policy](https://apify.com/acceptable-use).

### Support

Open an Issue on the Actor page with a public URL that reproduces the problem (no secrets).

# Actor input Schema

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

竞品文档页或定价页 URL。可为字符串，或带可选 CSS 选择器提示的对象。

## `defaultTitleSelector` (type: `string`):

可选。对所有 URL 生效的标题 CSS 选择器；单条 URL 可覆盖。留空则用 h1 或 <title>。

## `defaultPriceSelector` (type: `string`):

可选。限定价格文本抽取范围的 CSS 选择器。留空则在 main/body 中用正则抽取 $€£¥ 价格。

## `defaultFeatureSelector` (type: `string`):

可选。功能/套餐要点列表项的 CSS 选择器。留空则启发式扫描 li。

## `maxRequestsPerCrawl` (type: `integer`):

防止意外扩大抓取范围。本 Actor 默认不跟链，通常等于 URL 数即可。

## `useApifyProxy` (type: `boolean`):

本地脚手架默认关闭。上架后若目标站限流，可开启（需平台代理额度）。

## `suggestedPollIntervalMinutes` (type: `integer`):

仅作文档/元数据提示。实际定时请用 Apify Schedule 按此间隔反复运行本 Actor；单次运行只抓一次。

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com/pricing"
    },
    {
      "url": "https://www.digitalocean.com/pricing"
    }
  ],
  "maxRequestsPerCrawl": 50,
  "useApifyProxy": false,
  "suggestedPollIntervalMinutes": 1440
}
```

# Actor output Schema

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

No description

## `snapshots` (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 = {
    "startUrls": [
        {
            "url": "https://apify.com/pricing"
        },
        {
            "url": "https://www.digitalocean.com/pricing"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lumispring/competitor-page-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 = { "startUrls": [
        { "url": "https://apify.com/pricing" },
        { "url": "https://www.digitalocean.com/pricing" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lumispring/competitor-page-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 '{
  "startUrls": [
    {
      "url": "https://apify.com/pricing"
    },
    {
      "url": "https://www.digitalocean.com/pricing"
    }
  ]
}' |
apify call lumispring/competitor-page-monitor --silent --output-dataset

```

## MCP server setup

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