# WooCommerce Website Scraper (`data_foundry/woocommerce-scraper`) Actor

Scrape WooCommerce Site (Products + Categories + Payment Method)

- **URL**: https://apify.com/data_foundry/woocommerce-scraper.md
- **Developed by:** [Data Foundry](https://apify.com/data_foundry) (community)
- **Categories:** E-commerce, SEO tools
- **Features:** Limited permissions
- **Stats:** 87 total users, 1 monthly users, 93.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Website Scraper

Scrape any WooCommerce store's products, categories and checkout options through the store's own public Store API - with filters, sorting and pagination handled for you. No plugin, no key, no browser.

<table>
<tr>
<th>What you get</th>
<th>Built for</th>
</tr>
<tr>
<td valign="top">

🛍️ **Products** with prices, sale prices, stock and images <br>
🗂️ **Categories** with ids, slugs and counts <br>
💳 **Payment methods** the store accepts <br>
🔎 **Filters**: category, min/max price, on sale <br>
↕️ **Sort and order** exactly as the API supports <br>
🔁 **Pagination** handled, with a hard limit you control

</td>
<td valign="top">

🏪 **Price and assortment research** across stores <br>
🧮 **Feed building** for marketplaces and comparison sites <br>
🕵️ **Competitor catalogues** - what they sell and at what price <br>
📉 **Sale monitoring** via `on_sale` and price fields <br>
🤖 **LLM-ready JSON**, one row per product <br>
🔗 **API, schedules, integrations** via Apify

</td>
</tr>
</table>

### What data do I get?

One dataset record per resource, chosen with `resource`.

| Resource | What you get |
|---|---|
| `products` | id, name, slug, permalink, sku, prices (`price`, `regular_price`, `sale_price` plus the raw `prices` object), stock, categories, tags, images, description, ratings |
| `categories` | id, name, slug, parent, count, description, image |
| `payment_methods` | the gateways the store advertises |

### How much does it cost?

Pay per event: **$1.50 per 1,000 items scraped** ($0.0015 each). One item is one product, category or payment method.

| Task | Items | Cost |
|---|---|---|
| One store, full catalogue | 1,000 | **$1.50** |
| 100 stores, 100 products each | 10,000 | **$15.00** |
| Weekly sweep of 500 stores | 50,000 | **$75.00** |

### How do I use it?

1. [Create](https://console.apify.com/sign-up) a free Apify account.
2. Open **WooCommerce Website Scraper** in Apify Console.
3. Add one or more store URLs to `url`, each as `{ "url": "https://example.com" }`.
4. Choose `resource` (products by default) and a `limit` for the whole run.
5. Optionally add `filters`, `sort`, `order` and a proxy.
6. Start the run and download JSON, CSV, Excel or XML.

### Input

| Field | Type | Description |
|---|---|---|
| `url` | array | Store base URLs, each as `{ "url": "https://..." }`. The actor appends the Store API path. |
| `proxyConfiguration` | object | Optional Apify Proxy or your own proxy. |
| `limit` | integer | Maximum items for the whole run, across every URL. 0 means no limit. |
| `resource` | string | `products`, `categories` or `payment_methods`. |
| `filters` | object | `category` (ID), `min_price` / `max_price` in store currency units (e.g. `"20"` = $20), `on_sale`. |
| `sort` | string | Sort field supported by the Store API, e.g. `price`, `date`, `popularity`. |
| `order` | string | `asc` or `desc`. |

```json
{
  "url": [{ "url": "https://example-store.com" }],
  "resource": "products",
  "limit": 500,
  "filters": { "category": "12", "min_price": "20", "on_sale": true },
  "sort": "price",
  "order": "asc"
}
```

### Output

```json
{
  "id": 1234,
  "name": "Organic Hoodie",
  "slug": "organic-hoodie",
  "permalink": "https://example-store.com/product/organic-hoodie/",
  "type": "simple",
  "status": "publish",
  "sku": "HOOD-01",
  "price": "4500",
  "regular_price": "5500",
  "sale_price": "4500",
  "prices": {
    "price": "4500",
    "regular_price": "5500",
    "sale_price": "4500",
    "currency_code": "USD",
    "currency_minor_unit": 2
  },
  "on_sale": true,
  "average_rating": "4.5",
  "review_count": 20,
  "images": ["https://example-store.com/wp-content/uploads/hoodie.jpg"],
  "categories": ["Hoodies"],
  "in_stock": true,
  "stock_quantity": 10,
  "stock_availability": {"text": "In stock", "class": "in-stock"},
  "add_to_cart": {"minimum": 1, "maximum": 10},
  "images_detailed": [{"src": "https://example-store.com/wp-content/uploads/hoodie.jpg", "alt": "Organic Hoodie"}],
  "categories_detailed": [{"id": 12, "name": "Hoodies", "slug": "hoodies"}],
  "tags_detailed": [],
  "brands": []
}
```

Prices are the store's raw Store API strings in minor units: `"4500"` with `currency_minor_unit: 2` means $45.00.

### Notes and exceptions

- **Public Store API only.** The actor uses the store's own public Store API, the same one its front-end calls. No consumer key or secret is needed.
- **Stores that disabled the Store API** (or block REST access) are reported as failures; a run that pushes no items ends with FAILED status.
- **Price filters use the store's own units.** The input is in major units (`"20"` = $20); the actor converts it with the store's `currency_minor_unit` before calling the API.
- **Multiple stores are supported.** Add more entries to `url`; duplicates across stores are skipped and `limit` applies once to the whole run.
- **Transient failures are retried automatically.** A URL that still fails is counted in `SUMMARY.urlsFailed`.
- **Hidden and draft products** are not public and will not appear.
- **Variations are listed by ID** in the `variations` field; full variation records are not fetched.
- **`limit` is yours to set** - without it a large catalogue can produce a very large dataset.

### What can I do with the data?

**Price monitoring.** Pull a competitor's catalogue weekly with `sort: price` and diff sale prices - the same job a paid repricing tool does, at $1.50 per thousand items.

**Feed building.** Products with `permalink`, `images` and prices map directly onto marketplace feeds.

**Assortment research.** `categories` plus counts tells you how a store organises its catalogue and where it is expanding.

### Related Actors

- **[Shopify Website Scraper](https://apify.com/data_foundry/shopify-scraper)** - the same job for Shopify stores.
- **[Pricing Page Monitor](https://apify.com/data_foundry/pricing-page-monitor)** - competitor price changes, diffed.
- **[Review Scraper](https://apify.com/data_foundry/review-scraper)** - reviews across 11 sources.

### FAQ

**Do I need WooCommerce API keys?** No. The Store API is public by design.

**Does it work on stores with the Store API disabled?** No - that is a store setting, and it will be reported as an error.

**Can I get product reviews?** Use the **Review Scraper** for that; this actor covers catalogue data.

**How do I scrape several stores?** Add each store to `url`. The actor dedupes rows and applies `limit` to the whole run.

**What do the price filters expect?** Store currency units: `"20"` means $20. The actor converts to the store's minor units internally.

### Changelog

- **2.4** - major-unit price filters, proxy support, faster and more resilient scraping, honest FAILED status.
- **2.3** - related actors, store copy.
- **2.2** - pagination fix and a global `limit`.
- **0.1** - First release.

# Actor input Schema

## `url` (type: `array`):

List of WooCommerce store URLs to scrape (e.g., https://woocommerce.com/).

## `proxyConfiguration` (type: `object`):

Leave empty to connect directly. Enable Apify Proxy or your own proxy when a store blocks the data-center IP.

## `limit` (type: `integer`):

Maximum number of products to scrape. 0 for unlimited.

## `resource` (type: `string`):

Type of resource to scrape. Supported: 'products', 'categories'.

## `filters` (type: `object`):

Filters for product scraping

## `sort` (type: `string`):

Field to sort results by.

## `order` (type: `string`):

Order of sorting.

## Actor input object example

```json
{
  "url": [
    {
      "url": "https://woocommerce.com/"
    }
  ],
  "limit": 0,
  "resource": "products",
  "filters": {},
  "sort": "date",
  "order": "desc"
}
```

# 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 = {
    "url": [
        {
            "url": "https://woocommerce.com/"
        }
    ]
};

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

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

```

## MCP server setup

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