# WooCommerce Products Scraper & Price/Stock Change Monitor (`gr8data/woocommerce-store-monitor`) Actor

WooCommerce products scraper: the full catalog (products, variations, prices, stock) for a flat $0.005 per store, not per product. Or schedule it and pay only for changes: price, sales, sold-out, restocks and new products. CSV and HTML report.

- **URL**: https://apify.com/gr8data/woocommerce-store-monitor.md
- **Developed by:** [Gr8 Data](https://apify.com/gr8data) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 catalog changes delivered

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/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 Products Scraper & Price/Stock Change Monitor

**WooCommerce products scraper.** Set `onlyChanges: false` to get the full catalog of any WooCommerce store (products and variations with price, sale price and stock) as dataset rows. You are charged **$0.005 per store, not per product**: in a real platform run, 2 stores, 236 products and 410 catalog rows were billed as 2 store checks ($0.01). Keep the default `onlyChanges: true` on a schedule to pay only for what changed.

Monitor competitor WooCommerce storefronts on a schedule and receive **only what changed** since your previous run — new products, confirmed removed products, batch-tracked variations, price changes, sales started and ended, stockouts, restocks, and low-stock alerts — along with store catalog summaries, a spreadsheet-safe CSV export, and a self-contained interactive `report.html`.

Not affiliated with, endorsed by or sponsored by WooCommerce, Automattic or any store listed. It reads public WooCommerce Store API endpoints (`/wp-json/wc/store/v1/products`) and `robots.txt` without proxies, logins, or anti-bot bypasses.

[![34-second walkthrough: only-changes tracking, old and new prices, variation stock changes and honest coverage from a real run](https://img.youtube.com/vi/EHxiO607c0c/maxresdefault.jpg)](https://www.youtube.com/watch?v=EHxiO607c0c)

![Report overview: one card per store with products, variations, availability, changes and price range; a blocked store is reported, not counted](https://simple-free-apps.github.io/listings/woocommerce-store-monitor/report-overview.png)

*From a real run on Apify, 6.3 hours after the first one: 12 of 13 stores read, 39 changes. One store answered 403, so it is reported as blocked.*

### You pay for what changed, not for the whole catalog

This Actor charges one small `store-checked` event per store successfully read, plus one `catalog-change` event per change row delivered. Unchanged products and variations, the first-run baseline and its `catalog-<store>.json` snapshots, summaries, blocked or failed stores and preview runs are free.

**Real example (the run in the screenshots):** **3,620 products and 1,728 variations read** (5,348 items). Billed: **39 change events + 12 store checks**. A tool that bills every product it returns would bill at least 3,620 rows for the same run, and again on the next one.

All 39 rows were compared with the live stores a few minutes after the run, and all 39 matched. One of them was a sold-out product that its store hides from the catalog listing: it was reported as `sold-out`, not as removed.

**Full-catalog mode (`onlyChanges: false`)** delivers the whole current catalog as `catalog-item` rows plus `catalog-<store>.json`, and charges only `store-checked`.

![Price changes: each row shows the store, product, SKU, the old and the new price and the percent](https://simple-free-apps.github.io/listings/woocommerce-store-monitor/price-changes.png)

![Change details: one variation that sold out, with its colour, SKU, old and new availability and when it was detected](https://simple-free-apps.github.io/listings/woocommerce-store-monitor/variation-sold-out.png)

### Why batch variations, confirmed removals & low stock matter

1. **Batch variations (`100` per request):** Variable products in the WooCommerce Store API expose only variation IDs and attribute labels on the parent listing, without prices. Instead of issuing a separate request per variable product, this Actor queries `?type=variation&per_page=100` in batches to reveal per-variation prices, sales, and availability (up to `5 x maxProductsPerStore` variations).
2. **Confirmed product removals (`removed-product`):** A missing product is never flagged as removed on assumption. Only after a complete catalog read (`catalogComplete: true`), absent IDs are batch-checked with `?include=` (`100` per call) and verified individually via `GET .../products/{id}` — emitting `removed-product` only on `404` (`woocommerce_rest_product_invalid_id`). If the store returns `200` (e.g. an out-of-stock item hidden from catalog pages), it emits `sold-out` once instead of a false removal.
3. **Low-stock alerts (`low-stock`):** Captures `low_stock_remaining` directly when exposed by a store, alerting when a threshold first appears or drops further.
4. **Actionable `report.html` + free baseline snapshot:** Every first-run store gets a free `catalog-<store>.json` snapshot, and every run outputs a self-contained light/dark mobile-ready HTML report answering *"What changed at my competitors?"*.

### Example input

```json
{
  "stores": [
    "offermanwoodshop.com",
    "www.nutribullet.com",
    "www.houseofmalt.co.uk"
  ],
  "maxProductsPerStore": 1000,
  "onlyChanges": true,
  "trackPrices": true,
  "trackStock": true,
  "trackNewProducts": true,
  "trackVariations": true,
  "minPriceChangePercent": 0,
  "preview": false
}
```

Leaving input empty (`{}`) runs a working 2-store default (`offermanwoodshop.com` and `www.nutribullet.com`). URLs with subpaths (such as `https://example.com/shop`) try the domain root first and automatically fall back to the subpath if needed.

### Example output row (`change`, from the same real run)

```json
{
  "recordType": "change",
  "changeType": "sold-out",
  "store": "nalgene.com",
  "inputStore": "nalgene.com",
  "productId": "529756",
  "variantId": "767472",
  "title": "32oz Wide Mouth Bottle",
  "variantTitle": "Bottle Color: Odyssey Gray",
  "sku": "2020-2232",
  "categories": [
    "Everyday",
    "Outdoors",
    "Water Bottles"
  ],
  "url": "https://nalgene.com/product/32oz-wide-mouth-bottle/?attribute_pa_color=odyssey-gray",
  "image": "https://nalgene.com/wp-content/uploads/2024/08/32oz-WM-Odyssey-Gray-Front.png",
  "old": "in_stock",
  "new": "out_of_stock",
  "changePercent": null,
  "currency": "USD",
  "stockLeft": null,
  "firstSeenAt": "2026-11-27T21:27:04.000Z",
  "readAt": "2026-11-28T03:46:54.972Z"
}
```

### What a run gives you

- **Dataset (`changes`, `store-summary`, `run-summary` views):**
  - `change` rows for all 9 change types: `new-product`, `removed-product`, `new-variant`, `price-change`, `sale-started`, `sale-ended`, `sold-out`, `restocked`, and `low-stock`, with `store`, `inputStore`, `productId`, `variantId`, `title`, `variantTitle`, `sku`, `categories`, `url`, `image`, `old`, `new`, `changePercent`, `currency`, `stockLeft`, `firstSeenAt`, and `readAt`.
  - `store-summary` row per store: product/variation counts, availability counts, changes by type, currency, average/min/max price (ignoring unpriced items), discounted ratio, `variationTracking` mode (`full`, `partial`, `parent-only`, `off`, or `none`), `catalogComplete`, `unconfirmedRemovals`, `currencyChanged`, or failure status (`blocked`, `robots-disallowed`, `not-woocommerce`, `store-api-error`, `unreachable`).
  - `run-summary` row: `COMPLETE`, `COMPLETE_WITH_FAILURES`, `LIMIT_REACHED`, `PARTIAL`, or `PREVIEW`.
- **First-run baseline & free snapshot:** Saves baseline silently in named store `woocommerce-store-monitor-state` (keyed by `t-<sha256(origin + wpPath)>` with atomic sharding up to 20,000 products) and writes `catalog-<store>.json` to the default key-value store.
- **`report.html` (key-value store):** Self-contained light/dark mobile-ready HTML report with store cards, **Biggest Price Drops**, **Back in Stock**, **Running Low**, and **New Arrivals** highlights, filters, and strict CSP (`default-src 'none'`, dynamic HTTPS-only `img-src` built strictly from the image hosts present in that report, and SHA-256 hashes for inline CSS/JS).
- **`export.csv` (key-value store):** Spreadsheet-safe CSV export neutralizing formula injection (`=`, `+`, `-`, `@`, full-width equivalents, tabs, and line breaks).
- **Preview mode (`preview: true`):** Reads page 1 of each store to return product counts and up to 3 sample products per store without charging or modifying state.

### Known limits (honest)

- **Not every site exposes a readable Store API:** Stores may block automated clients (`403`, `429`, Cloudflare/CAPTCHA challenges), disallow `/wp-json/` in `robots.txt`, return server `5xx` errors, or run another platform. This Actor never uses proxies or anti-bot bypasses; it stops querying a blocked store immediately in that run, reports the honest status (`blocked`, `robots-disallowed`, `not-woocommerce`, `store-api-error`, `unreachable`), charges nothing for failed stores, and leaves tracking state untouched.
- **Storefront currency as exposed to the Apify server:** Prices are parsed in exact integer currency minor units (such as cents or zero-decimal currencies) without currency conversion, in whatever currency the store presents to the runner's IP. If a store changes `currency_code` or `currency_minor_unit` between runs, price/sale alerts are suppressed for affected items, state updates cleanly, and `currencyChanged: true` is flagged in `store-summary`.
- **No product creation date in Store API:** WooCommerce's public Store API does not expose product creation timestamps, so this Actor never fabricates "added in last 30 days" metrics. `firstSeenAt` records when this monitor first observed the product.
- **Confirmed removal rule (`removed-product`) & cap:** Removals run only after a complete catalog read below `maxProductsPerStore`. Confirmations are capped at 200 absent products per store per run (any remainder stays unconfirmed and carries over to the next run, reported in `unconfirmedRemovals`). Transient errors during confirmation keep products in state as unconfirmed rather than emitting false removals.
- **Variation tracking modes:**
  - `full`: all variable product variations fetched cleanly; tracked per variation without parent duplication.
  - `partial`: only a subset of variations fetched (e.g. `5 x maxProductsPerStore` cap or mid-run variation block); missing variations retain their prior state silently. If variations return `403`/`429` mid-run, simple product changes are still delivered and variation state stays untouched.
  - `parent-only`: store ignores `?type=variation`; tracked at parent level using product price, `price_range.min_amount`, and availability. Switching between modes never emits phantom changes.
  - `off` / `none`: `trackVariations: false` or store has no variable products.
- **First-run baseline behavior:** The first run for any store records its catalog baseline silently (`0` changes) and saves a free `catalog-<store>.json` snapshot. Adding a new store never resets saved history for existing monitored stores.
- **Polite rate limits & `Crawl-delay`:** Requests to the same host start at least `2,000 ms` apart (`<= 0.5 req/s` per host; up to 5 different stores run concurrently). `robots.txt` `Crawl-delay` directives are respected up to `30 s` per request (values above `30 s` are capped at `30 s` with a warning), which slows large catalogs on delayed hosts.
- **Embedded HTML report cap & strict input guard:** `report.html` embeds up to the first `5,000` change rows for responsive browser rendering (all rows remain in the dataset and `export.csv`). Malformed inputs, empty `stores: []`, `localhost`, private IPs, and redirects to private/local hosts are rejected before network reads or charges (exit code `2`).

# Actor input Schema

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

List of WooCommerce store domains or URLs (e.g. offermanwoodshop.com, https://www.nutribullet.com, https://example.com/shop). Up to 100 stores.

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

Maximum number of parent products to fetch per store (1 to 20000). Batch-fetched variations are capped separately at 5x this limit. Confirmed removed-product detection only runs when the entire store catalog is read below this cap.

## `onlyChanges` (type: `boolean`):

When true, tracks each store independently in a named key-value store and delivers only changes since the previous run (saving a baseline and free catalog-<store>.json snapshot on first run). When false, delivers the full catalog (catalog-item rows and catalog-<store>.json) and charges ONLY store-checked — catalog items are free.

## `trackPrices` (type: `boolean`):

Detect price changes (price-change) and sale transitions via on_sale (sale-started, sale-ended) using exact integer currency minor units.

## `trackStock` (type: `boolean`):

Detect sold-out (sold-out), back in stock (restocked), and low-stock threshold alerts (low-stock via low_stock_remaining).

## `trackNewProducts` (type: `boolean`):

Detect new products (new-product), new variations (new-variant), and confirmed removed products (removed-product, verified via include= and single-product 404 checks).

## `trackVariations` (type: `boolean`):

Batch-fetch variable product variations (100 per request via ?type=variation) without extra per-product requests. Falls back safely to parent-level tracking if unsupported.

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

Ignore price-change events smaller than this absolute percentage (0 to 100). Reference price stays on the last reported value so small shifts accumulate.

## `preview` (type: `boolean`):

Read page 1 of each store to report product counts and 3 sample products without charging or modifying tracking state.

## Actor input object example

```json
{
  "stores": [
    "offermanwoodshop.com",
    "www.nutribullet.com"
  ],
  "maxProductsPerStore": 1000,
  "onlyChanges": true,
  "trackPrices": true,
  "trackStock": true,
  "trackNewProducts": true,
  "trackVariations": true,
  "minPriceChangePercent": 0,
  "preview": false
}
```

# Actor output Schema

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

One row per detected change, plus store-summary rows and one run-summary row.

## `report` (type: `string`):

Self-contained report.html: store cards, biggest price drops, back in stock, low stock, new arrivals, and filterable change table.

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

Delivered catalog changes as spreadsheet-safe CSV.

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

Run status, checked/failed stores, and counts.

# 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": [
        "offermanwoodshop.com",
        "www.nutribullet.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gr8data/woocommerce-store-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": [
        "offermanwoodshop.com",
        "www.nutribullet.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gr8data/woocommerce-store-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": [
    "offermanwoodshop.com",
    "www.nutribullet.com"
  ]
}' |
apify call gr8data/woocommerce-store-monitor --silent --output-dataset

```

## MCP server setup

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