# PAL | Competitor Price & Stock Change Monitor (`practical_ai_lab_jp/pal-competitor-price-stock-delta`) Actor

Monitor public competitor product data, track price and availability changes across runs, and flag significant changes at a configurable threshold. Export JSON/CSV; webhooks via Apify integrations.

- **URL**: https://apify.com/practical_ai_lab_jp/pal-competitor-price-stock-delta.md
- **Developed by:** [Practical AI Lab](https://apify.com/practical_ai_lab_jp) (community)
- **Categories:** E-commerce, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 completed competitor price stock delta monitors

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

## PAL | Competitor Price & Stock Change Monitor

**Turn public ecommerce product pages into repeatable, machine-readable price-change and stock-status intelligence.**

Track a defined set of product URLs. The first run captures a baseline. Later runs with the **same monitor ID** compare published prices and inventory *labels*, showing up/down changes, percentage movement, currency shifts, or stock-status changes.

#### Who it's for

Ecommerce analysts, repricing software developers, marketplace operators, and AI agents building repeatable competitor intelligence workflows.

#### 60-second quick start

1. Enter 1-50 publicly accessible HTTPS product URLs. The pages must expose static **schema.org/Product JSON-LD** (not Javascript-rendered-only listings).
2. Choose a unique `monitorId` for a product group. For a quick test use `demo-products`.
3. Run once to receive `eventType: first_seen`.
4. Run again with the **same monitor ID** to receive `unchanged` or a change event.
5. Add the Actor to an Apify Schedule (e.g. daily) with the same inputs for ongoing checks; read each run's dataset through the Apify API or webhook.

Sample input:

```json
{"urls":["https://scrapeme.live/shop/Pikachu/"],"monitorId":"demo-products","emitUnchanged":true,"minPriceChangePercent":5}
```

**New: prioritize material changes.** Set `minPriceChangePercent` (default 5%) to mark significant price movements; stock, currency and price-visibility changes also surface an `alertSignal`. Filter `alertSignal=true` in your downstream automation. This signal alone does not send any emails or notifications. For automatic notifications, set up an Apify Schedule and a webhook or integration.

Example output fields: `alertSignal`, `alertKind`, `alertReason`, `name`, `sourceUrl`, `price`, `currency`, `availability`, `previousPrice`, `priceDelta`, `priceDeltaPercent`, `eventType`, `changed`, `summary`, `checkedAt`.

Events: `first_seen`, `unchanged`, `price_up`, `price_down`, `stock_status_changed`, `price_and_stock_changed`, `currency_changed`, `price_visibility_changed`.

#### What makes this useful

- Historical comparison built into the Actor, using an account-scoped named Apify key-value store.
- Deterministic deltas (not unsupported AI guesses); compatible with AI agent workflows via the Apify API.
- Public pages only. No scraping of accounts, credential collection, captcha bypass or external hosting.
- Run limits, 2MB HTML limit, 12s fetch timeout, up to 50 pages and 20 offers per page.
- Per-product failures reported without charging for a successful snapshot.

#### Pricing

Intended pay-per-event model: **one `product-check` event per successfully checked priced product** (including unchanged results). Errors and missing price are not billed. **Check the live Apify price** before using: this README does not assert a rate until monetization is configured. Apify may also charge a small run-start event.

#### Limitations and correct interpretation

- Reports only *published* structured metadata and stock *labels*. It does **not** verify live cart inventory, market-wide prices or actual sales. Websites may provide stale/missing information.
- Static HTML only; JavaScript-only and blocked sites may return no results or errors. Some sites do not permit automated extraction; users must comply with website terms and applicable laws.
- A monitor ID is a dedicated baseline namespace. Use different IDs for different workflows. Avoid simultaneous runs using the same ID, which could race.
- Prices are compared only when currency matches; price is not converted.
- State is kept in Apify key-value storage; retention, costs and access follow the customer's Apify account settings.
- Financial, repricing, and profit impacts are not guaranteed.

#### Related PAL products

- [PAL Product Price & Stock Snapshot](https://apify.com/practical_ai_lab_jp/my-actor)
- [PAL Product GTIN & SKU SEO Auditor](https://apify.com/practical_ai_lab_jp/my-actor-3)

**PAL brand** — Practical AI Lab. No dependency on Render.

# Actor input Schema

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

1-50 public HTTPS product pages with schema.org Product JSON-LD. Supports 20 offers per page.

## `monitorId` (type: `string`):

Choose a unique ID per independent product group (3-40 letters/numbers/\_/-). Reuse on later runs to compare against the previous check. Do not use personal information.

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

Erase saved comparisons for this monitor ID before checking products. Leave off for normal repeat monitoring.

## `emitUnchanged` (type: `boolean`):

When false, unchanged checks are still billed but omitted from dataset. Initial baselines, changes and errors are always shown.

## `minPriceChangePercent` (type: `number`):

A price movement at or above this percent is marked alertSignal=true in dataset results. Inventory/currency changes may still be marked. This does NOT send notifications automatically; connect an Apify webhook or schedule if needed.

## Actor input object example

```json
{
  "urls": [
    "https://scrapeme.live/shop/Pikachu/"
  ],
  "monitorId": "my-products",
  "resetBaseline": false,
  "emitUnchanged": true,
  "minPriceChangePercent": 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://scrapeme.live/shop/Pikachu/"
    ],
    "monitorId": "my-products",
    "minPriceChangePercent": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("practical_ai_lab_jp/pal-competitor-price-stock-delta").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://scrapeme.live/shop/Pikachu/"],
    "monitorId": "my-products",
    "minPriceChangePercent": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("practical_ai_lab_jp/pal-competitor-price-stock-delta").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://scrapeme.live/shop/Pikachu/"
  ],
  "monitorId": "my-products",
  "minPriceChangePercent": 5
}' |
apify call practical_ai_lab_jp/pal-competitor-price-stock-delta --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,practical_ai_lab_jp/pal-competitor-price-stock-delta"
        }
    }
}
```

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/Tif3ano7veFzfdOTk/builds/Stv8jqNA7ZGaiSJS5/openapi.json
