# WooCommerce Store Products Scraper (`sampon/woocommerce-store-products`) Actor

Get every product from any WooCommerce store through its public Store API: prices in real decimals, discount %, stock, categories and ratings, one row per product.

- **URL**: https://apify.com/sampon/woocommerce-store-products.md
- **Developed by:** [Sampon](https://apify.com/sampon) (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

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?

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 Store Products Scraper

WooCommerce stores publish their catalogue through a public, read-only endpoint called the Store API. It is the same endpoint the store's own cart and product blocks use, so it is open without a login or an API key on most stores.

This Actor reads that endpoint for the stores you list and gives you one row per product: name, SKU, categories, prices, discount, stock and rating. No HTML parsing is involved, so the numbers are the store's own numbers, not text scraped off a theme that may change next month.

### What you put in

The only thing you need is the store's address. The home page or the shop page both work:

```json
{
  "startUrls": [{ "url": "https://mercantile.wordpress.org/" }],
  "maxItems": 200
}
```

You can list several stores in one run. They are read one after another.

Optional settings:

| Setting | What it does |
|---|---|
| `maxItems` | Stops after this many products in total. |
| `maxItemsPerStore` | Caps each store, so one large store does not use up the whole run. |
| `categories` | Keeps products in any of these categories. Use the slug from the store's category URLs (such as `drinkware`), the category ID, or its name. |
| `tags` | The same for product tags. |
| `search` | Passed to the store's own product search. |
| `onSaleOnly` | Keeps only products that have a sale price right now. |
| `inStockOnly` | Skips products that are out of stock. |
| `includeShortDescription` | The short description as plain text. On by default. |
| `trackPriceChanges` | Compares every price with the previous run and adds the difference to the row. |
| `changesOnly` | Same comparison, but leaves out products whose price did not move. |
| `historyName` | Where the previous prices are kept. Use a different name for each monitoring task. |

Category, tag, sale and stock filters are sent to the store, so the store does the work and the run stays short. If a store rejects a category or tag value, the Actor reads the full catalogue and applies the filter itself.

### What you get

```json
{
  "store": "https://shop.example.com",
  "productId": 1042,
  "name": "Enamel Camp Mug",
  "slug": "enamel-camp-mug",
  "sku": "MUG-350-BLU",
  "type": "simple",
  "categories": ["Drinkware", "Outdoor"],
  "categorySlugs": ["drinkware", "outdoor"],
  "tags": ["Gift"],
  "currency": "USD",
  "price": 14.4,
  "regularPrice": 18.0,
  "salePrice": 14.4,
  "priceMin": null,
  "priceMax": null,
  "onSale": true,
  "discountPercent": 20.0,
  "isInStock": true,
  "stockStatus": "in_stock",
  "stockQuantity": 37,
  "stockText": "37 in stock",
  "averageRating": 4.6,
  "reviewCount": 23,
  "url": "https://shop.example.com/product/enamel-camp-mug/",
  "imageUrl": "https://shop.example.com/wp-content/uploads/camp-mug.jpg",
  "shortDescription": "Holds 350 ml. Safe on a camp stove.",
  "scrapedAt": "2026-10-10T08:00:00+00:00"
}
```

A few details that save you a cleanup step:

- **Prices are real numbers.** The Store API sends prices as whole numbers in the smallest currency unit, so "1440" can mean 14.40 or 1,440 depending on the currency. The Actor reads each store's decimal setting and converts, so 14.4 means 14.40 and a yen price stays in yen.
- **`salePrice` is only filled when the product is actually on sale.** The raw API repeats the normal price there, which makes every product look discounted.
- **`discountPercent`** is worked out from the regular and sale price, rounded to one decimal.
- **`priceMin` and `priceMax`** are filled when the store reports a price range (variable or grouped products).
- **`stockQuantity`** is only filled when the store shows a number. Many stores only say "in stock".
- **Ratings are numbers only.** Review text and reviewer names are never collected.

When `trackPriceChanges` or `changesOnly` is on, each row also gets `changeType` (`new`, `up`, `down`, `unchanged`, `currency_changed`), `previousPrice`, `priceChange`, `priceChangePercent` and `previousScrapedAt`. Schedule the Actor daily with `changesOnly` and the dataset becomes a list of what moved since yesterday. The "Price changes" view in the dataset shows just those columns.

If a store has no Store API, or has it switched off, you get one row for that store with an `error` field explaining what was tried, and the run moves on to the next store.

### Price

Free for now. You only pay Apify's usual platform usage for the run. In our tests, 20 products took 2 requests and under 2 seconds of fetching, and two stores with 107 products in total took 4 requests and about 6 seconds, so a run of that size should cost a fraction of a cent in platform usage. A per-product price may be added later. If that happens, it will be shown on this page before it applies to you.

### How it treats the stores it reads

- It reads the store's robots.txt first and does not request anything robots.txt disallows. A crawl delay in robots.txt is respected.
- It asks for up to 100 products per request, so a store with 1,000 products takes about 10 requests.
- It waits at least one second between requests to the same store by default, and reads one store at a time.
- If the pretty `/wp-json/` address is blocked or missing, it tries the plain `?rest_route=` form of the same endpoint before giving up.

### Limits

- It works only with stores built on WooCommerce. Shopify, Magento and other platforms are not supported.
- Some stores put a firewall or bot protection in front of the API, and some switch the Store API off. Those stores come back as an error row.
- Product variations (sizes, colours) are not listed as separate rows. A variable product appears once, with its price range when the store provides it.
- Prices are what the store shows to a visitor with no account and no cart, from the location of the Apify server. Stores that switch currency by country, or give member prices, may show you something different in your browser.
- The price comparison works per store URL and per history name. If you change filters between runs, products you filtered out are simply not compared.

This Actor is an independent tool. It is not made by, or affiliated with, WooCommerce, Automattic, or the stores it reads.

# Actor input Schema

## `startUrls` (type: `array`):

The home page or shop page of a WooCommerce store, for example https://mercantile.wordpress.org/. Several stores can be listed in one run; they are read one after another.

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

Stop after this many products in total, across all stores.

## `maxItemsPerStore` (type: `integer`):

Optional cap for each store, so one big store does not use up the whole run.

## `categories` (type: `array`):

Keep only products in one of these categories. Use the category slug as it appears in the store's URLs (for example drinkware), the category ID, or the category name.

## `tags` (type: `array`):

Keep only products with one of these tags (slug, ID or name).

## `search` (type: `string`):

Passed to the store's own product search.

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

Keep only products that have a sale price right now.

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

Skip products that are out of stock.

## `includeShortDescription` (type: `boolean`):

The product's short description as plain text. Turn off for smaller rows.

## `trackPriceChanges` (type: `boolean`):

Remember each product's price in a named key-value store in your account and add the previous price and the change to every row.

## `changesOnly` (type: `boolean`):

Turns on the comparison and leaves out products whose price did not change since the previous run. The first run returns every product as new.

## `historyName` (type: `string`):

Name of the key-value store that keeps the previous prices. Use a different name for each separate monitoring task.

## `requestDelayMs` (type: `integer`):

Minimum time between two requests to the same store. A longer crawl delay in the store's robots.txt always wins.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://mercantile.wordpress.org/"
    }
  ],
  "maxItems": 20,
  "onSaleOnly": false,
  "inStockOnly": false,
  "includeShortDescription": true,
  "trackPriceChanges": false,
  "changesOnly": false,
  "historyName": "woocommerce-price-history",
  "requestDelayMs": 1000
}
```

# Actor output Schema

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

One row per product: name, prices, discount, stock, categories, rating and links.

# 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 = {
    "startUrls": [
        {
            "url": "https://mercantile.wordpress.org/"
        }
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("sampon/woocommerce-store-products").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 = {
    "startUrls": [{ "url": "https://mercantile.wordpress.org/" }],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("sampon/woocommerce-store-products").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 '{
  "startUrls": [
    {
      "url": "https://mercantile.wordpress.org/"
    }
  ],
  "maxItems": 20
}' |
apify call sampon/woocommerce-store-products --silent --output-dataset

```

## MCP server setup

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

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/t4AgnHFUfwKuBN3vX/builds/8YCdh0Uyn1KUA6VWK/openapi.json
