# Price & Stock Watch — Competitor Change Detection (`abdullah97/price-stock-watch`) Actor

Track explicit product URLs and detect price cuts, increases, currency changes and restocks.

- **URL**: https://apify.com/abdullah97/price-stock-watch.md
- **Developed by:** [Abdullah](https://apify.com/abdullah97) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## Price & Stock Watch — Competitor Change Detection

Monitor a known list of competitor product URLs and get structured price-change
and stock-change events, ready for your spreadsheet or automation workflow.

For ecommerce buyers, category managers and agencies that already know which
products matter and need a small, auditable monitor.

### Try the demo

```
{"demoMode": true}
```

The fictional demo shows a backpack dropping from $79 to $59 and coming back into
stock, plus an inaccessible page that is marked unverified and not billed.
Demo mode makes no web requests.

For real pages, replace the placeholders:

```
{
  "products": [{
    "url": "https://competitor-store.example/products/backpack",
    "sku": "BAG-BLUE"
  }],
  "maxItems": 100,
  "priceChangeThresholdPercent": 2
}
```

sku is optional when there is one unambiguous Product/Offer in the page's
server-rendered JSON-LD. It is required to select among different product variants.
The .example URL is fictional.

### What it does

- Extracts title, SKU, decimal price, explicit currency, stock and the offer URL.
- Compares against the previous successful observation.
- Returns price\_drop, price\_increase, restocked, availability\_changed and
  currency\_changed events, with old/new values and price deltas.
- Applies the percentage threshold only to price changes; stock events still pass.
- Keeps failed checks from erasing the baseline or creating false stock alerts.
- Exports the dataset plus SUMMARY, SNAPSHOT, REPORT and formula-safe CSV.

### Save a baseline

First run: supply product URLs. Second run: paste its SNAPSHOT into
previousSnapshot. For scheduled operation, use an existing stateStoreId you
own plus a unique monitorId and grant this Actor access to that storage.
Schedule runs so the same monitor never overlaps. Snapshot storage is capped at
the most recent 5,000 observations. For separate customers, use separate stores.

You receive change data in the output, not an automatic email. An Apify, n8n or
Make workflow can route the dataset into notifications or your reporting system.
Third-party integrations are configured separately.

### Pricing

Proposed launch price: **$3 per 1,000 verified product checks** ($0.003 each),
including normal runtime costs. No monthly rental and no startup fee. Event:
product-checked; activate it in Apify Publication before selling.

Both the first baseline and unchanged successful checks are billed because the
page was checked. Duplicate URL/SKU inputs are charged once per run. Blocks,
failed requests, missing products and ambiguous offers have no Actor event fee.
A product with a reliable price but unknown availability is billable and carries
an explicit stock warning.

100 products checked once daily for 30 days cost **$9** in Actor event fees.
Each competitor URL counts separately: 100 products across 3 competitor URLs,
daily for 30 days, means 9,000 checks and **$27**. Set a maximum charge per run.

### What it does not claim

This is not automatic product matching, a universal retailer scraper or a pricing
dashboard. It needs accessible product pages with an unambiguous server-rendered
JSON-LD Product/Offer. It does not infer price from page text, execute JavaScript,
convert currencies, bypass bot protection, or alter your shop prices.

Multiple offers, missing currency or ambiguous variants are reported as unverified.
Currency changes are not mislabeled as price cuts. Unknown stock is not interpreted
as out of stock. Small successive price changes are compared with the last check,
not accumulated until they reach the threshold.

Maximum 1,000 URL/SKU checks per run; 2 MB per response after decompression;
10-minute crawl ceiling, bounded redirects/retries and robots.txt compliance.
Only public HTTP(S) ports 80/443; no proxies or external AI charges.

Account plans, external workflow services and dataset access after completion may
carry separate charges. Offline demos have no Actor event fees, although Apify
runtime usage can still apply. Confirm your target pages work before scheduling.

# Actor input Schema

## `demoMode` (type: `boolean`):

Start here to try fictional examples without web requests or Actor event fees. Turn off and supply your own products, feed or URLs for a live audit.

## `maxItems` (type: `integer`):

Hard item limit per run, including unbillable errors. Duplicates are skipped.

## `previousSnapshot` (type: `object`):

Paste this Actor's previous SNAPSHOT output to compare runs without shared storage.

## `stateStoreId` (type: `string`):

Existing key-value store you own and explicitly grant this Actor read/write access to. Never share between customers.

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

Required with stateStoreId. Unique per independent monitor; do not overlap runs for the same monitor.

## `products` (type: `array`):

Rows with url and optional sku. SKU selects a JSON-LD Product/Offer. Multiple unmatched offers are reported as ambiguous.

## `priceChangeThresholdPercent` (type: `number`):

Ignore smaller price changes. Stock/currency changes are always returned.

## Actor input object example

```json
{
  "demoMode": true,
  "maxItems": 100,
  "priceChangeThresholdPercent": 0
}
```

# Actor output Schema

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

No description

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

No description

## `snapshot` (type: `string`):

No description

## `csv` (type: `string`):

No description

## `report` (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 = {
    "demoMode": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("abdullah97/price-stock-watch").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 = { "demoMode": True }

# Run the Actor and wait for it to finish
run = client.actor("abdullah97/price-stock-watch").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 '{
  "demoMode": true
}' |
apify call abdullah97/price-stock-watch --silent --output-dataset

```

## MCP server setup

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

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/l1ru2b6dRho0NEMqO/builds/6mYSYYeewPaA1erDN/openapi.json
