# 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
- **Stats:** 69 total users, 6 monthly users, 100.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## WooCommerce Website Scraper

**WooCommerce Website Scraper** is a high-performance, feature-rich Apify Actor designed to scrape product and category data from any WooCommerce store.

This is an **enhanced version** of standard scrapers, offering significantly deeper data extraction while maintaining full compatibility with existing workflows.

### Features 🚀

*   **⚡ Enhanced Data Extraction**: detailed stock info, purchase limits, rich images, and deep taxonomy (slugs/IDs).
*   **📂 Full Resource Support**: Scrape `products`, `categories`, and `payment_methods`.
*   **🔍 Search & Filters**: Support for search queries, price ranges, and sale status.
*   **⚙️ Data Parity**: Output format is fully compatible with standard schemas but enriched with extra fields.
*   **⏩ Pagination**: Auto-traverses all pages to get complete datasets.
*   **🛡️ WAF Bypass**: Uses specialized HTTP clients to bypass Cloudflare and other protections.

### Usage 💡

#### Input Parameters

| Parameter | Type | Description |
| :--- | :--- | :--- |
| `url` | Array | List of WooCommerce store URLs (e.g., `https://woocommerce.com/`). |
| `resource` | String | What to scrape: `products` (default), `categories`, or `payment_methods`. |
| `limit` | Integer | Max items to scrape (0 for unlimited). |
| `filters` | Object | Optional filters (`search`, `min_price`, `on_sale`, etc.). |
| `sort` | String | Sort by `date`, `price`, `popularity`. |
| `order` | String | Sort order: `asc` or `desc`. |

#### Output

The scraper delivers results in a JSON format that extends the standard WooCommerce schema.

#### Output Fields
*   `id`, `name`, `slug`, `permalink`, `sku`
*   `price`, `regular_price`, `sale_price`
*   `images` (List of URLs), `categories`
*   `attributes`, `variations`
*   `stock_availability`: Detailed text like "Only 2 left in stock!" or "Available on backorder".
*   `add_to_cart`: Purchase constraints (minimum, maximum, step).
*   `images_detailed`: Full list of image objects containing `src`, `thumbnail`, `alt` (SEO text), and `srcset`.
*   `brands`: Brand information (if available).
*   `categories_detailed` & `tags_detailed`: Full objects with IDs and slugs.

### Tips

- If the scraper returns 0 results, ensure the target site is actually built with WooCommerce.

### Examples 📋

Here are comprehensive, real-world examples using `https://woocommerce.com`.

#### 1. Scrape Products 📦

**Input:**
```json
{
    "url": [{ "url": "https://woocommerce.com" }],
    "resource": "products",
    "limit": 1
}
````

**Output:**

```json
[
    {
        "id": 18734006072352,
        "name": "Multiple Shipping Addresses",
        "slug": "multiple-shipping-customer-addresses",
        "permalink": "https://woocommerce.com/products/multiple-shipping-customer-addresses/",
        "type": "simple",
        "status": null,
        "description": "<ul class=\"wccom-tick-list-primary\">\n<li><b>Ship to Multiple Addresses:</b> Ship individual items... (truncated for brevity) ...</li></ul>...",
        "short_description": "<p><b>Allow customers to ship individual items to multiple addresses in a single order.</b></p>",
        "sku": "",
        "price": "3900",
        "regular_price": "3900",
        "sale_price": "3900",
        "on_sale": null,
        "prices": {
            "price": "3900",
            "regular_price": "3900",
            "sale_price": "3900",
            "price_range": null,
            "currency_code": "USD",
            "currency_symbol": "USD $",
            "currency_minor_unit": 2,
            "currency_decimal_separator": ".",
            "currency_thousand_separator": ",",
            "currency_prefix": "USD $",
            "currency_suffix": ""
        },
        "price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">USD &#036;</span>39.00</span>",
        "average_rating": "0",
        "review_count": 0,
        "images": [
            "https://woocommerce.com/wp-content/uploads/2025/12/Multiple-Shipping-Addresses-Plugin.png",
            "https://woocommerce.com/wp-content/uploads/2025/12/Use-a-Dropdown-to-Show-Saved-Addresses-On-Checkout-1.png",
            "https://woocommerce.com/wp-content/uploads/2025/12/Ship-to-Multiple-Addresses-in-a-Single-Order-1.png",
            "https://woocommerce.com/wp-content/uploads/2025/12/Save-Multiple-Shipping-Addresses-For-Future-Checkouts-1.png",
            "https://woocommerce.com/wp-content/uploads/2025/12/Personalized-Shipping-Address-Form-1.png",
            "https://woocommerce.com/wp-content/uploads/2025/12/Custom-Emails-for-Shipping-Notifications-1.png",
            "https://woocommerce.com/wp-content/uploads/2025/12/Allow-Customers-To-Add-Shipping-Addresses-Directly-from-Checkout-1.png"
        ],
        "categories": [
            "WooCommerce extensions",
            "Shipping, delivery and fulfillment",
            "Delivery options and enhancements",
            "Store content and customizations",
            "Cart and checkout features"
        ],
        "tags": [],
        "attributes": [],
        "variations": [],
        "has_options": false,
        "is_purchasable": true,
        "in_stock": true,
        "stock_quantity": null,
        "stock_availability": {
            "text": "",
            "class": "in-stock"
        },
        "add_to_cart": {
            "text": "Add to cart",
            "description": "Add to cart: &ldquo;Multiple Shipping Addresses&rdquo;",
            "url": "/wp-json/wc/store/v1/products?page=1&#038;per_page=20&#038;orderby=date&#038;order=desc&#038;add-to-cart=18734006072352",
            "single_text": "Add to cart",
            "minimum": 1,
            "maximum": 9999,
            "multiple_of": 1
        },
        "images_detailed": [
            {
                "id": 18734006124909,
                "src": "https://woocommerce.com/wp-content/uploads/2025/12/Multiple-Shipping-Addresses-Plugin.png",
                "thumbnail": "https://woocommerce.com/wp-content/uploads/2025/12/Multiple-Shipping-Addresses-Plugin.png?w=160",
                "srcset": "https://woocommerce.com/wp-content/uploads/2025/12/Multiple-Shipping-Addresses-Plugin.png 160w, ...",
                "sizes": "(max-width: 160px) 100vw, 160px",
                "name": "Multiple Shipping Addresses Plugin",
                "alt": "Multiple Shipping Addresses Plugin"
            }
        ],
        "brands": [],
        "categories_detailed": [
            {
                "id": 1021,
                "name": "WooCommerce extensions",
                "slug": "woocommerce-extensions",
                "link": "https://woocommerce.com/product-category/woocommerce-extensions/"
            },
            {
                "id": 28685,
                "name": "Shipping, delivery and fulfillment",
                "slug": "shipping-delivery-and-fulfillment",
                "link": "https://woocommerce.com/product-category/woocommerce-extensions/shipping-delivery-and-fulfillment/"
            }
        ],
        "tags_detailed": []
    }
]
```

#### 2. Scrape Categories 📂

**Input:**

```json
{
    "url": [{ "url": "https://woocommerce.com" }],
    "resource": "categories"
}
```

**Output:**

```json
[
    {
        "id": 1028,
        "name": "Accounting",
        "slug": "accounting-extensions",
        "description": "Accounting Extensions for WooCommerce",
        "count": 23,
        "parent": 1888,
        "image": null,
        "link": "https://woocommerce.com/product-category/accounting-extensions/"
    }
]
```

#### 3. Scrape Payment Methods 💳

**Input:**

```json
{
    "url": [{ "url": "https://woocommerce.com" }],
    "resource": "payment_methods"
}
```

**Output:**

```json
[
    {
        "url": "https://woocommerce.com",
        "payment_methods": [
            "woocommerce_payments",
            "ppcp-gateway"
        ]
    }
]
```

### License

Apache-2.0

# Actor input Schema

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

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

## `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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=data_foundry/woocommerce-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "WooCommerce Website Scraper",
        "description": "Scrape WooCommerce Site (Products + Categories + Payment Method)",
        "version": "2.0",
        "x-build-id": "k4kW1UVxsaldj1hgQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/data_foundry~woocommerce-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-data_foundry-woocommerce-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/data_foundry~woocommerce-scraper/runs": {
            "post": {
                "operationId": "runs-sync-data_foundry-woocommerce-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/data_foundry~woocommerce-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-data_foundry-woocommerce-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "List of WooCommerce store URLs to scrape (e.g., https://woocommerce.com/).",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "limit": {
                        "title": "Max Items",
                        "type": "integer",
                        "description": "Maximum number of products to scrape. 0 for unlimited.",
                        "default": 0
                    },
                    "resource": {
                        "title": "Resource Type",
                        "enum": [
                            "products",
                            "categories",
                            "payment_methods"
                        ],
                        "type": "string",
                        "description": "Type of resource to scrape. Supported: 'products', 'categories'.",
                        "default": "products"
                    },
                    "filters": {
                        "title": "Filters",
                        "type": "object",
                        "description": "Filters for product scraping",
                        "properties": {
                            "search": {
                                "type": "string",
                                "title": "Search Query",
                                "description": "Term to search for in products."
                            },
                            "min_price": {
                                "type": "string",
                                "title": "Min Price",
                                "description": "Minimum price filter (e.g. '10.00')."
                            },
                            "max_price": {
                                "type": "string",
                                "title": "Max Price",
                                "description": "Maximum price filter (e.g. '100.00')."
                            },
                            "category": {
                                "type": "string",
                                "title": "Category ID",
                                "description": "Filter by category ID."
                            },
                            "on_sale": {
                                "type": "boolean",
                                "title": "On Sale",
                                "description": "Only return products on sale."
                            }
                        },
                        "default": {}
                    },
                    "sort": {
                        "title": "Sort By",
                        "enum": [
                            "date",
                            "price",
                            "popularity",
                            "rating",
                            "title"
                        ],
                        "type": "string",
                        "description": "Field to sort results by.",
                        "default": "date"
                    },
                    "order": {
                        "title": "Sort Order",
                        "enum": [
                            "asc",
                            "desc"
                        ],
                        "type": "string",
                        "description": "Order of sorting.",
                        "default": "desc"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
