# WooCommerce Products Scraper: Prices, Stock and SKU (`joesimo/woocommerce-products`) Actor

Pull the public product catalog from any WooCommerce store through its Store API: name, price, sale price, SKU, stock, categories, images and variations. Paste a store, category or product URL. No login. Failed or blocked stores are free.

- **URL**: https://apify.com/joesimo/woocommerce-products.md
- **Developed by:** [Joe Simo](https://apify.com/joesimo) (community)
- **Categories:** E-commerce, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 products

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 Products Scraper: Prices, Stock and SKU

Read the public product catalog of any WooCommerce store and get one clean row per product: name, price, regular and sale price, currency, SKU, stock, rating, categories, tags, brands, images, attributes and variations.

The Actor reads the WooCommerce Store API (`/wp-json/wc/store/v1/products`) that the store's own shop pages use. No login, no API key, no browser. It returns public catalog data only, never customer or order data.

### Quick start

1. Paste a store URL, for example `seedsforgenerations.com`.
2. Keep **Max products** at 20 for a first run (about $0.02).
3. Click **Start** and open the **Products** table, or export JSON, CSV or Excel.

An empty input runs a 20-product demo on seedsforgenerations.com.

### What you get

| Field | Example |
| --- | --- |
| name | Wildflower Mix North American Shade |
| price, regularPrice, salePrice | 3.25, 3.25, null |
| currency | USD |
| sku | SGF603 |
| inStock, onSale, purchasable | true, false, true |
| categories, tags, brands | \["Flower", "Full Sun"], \["flower"], \[] |
| averageRating, reviewCount | 0, 0 |
| image, images | product image URLs |
| attributes, variations | Color: Blue, Green; variation ids with values |
| priceMin, priceMax | price range of a variable product |
| description, descriptionHtml | plain text and HTML (optional) |

Prices are converted from the API's minor units, so `1999` with 2 decimals is saved as `19.99`.

### How to run it

- **Whole store:** `example.com` or `https://example.com/shop/`
- **One category:** `https://example.com/product-category/books/` (nested categories use the last part of the path)
- **One product:** `https://example.com/product/blue-mug/`
- **Many stores:** add more lines, or paste a list into **Bulk paste**.
- **Filters:** tags, in stock only, on sale only.

### How it works

1. Checks the store's robots.txt and skips the store if it disallows `/wp-json/wc/store/v1/products`.
2. For a category URL, finds the category id through `/wp-json/wc/store/v1/products/categories`.
3. Reads products 100 per page and follows the `X-WP-TotalPages` header until the end or your cap.
4. Writes a run summary (per-store counts, requests, stop reason) to the `OUTPUT` record.

### Pricing

Pay per event: **$0.001 per product saved** ($1.00 per 1,000 products). Status rows are free:

- `no_store_api`: the site is not WooCommerce, or its Store API is turned off or restricted
- `blocked`: the site answered with a bot challenge or HTTP 401/403
- `blocked_by_robots`: robots.txt disallows the Store API
- `no_products`, `failed`, `invalid_input`

Set a maximum cost per run in the run options and the Actor stops at that limit.

### Input example

```json
{
  "stores": [
    "seedsforgenerations.com",
    "https://seedsforgenerations.com/product-category/book/"
  ],
  "inStockOnly": true,
  "maxProducts": 200
}
```

### Output example

```json
{
  "status": "ok",
  "store": "seedsforgenerations.com",
  "productId": 113935,
  "name": "Wildflower Mix North American Shade",
  "url": "https://seedsforgenerations.com/product/wildflower-mix-north-american-shade/",
  "type": "simple",
  "sku": "SGF603",
  "currency": "USD",
  "price": 3.25,
  "regularPrice": 3.25,
  "salePrice": null,
  "inStock": true,
  "categories": ["Flower", "Full Sun", "New"],
  "image": "https://www.seedsforgenerations.com/wp-content/uploads/sites/2/2026/07/North-American-Shade-Wildflower-Mix-Photo.jpg"
}
```

### FAQ

**Can I use it as a WooCommerce price scraper for competitor stores?** Yes. Each product row has `price`, `regularPrice`, `salePrice` and `onSale`, and variable products also get `priceMin` and `priceMax`. Schedule the Actor in Apify to run daily or weekly and compare the datasets to see price changes. Turn on **On sale only** to keep just the discounted products.

**Can I check WooCommerce stock?** Yes, as far as the store shows it to shoppers. `inStock`, `onBackorder` and `purchasable` are on every row, and `stockText` and `lowStockRemaining` are filled when the store displays stock counts. Turn on **In stock only** to skip sold-out products.

**Does it use the WooCommerce REST API? Do I need API keys?** No keys are needed. The Actor reads the public WooCommerce Store API (`/wp-json/wc/store/v1/products`), the same endpoint the store's own shop pages call. It does not use the authenticated REST API (`/wp-json/wc/v3`), so it never sees orders, customers or unpublished products.

**Can I scrape several WooCommerce stores in one run?** Yes. Add one store per line or paste a list into **Bulk paste**. **Max products** is a cap for the whole run, not per store. A store that cannot be read gets its own free status row and the other stores are still read.

**Does it work on any WordPress site?** Only on sites running WooCommerce with the Store API on (the default since WooCommerce 6). Other sites, and stores that turned the Store API off, get a free `no_store_api` row (sites behind a bot challenge get `blocked`), so you can also use a run to see which sites in a list sell through WooCommerce.

**Do products removed by my filters cost anything?** No. Only saved products that match your tag, in-stock and on-sale filters are charged at $0.001 each.

### Limits and notes

- Works on WooCommerce 6.x and newer, where the Store API is on by default. Some stores turn it off or put it behind a firewall; those rows are free.
- Only published products are returned. Private, draft and password-protected products are not in the Store API.
- Stock counts are only shown when the store displays them (`lowStockRemaining`, `stockText`).
- Variation rows list each variation id and its attribute values. Per-variation prices are not part of the list endpoint.
- Shopify stores: use [Shopify Products Scraper](https://apify.com/joesimo/shopify-products).

### Support

Questions or feature requests: joesimo@mail.grokbot.com

Docs for every Joe Simo Actor: [github.com/Joe-Simo/apify-actors](https://github.com/Joe-Simo/apify-actors)

# Actor input Schema

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

WooCommerce store domains or URLs, category pages (/product-category/...) or product pages (/product/...). The form is prefilled with seedsforgenerations.com. Clear the list and start to run the 20-product demo on that store.

## `storesText` (type: `string`):

Optional extra stores, one per line (or separated by commas). Mixed with Store URLs.

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

Keep products that have at least one of these product tags (case insensitive). Leave empty for every tag.

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

Keep only products the store marks as in stock.

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

Keep only products that have a sale price right now.

## `includeDescription` (type: `boolean`):

Save the HTML description and short description plus plain-text copies. Turn off for smaller rows.

## `maxProducts` (type: `integer`):

Stop after this many matching products. 0 means no extra cap (the run still stops at your max cost). The form is prefilled at 20 so a first Try costs about $0.02. Empty input (no store URL) also uses 20 for the demo.

## `respectRobotsTxt` (type: `boolean`):

Skip a store when its robots.txt disallows /wp-json/wc/store/v1/products. Those rows are free.

## `timeoutSecs` (type: `integer`):

Timeout for each HTTP request to a store. Some WordPress hosts are slow, so the default is 30.

## Actor input object example

```json
{
  "stores": [
    "seedsforgenerations.com"
  ],
  "tags": [],
  "inStockOnly": false,
  "onSaleOnly": false,
  "includeDescription": true,
  "maxProducts": 20,
  "respectRobotsTxt": true,
  "timeoutSecs": 30
}
```

# Actor output Schema

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

One item per product, plus free status rows for a store that has no Store API, failed, is blocked, or is blocked by robots.txt.

## `runSummary` (type: `string`):

JSON summary: products saved, per-store counts, requests and stop reason.

# 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": [
        "seedsforgenerations.com"
    ],
    "maxProducts": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("joesimo/woocommerce-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 = {
    "stores": ["seedsforgenerations.com"],
    "maxProducts": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("joesimo/woocommerce-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 '{
  "stores": [
    "seedsforgenerations.com"
  ],
  "maxProducts": 20
}' |
apify call joesimo/woocommerce-products --silent --output-dataset

```

## MCP server setup

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