# WooCommerce Product & Price Scraper | Stock Monitor (`andok/woocommerce-products-scraper`) Actor

Scrape WooCommerce catalogs via the public Store API: prices, sale status, stock, SKUs, variations. Optional change-monitor mode for scheduled runs. $0.001/product + $0.001 start.

- **URL**: https://apify.com/andok/woocommerce-products-scraper.md
- **Developed by:** [Andok](https://apify.com/andok) (community)
- **Categories:** E-commerce, Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 product 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

## WooCommerce Product & Price Scraper | Stock Monitor

Scrape product catalogs from any WooCommerce store over the public Store API — prices, sale status, stock, SKUs, categories, images, and variations. Multi-store batch in one run, plus an optional **monitor mode** that emits only price/stock changes for scheduled competitor tracking. No browser, no login, no API keys.

### Features

- **HTTP-only Store API** — reads `/wp-json/wc/store/v1/products` (fast, cheap, low block risk)
- **Variations** — expand variable products into one row per variation (toggleable)
- **Sale / stock filters** — keep only on-sale or in-stock items
- **Multi-store batch** — scrape many competitor stores in a single run
- **Monitor mode** — named snapshots; emit only changed (or new) products on later runs
- **Charge-limit safety** — respects per-run spending caps; failed stores are not charged

### Input

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `storeUrls` | `array` | Yes | — | WooCommerce store home URLs |
| `maxProductsPerStore` | `integer` | No | `500` | Cap per store (1–5,000) |
| `includeVariations` | `boolean` | No | `true` | Expand variable products into variation rows |
| `onSaleOnly` | `boolean` | No | `false` | Only products currently on sale |
| `inStockOnly` | `boolean` | No | `false` | Skip out-of-stock products |
| `onlyChangedSinceLastRun` | `boolean` | No | `false` | Monitor mode: emit diffs only |
| `monitorName` | `string` | No | `default` | Snapshot namespace for separate watchlists |
| `timeoutSeconds` | `integer` | No | `30` | Per-request timeout |

#### Input example

```json
{
  "storeUrls": [
    "https://yoast.com"
  ],
  "maxProductsPerStore": 100,
  "includeVariations": true,
  "onSaleOnly": false,
  "inStockOnly": false,
  "onlyChangedSinceLastRun": false
}
```

#### Monitor mode example

```json
{
  "storeUrls": ["https://yoast.com"],
  "onlyChangedSinceLastRun": true,
  "monitorName": "comp-set-a",
  "maxProductsPerStore": 500
}
```

First run stores a baseline (no change rows). Later runs emit rows with a `changed` array (`price`, `sale_price`, `stock_status`, `on_sale`, or `new`).

### Output

One dataset row per product (or variation). Key fields:

- `store`, `product_id`, `parent_id`, `sku`, `name`, `permalink`
- `price`, `regular_price`, `sale_price`, `currency`, `on_sale`
- `stock_status` (`instock` / `outofstock` / `onbackorder` / `unknown`)
- `average_rating`, `review_count`, `categories`, `images`, `product_type`
- Monitor-only: `changed`, `is_new`

#### Output example

```json
{
  "store": "yoast.com",
  "product_id": 4039537,
  "parent_id": null,
  "sku": null,
  "name": "Yoast SEO",
  "permalink": "https://yoast.com/product/yoast-seo-wordpress/",
  "price": "99.00",
  "regular_price": "99.00",
  "sale_price": "99.00",
  "currency": "EUR",
  "on_sale": false,
  "stock_status": "instock",
  "average_rating": "0",
  "review_count": 0,
  "categories": ["Plugins"],
  "images": ["https://yoast.com/app/uploads/…/icon.svg"],
  "product_type": "simple",
  "scraped_at": "2026-10-19T01:00:00.000Z"
}
```

### Pricing (PPE)

| Event | Cost |
|-------|------|
| Actor start | **$0.001** |
| Product scraped (full catalog mode) | **$0.001** / row |
| Change record (monitor mode) | **$0.002** / changed or new row |

**Typical run:** 1,000 products ≈ **$1.00** + $0.001 start.

Stores that disable or block the Store API are skipped and **not charged** for products (an error row may still appear in the dataset for debugging).

### Limitations

- Works only when the store exposes the public WooCommerce Store API. Some hosts disable REST endpoints or bot-block datacenter IPs.
- Inventory quantities are not always present in the Store API; availability is stock status only.
- Variation expansion adds extra API requests for variable products.

### Use cases

- Competitor price and stock monitoring on a schedule
- Agency catalog dumps for Woo-heavy niches
- Dropship / brand audits across multiple stores
- Agent and MCP pipelines that need clean ecommerce JSON

### Related Actors

| Actor | What it adds |
|-------|-------------|
| [Shopify Product Scraper & Price Monitor](https://apify.com/andok/shopify-intelligence) | Same job for Shopify stores (`/products.json`) |
| [Tech Stack Analyzer](https://apify.com/andok/tech-stack-analyzer) | Detect whether a site runs WooCommerce vs Shopify |
| [Company Enrichment](https://apify.com/andok/company-enrichment) | Enrich store owners with company metadata |

# Actor input Schema

## `storeUrls` (type: `array`):

List of WooCommerce store home URLs (e.g. https://example.com). The Actor reads the public Store API at /wp-json/wc/store/v1/products — no login or API keys.

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

Maximum number of product/variation rows to extract per store. Cap this to control cost on large catalogs.

## `includeVariations` (type: `boolean`):

When true, expand variable products into one row per variation (SKU, price, stock). When false, return parent products only.

## `onSaleOnly` (type: `boolean`):

If true, only return products currently on sale.

## `inStockOnly` (type: `boolean`):

If true, skip out-of-stock products.

## `onlyChangedSinceLastRun` (type: `boolean`):

Monitor mode: store a snapshot and emit only products whose price, sale price, or stock status changed (or new products). First run stores a baseline and emits no change rows. Charges change-record instead of product-scraped.

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

Named snapshot namespace for monitor mode. Use different names for separate competitor sets (e.g. comp-set-a).

## `timeoutSeconds` (type: `integer`):

Maximum seconds to wait for each Store API request.

## Actor input object example

```json
{
  "storeUrls": [
    "https://yoast.com"
  ],
  "maxProductsPerStore": 500,
  "includeVariations": true,
  "onSaleOnly": false,
  "inStockOnly": false,
  "onlyChangedSinceLastRun": false,
  "monitorName": "default",
  "timeoutSeconds": 30
}
```

# Actor output Schema

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

No description

## `resultsCsv` (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 = {
    "storeUrls": [
        "https://yoast.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("andok/woocommerce-products-scraper").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 = { "storeUrls": ["https://yoast.com"] }

# Run the Actor and wait for it to finish
run = client.actor("andok/woocommerce-products-scraper").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 '{
  "storeUrls": [
    "https://yoast.com"
  ]
}' |
apify call andok/woocommerce-products-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,andok/woocommerce-products-scraper"
        }
    }
}
```

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/KBzzyPaAG0i8eAFqh/builds/uA3B2NR0SsfPvisug/openapi.json
