# WordPress Posts & WooCommerce Products Scraper | 2Space (`2space/wordpress-woocommerce-scraper`) Actor

Fast WordPress blog and WooCommerce store scraper. Scrapes posts, pages, clean Markdown articles, authors, and public WooCommerce product catalogs, prices, SKUs, and stock status.

- **URL**: https://apify.com/2space/wordpress-woocommerce-scraper.md
- **Developed by:** [2Space Group](https://apify.com/2space) (community)
- **Categories:** E-commerce, AI, Marketing
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 wordpress or woocommerce items scraped

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/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

## WordPress Posts & WooCommerce Products Scraper | 2Space

> **Built by 2Space Group** · Fast, zero-browser **WordPress scraper**, **WooCommerce product scraper**, **WordPress REST API scraper**, and **WordPress to Markdown** extractor built for AI agents, MCP clients, e-commerce catalogs, and automated content workflows.

[![Apify Actor](https://img.shields.io/badge/Apify-wordpress--woocommerce--scraper-00C853?style=flat-square)](https://apify.com/reminiscent_medaka/wordpress-woocommerce-scraper)
[![MCP Ready](https://img.shields.io/badge/MCP-Ready-2563EB?style=flat-square)](https://mcp.apify.com)
[![Zero Browser](https://img.shields.io/badge/Runtime-Pure%20HTTP%20%2B%20JSON%2FXML-7C3AED?style=flat-square)](https://apify.com/reminiscent_medaka/wordpress-woocommerce-scraper)

Whether you need a high-speed **WordPress scraper** to ingest blog posts and pages, a structured **WooCommerce scraper** to extract live product catalogs and pricing via the public Store API, a **WordPress REST API scraper** with automatic RSS XML fallback, or clean **WordPress to Markdown** output for LLM pipelines and RAG knowledge bases, this Actor delivers flat, agent-ready JSON records over pure HTTP with zero Playwright or Puppeteer overhead and zero external LLM API keys.

***

### Key Features & Capabilities

- **Zero-Browser HTTP Speed:** Queries public WordPress REST API v2 (`/wp-json/wp/v2/posts`, `/wp-json/wp/v2/pages`) and WooCommerce Store API v1 (`/wp-json/wc/store/v1/products`) directly over HTTP—returning structured data in seconds without browser startup cost.
- **Automatic RSS / Atom Fallback:** When a site disables or blocks WP REST JSON endpoints, the scraper seamlessly falls back to `/feed/` RSS 2.0 or Atom XML parsing so your extraction pipeline still succeeds.
- **Clean HTML-to-Markdown Conversion:** Converts rich WordPress post HTML and WooCommerce product descriptions into clean, readable Markdown (`contentMarkdown`) alongside a plain-text `excerpt`.
- **Flat Scalar WooCommerce Fields:** Extracts top-level scalar fields (`sku`, `price`, `regularPrice`, `salePrice`, `currency`, `stockStatus`, `categories`, `imageUrl`) from WooCommerce minor-unit price objects—ready for Google Sheets, SQL databases, CSV exports, and AI tool calls.
- **Empty `{}` Input Ready:** Run with `{}` out of the box—defaults to `https://wordpress.org/news` in `auto` mode (`maxItems: 10`, `maxCostUsd: 0.25`).
- **No Data, No Charge (Pay-Per-Event):** Uses the single `wp-item-scraped` event (`count: 1`), charged **only after** a validated, non-empty record is pushed to the dataset, with strict pre-charge `maxItems` and `maxCostUsd` spending guards.

***

### Common Use Cases

1. **AI Knowledge Bases & RAG Ingestion:** Convert company blogs, documentation hubs, and WordPress knowledge bases directly into clean Markdown documents (`contentMarkdown`).
2. **WooCommerce Catalog & Price Extraction:** Pull SKUs, sale prices, currencies, stock availability, categories, and product imagery from public WooCommerce storefronts.
3. **Competitive Content & Product Research:** Aggregate articles, release notes, and product listings across multiple WordPress domains in a single run.
4. **Live AI Agent & MCP Tool Calling:** Let ChatGPT, Claude, Cursor, or Antigravity query any WordPress site or WooCommerce store on demand.

***

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `domainsOrUrls` | `string[]` | `["https://wordpress.org/news"]` | WordPress or WooCommerce site base URLs or domains (supports subpath installs like `https://wordpress.org/news`). |
| `mode` | `string` | `"auto"` | Extraction mode: `auto`, `posts`, `pages`, `products`, or `rss`. |
| `searchQuery` | `string` | `""` | Optional keyword passed to the WordPress/WooCommerce `?search=` filter. |
| `perPage` | `integer` | `10` | Records requested per API page (`1`–`100`). |
| `maxItems` | `integer` | `10` | Hard cap on deduplicated items pushed and billed per run. |
| `maxCostUsd` | `number` | `0.25` | Pre-charge spending safety cap in USD for Pay-Per-Event runs. |

***

### Example JSON Output

Each dataset record uses flat scalar fields suitable for both WordPress posts/pages and WooCommerce products:

```json
{
  "itemType": "product",
  "sourceType": "wc-store-products",
  "siteUrl": "https://shop.example.com",
  "id": "4821",
  "slug": "organic-cotton-hoodie",
  "title": "Organic Cotton Hoodie",
  "url": "https://shop.example.com/product/organic-cotton-hoodie/",
  "publishedAt": null,
  "modifiedAt": null,
  "author": null,
  "excerpt": "Heavyweight brushed organic cotton pullover hoodie.",
  "contentMarkdown": "## Product Details\n\n- 100% organic ring-spun cotton\n- Pre-shrunk fleece lining",
  "categories": "Hoodies, Apparel",
  "tags": "organic, winter",
  "imageUrl": "https://shop.example.com/wp-content/uploads/hoodie.jpg",
  "sku": "OCH-BLK-L",
  "price": "49.99",
  "regularPrice": "64.99",
  "salePrice": "49.99",
  "currency": "USD",
  "stockStatus": "instock",
  "extractedAt": "2026-12-01T08:15:00.000Z"
}
```

Execution diagnostics are persisted to the default Key-Value Store under `RUN_DIAGNOSTICS`, including endpoint HTTP status codes, parsed counts, deduplication totals, and cost-limit flags.

***

### MCP & AI Assistant Integration (ChatGPT, Claude, Cursor)

Connect `reminiscent_medaka/wordpress-woocommerce-scraper` directly to ChatGPT, Claude Desktop, Cursor, or Antigravity via the Apify MCP Server:

```text
https://mcp.apify.com/?actors=reminiscent_medaka/wordpress-woocommerce-scraper
```

Or add the server block to your `mcpServers` config in Cursor or Claude Desktop:

```json
{
  "mcpServers": {
    "apify-wordpress-woocommerce": {
      "url": "https://mcp.apify.com/?actors=reminiscent_medaka/wordpress-woocommerce-scraper",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

Example prompt: *"Use wordpress-woocommerce-scraper to extract the latest 10 posts from https://wordpress.org/news as clean Markdown."*

You can also call the synchronous Apify REST API directly from n8n, Make, or Zapier:

```text
POST https://api.apify.com/v2/acts/reminiscent_medaka~wordpress-woocommerce-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN
```

***

### Pricing & No Data, No Charge Guarantee

- **Pay-Per-Event (`wp-item-scraped`):** Billed `count: 1` per validated, non-empty post, page, product, or RSS item pushed to the dataset.
- **No Data, No Charge:** If an endpoint returns no valid items or is unreachable, `Actor.charge()` is never invoked.
- **Budget Safety:** `maxItems`, `maxCostUsd`, and Apify's `eventChargeLimitReached` signal ensure runs terminate cleanly without overspending.

***

### Issues & Support

Encountered a custom WordPress permalink structure, localized WooCommerce currency format, or restricted REST endpoint? Open an issue on the Actor's **Issues** tab in Apify Console (`https://apify.com/reminiscent_medaka/wordpress-woocommerce-scraper/issues`) with your anonymized input payload and `RUN_DIAGNOSTICS` output.

# Actor input Schema

## `domainsOrUrls` (type: `array`):

WordPress or WooCommerce site base URLs or domains (e.g., 'https://wordpress.org/news', 'example.com').

## `mode` (type: `string`):

Endpoint strategy: 'auto' (WooCommerce products + WP REST posts with pages/RSS fallback), 'posts', 'pages', 'products', or 'rss'.

## `searchQuery` (type: `string`):

Optional keyword passed to WordPress REST and WooCommerce Store API ?search= parameter.

## `perPage` (type: `integer`):

Number of records requested per REST API page (1-100).

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

Hard cap on the maximum number of deduplicated items to push and charge.

## `maxCostUsd` (type: `number`):

Pre-charge spending safety cap in USD for Pay-Per-Event billing.

## Actor input object example

```json
{
  "domainsOrUrls": [
    "https://wordpress.org/news"
  ],
  "mode": "auto",
  "searchQuery": "",
  "perPage": 10,
  "maxItems": 10,
  "maxCostUsd": 0.25
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset items containing extracted posts, pages, and products with flat scalar fields.

# 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 = {
    "domainsOrUrls": [
        "https://wordpress.org/news"
    ],
    "mode": "auto",
    "searchQuery": "",
    "perPage": 10,
    "maxItems": 10,
    "maxCostUsd": 0.25
};

// Run the Actor and wait for it to finish
const run = await client.actor("2space/wordpress-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 = {
    "domainsOrUrls": ["https://wordpress.org/news"],
    "mode": "auto",
    "searchQuery": "",
    "perPage": 10,
    "maxItems": 10,
    "maxCostUsd": 0.25,
}

# Run the Actor and wait for it to finish
run = client.actor("2space/wordpress-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 '{
  "domainsOrUrls": [
    "https://wordpress.org/news"
  ],
  "mode": "auto",
  "searchQuery": "",
  "perPage": 10,
  "maxItems": 10,
  "maxCostUsd": 0.25
}' |
apify call 2space/wordpress-woocommerce-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,2space/wordpress-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/oRTXkO2FzzirZDcoL/builds/MQFThihh9DaSdWMY7/openapi.json
