# WooCommerce Price Monitor (`politecrawl/woocommerce-price-monitor`) Actor

Watches WooCommerce stores for new and removed products, price drops and rises, sales that start or end and stock changes since its last run, read from each store's public Store API.

- **URL**: https://apify.com/politecrawl/woocommerce-price-monitor.md
- **Developed by:** [Umberto Vignetta](https://apify.com/politecrawl) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$30.00 / 1,000 results

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

## WooCommerce Price Monitor

### What it does

Give it the addresses of WooCommerce stores and it tells you what changed since its last run:
new and removed products, price drops and rises, sales that started or ended, and products
that went out of stock or came back. Each run reads every store's public Store API
(`/wp-json/wc/store/v1/products`), compares the products with the snapshot the previous run
saved, and saves the new snapshot in its place.

The first run for a store only saves this baseline and reports no changes. Changes show from
the second run on, so schedule the monitor, for example once a day, to keep watch.

### Input

- `stores`: the home page addresses of WooCommerce stores, one per line, such as
  `https://shop.example`. A store that lives in a folder keeps it, such as
  `https://example.com/shop`. A run without any store fails and says so.
- `monitorName` (default `default`): the name of the watch list. Each name keeps its own
  snapshots, so one account can watch separate lists of stores, or the same store for
  different purposes. Use at most 50 letters, digits, hyphens and underscores. The first check
  of a store under a new name saves a new baseline.
- `maxProductsPerStore` (default 10000, at least 1): the most products read from each store,
  in the order of their product ids. When a store has more, only those are compared, and a
  product past them is never reported as new or removed.

### Sample output

```json
{"store": "https://mercantile.wordpress.org", "checkedAt": "2026-11-16T23:22:02Z", "previousCheckAt": "2026-11-16T23:21:58Z", "baseline": false, "productsChecked": 20, "changesFound": 0, "new": 0, "removed": 0, "priceDown": 0, "priceUp": 0, "saleStarted": 0, "saleEnded": 0, "outOfStock": 0, "backInStock": 0, "changes": []}
```

This is the second check of a store, a few seconds after the first, in which nothing had
changed. Each run saves one item for each store checked:

- `store`: the store address that was checked.
- `checkedAt`: when it was checked, in UTC.
- `previousCheckAt`: when the snapshot it was compared with was taken, or `null` for a
  baseline.
- `baseline`: `true` when this was the store's first check under this monitor name. A baseline
  reports no changes.
- `productsChecked`: how many products were read and compared.
- `changesFound`, then `new`, `removed`, `priceDown`, `priceUp`, `saleStarted`, `saleEnded`,
  `outOfStock` and `backInStock`: how many changes were found, in all and of each type.
- `changes`: the changes themselves, by type and then by product id. Each one holds:
  - `changeType`: `new`, `removed`, `price-down`, `price-up`, `sale-started`, `sale-ended`,
    `out-of-stock` or `back-in-stock`. One product can show more than one change, such as
    `sale-started` and `price-down`.
  - `productId`, `sku` (empty when the product has none), `name` and `permalink`, the address
    of the product's page.
  - `currency`, `oldPrice` and `newPrice` (`null` where there is no price, such as the old
    price of a new product), and `percentChange` from the old price to the new one.
  - `oldStock` and `newStock`: `in stock`, `on backorder` or `out of stock`.

The dataset has two views: Overview, one row for each store checked, and Changes, one row for
each change.

The snapshots are kept in the key-value store named `woocommerce-price-monitor` in your
account, one record for each monitor name and store. Deleting a store's record makes its next
check a new baseline.

### Price

One `result` event is charged for each store checked, that is for each item in the dataset,
the first check that saves a store's baseline included. Changes are not charged one by one. A
store that refuses, does not answer or has no Store API is skipped and not charged. The price
per result is shown on the Actor's page.

### Limits

- It reads only the stores it is given, one request a second, with plain requests and no
  proxy. It sees what any visitor without an account sees: published products, at the prices
  the store shows to the public.
- It needs the store's Store API, which WooCommerce stores have on unless the owner turned it
  off. A store without it is skipped and named in the run's status message.
- When a store refuses (HTTP 401, 403 or 429) or answers with a CAPTCHA page, that store is
  skipped at once, without a retry, and named in the run's status message. It never works
  around a refusal. The run fails with the status message `blocked: <what>` only when every
  store refused.
- A store that cannot be read in full in a run, because it stops answering part way, is
  skipped for that run. Its snapshot stays as it was, so the next run compares with the last
  full read.
- Changes are found by comparing two runs. A price that changed and changed back between two
  runs is not seen.
- A product with options, such as sizes, is compared by its lowest price; its options are not
  checked one by one. A product on backorder counts as in stock, as WooCommerce counts it.
- A price that appears or disappears, or a change of the store's currency, is not reported as
  a price change.
- Near the run's time limit it starts no new store and ends with the stores it checked, naming
  the others in the status message.
- One item holds the changes of one store up to about 8 MB of data, tens of thousands of
  changes. The counts always cover every change found.
- It reads no reviews, customers or orders, and stores no data about people.

# Actor input Schema

## `stores` (type: `array`):

Home page addresses of the WooCommerce stores to watch, one per line, such as https://shop.example. Keep the folder of a store that lives in one, such as https://example.com/shop.

## `monitorName` (type: `string`):

The name of this watch list. Each name keeps its own snapshots, so separate lists of stores are watched apart. At most 50 letters, digits, hyphens and underscores. The first check of a store under a name saves its baseline and reports no changes.

## `maxProductsPerStore` (type: `integer`):

The most products read from each store, in the order of their product ids. Only these are compared. Each store checked is one charged result, however many products it has.

## Actor input object example

```json
{
  "stores": [
    "https://mercantile.wordpress.org"
  ],
  "monitorName": "default",
  "maxProductsPerStore": 10000
}
```

# Actor output Schema

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

No description

## `changes` (type: `string`):

No description

## `run` (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 = {
    "stores": [
        "https://mercantile.wordpress.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("politecrawl/woocommerce-price-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 = { "stores": ["https://mercantile.wordpress.org"] }

# Run the Actor and wait for it to finish
run = client.actor("politecrawl/woocommerce-price-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 '{
  "stores": [
    "https://mercantile.wordpress.org"
  ]
}' |
apify call politecrawl/woocommerce-price-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,politecrawl/woocommerce-price-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/5d8hPFdULe4nYlnJe/builds/cRoWbsjNZtlml5g9W/openapi.json
