# Shopify & WooCommerce Price & Stock Monitor (`yorak-labs/shopify-woocommerce-price-stock-monitor`) Actor

Fast, browserless e-commerce scraper that auto-detects Shopify and WooCommerce stores to extract product prices, compare-at prices, automatic discount percentages, SKUs, and real-time stock status.

- **URL**: https://apify.com/yorak-labs/shopify-woocommerce-price-stock-monitor.md
- **Developed by:** [Ara Arshakyan](https://apify.com/yorak-labs) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 products 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

## Shopify & WooCommerce Price & Stock Monitor

**Fast, browserless e-commerce price, discount, SKU, and inventory monitoring for Shopify and WooCommerce stores — in one unified Apify Actor.**

Extract clean, normalized product catalogs from any public **Shopify** or **WooCommerce** storefront in seconds without launching slow, expensive headless browsers. Built for **e-commerce brands**, **dropshippers**, **competitor price-tracking workflows**, and **AI agents** that need reliable structured JSON feeds.

***

### Why Use Shopify & WooCommerce Price & Stock Monitor?

- **Auto-detects platform automatically**: Paste any mix of Shopify and WooCommerce store URLs — no manual platform selectors required.
- **Ultra-fast JSON/HTTP extraction (no headless browser)**: Queries Shopify's `/products.json` and WooCommerce's Store API (`/wp-json/wc/store/v1/products`) directly, with an automatic `CheerioCrawler` fallback parsing JSON-LD `Product` schema from `/shop/` and product XML sitemaps.
- **Automatic discount calculation**: Normalizes current `price` and `compareAtPrice` across localized formats and minor currency units, and computes exact `discountPercent` automatically.
- **Real-time stock filtering**: Track `inStock` boolean availability across variants, or enable `onlyInStock: true` to export only purchasable products.
- **Fault-tolerant multi-store runs**: Clean per-store error isolation guarantees that a single blocked or invalid domain never crashes the rest of your monitoring job.
- **Ready for AI agents & automation**: Structured Apify Output Schema (`overview` view) plugs directly into Apify Schedules, Webhooks, Make, Zapier, n8n, Google Sheets, and MCP/LLM agent workflows.

***

### Feature Comparison

| Feature | Shopify & WooCommerce Price & Stock Monitor | Traditional Headless Browser Scrapers | Single-Platform Scrapers |
| --- | :---: | :---: | :---: |
| **Fast JSON/HTTP extraction (no browser overhead)** | Yes (seconds per store) | No (high CPU/RAM & slow page loads) | Varies |
| **Shopify + WooCommerce in one Actor** | Yes (auto-detected per URL) | Usually custom setup per site | No (separate Actors & schemas) |
| **Automatic discount calculation (`discountPercent`)** | Yes (normalized numeric fields) | Manual post-processing | Rarely |
| **WooCommerce Store API + JSON-LD fallback** | Yes (dual-layer resilience) | HTML-only brittle selectors | Partial |
| **Normalized unified output schema** | Yes (identical fields across platforms) | Varies per website | Platform-specific |
| **Per-store error isolation** | Yes | Often fails entire run | Varies |
| **Pay-per-Event predictable pricing** | Yes (pay only per scraped product) | Unpredictable compute-unit spikes | Varies |

***

### Use Cases

- **E-commerce Brands & Merchandisers**: Track competitor MSRP, seasonal markdowns, flash sales, and stockouts on an hourly or daily Apify Schedule.
- **Dropshippers & Resellers**: Detect supplier price changes, out-of-stock SKUs, and margin-eroding discounts before customer orders fail.
- **Price-Tracking Workflows**: Pipe dataset webhooks into Slack, Airtable, BigQuery, Snowflake, or Google Sheets to trigger instant price-drop alerts.
- **AI Agents & Market Research Pipelines**: Supply clean, strongly typed product records (`price`, `compareAtPrice`, `discountPercent`, `currency`, `inStock`, `sku`) directly to LLM shopping assistants and pricing analysts.

***

### Pricing (Pay-per-Event)

This Actor uses transparent **Pay-per-Event (PPE)** pricing billed via the `product-scraped` event — you only pay for products successfully extracted and saved to your dataset (out-of-stock products skipped when `onlyInStock: true` are not charged).

| Event / Volume | Rate | Estimated Cost |
| --- | --- | --- |
| **Per product scraped (`product-scraped`)** | $0.0015 / product | $0.0015 |
| **100 products** (quick competitor spot-check) | $1.50 / 1,000 products | **$0.15** |
| **1,000 products** (typical multi-store monitor) | $1.50 / 1,000 products | **$1.50** |
| **10,000 products** (full catalog intelligence) | $1.50 / 1,000 products | **$15.00** |
| **50,000 products** (enterprise multi-brand tracking) | $1.50 / 1,000 products | **$75.00** |

> Because the Actor runs purely on lightweight HTTP/JSON and Cheerio without Chromium, platform compute usage stays minimal and runs complete rapidly.

***

### Input Configuration

| Field | Type | Required | Default | Description |
| --- | --- | :---: | --- | --- |
| `storeUrls` | Array (`requestListSources`) | Yes | Allbirds & Gymshark | One or more Shopify or WooCommerce store URLs. |
| `maxProductsPerStore` | Integer (`1–5000`) | No | `100` | Maximum number of products to save per store. |
| `onlyInStock` | Boolean | No | `false` | If `true`, only in-stock products are saved and billed. |
| `proxyConfiguration` | Object (`proxy`) | No | None | Optional Apify Proxy or custom proxy URLs for rate-limited storefronts. |

#### Example Input JSON

```json
{
  "storeUrls": [
    { "url": "https://www.allbirds.com" },
    { "url": "https://www.gymshark.com" }
  ],
  "maxProductsPerStore": 100,
  "onlyInStock": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

***

### Output Format

Every scraped product is normalized to the same consistent schema across Shopify and WooCommerce, and displayed cleanly in the Apify Console **Overview** table view (`storeDomain`, `platform`, `title`, `price`, `compareAtPrice`, `discountPercent`, `currency`, `inStock`, `sku`, `productUrl`).

#### Example Output JSON

```json
[
  {
    "storeDomain": "allbirds.com",
    "platform": "Shopify",
    "title": "Men's Wool Runner Go",
    "handle": "mens-wool-runner-go-natural-black",
    "vendor": "Allbirds",
    "productType": "Shoes",
    "sku": "A10992M090",
    "price": 88,
    "compareAtPrice": 110,
    "discountPercent": 20,
    "currency": "USD",
    "inStock": true,
    "imageUrl": "https://cdn.shopify.com/s/files/1/1104/4168/files/wool-runner-go.png",
    "productUrl": "https://www.allbirds.com/products/mens-wool-runner-go-natural-black",
    "updatedAt": "2026-12-01T14:22:10-08:00"
  },
  {
    "storeDomain": "example-woo-store.com",
    "platform": "WooCommerce",
    "title": "Classic Merino Beanie",
    "handle": "classic-merino-beanie",
    "vendor": "North Trail",
    "productType": "Accessories",
    "sku": "NT-BEANIE-01",
    "price": 29.95,
    "compareAtPrice": 39.95,
    "discountPercent": 25.03,
    "currency": "USD",
    "inStock": true,
    "imageUrl": "https://example-woo-store.com/wp-content/uploads/2026/05/beanie.jpg",
    "productUrl": "https://example-woo-store.com/product/classic-merino-beanie/",
    "updatedAt": "2026-12-03T12:00:00.000Z"
  }
]
```

***

### How Platform Detection Works

1. **Shopify Fast Path**: Sends a lightweight HTTP GET request to `/products.json?limit=250&page=1`, detects store currency via `/cart.json` (or storefront metadata), and paginates until the catalog ends or `maxProductsPerStore` is reached.
2. **WooCommerce Store API Fast Path**: Probes `/wp-json/wc/store/v1/products?per_page=100&page=1`, converts minor-unit integer prices using `currency_minor_unit`, and paginates across all available pages.
3. **WooCommerce CheerioCrawler JSON-LD Fallback**: If the Store API is disabled on a WooCommerce site, automatically discovers product URLs from XML sitemaps (`/product-sitemap.xml`, `/wp-sitemap-posts-product-1.xml`, `/sitemap_index.xml`) or crawls `/shop/` pages via Crawlee's `CheerioCrawler` to extract schema.org JSON-LD `Product` metadata (`offers.price`, `availability`, `sku`).

***

### Local Development

```bash
npm install
npm test
npm start
```

To test locally with custom input, place an `INPUT.json` file at `storage/key_value_stores/default/INPUT.json`.

# Actor input Schema

## `storeUrls` (type: `array`):

One or more Shopify or WooCommerce store URLs to monitor. The Actor automatically detects each store's platform.

## `maxProductsPerStore` (type: `integer`):

Maximum number of products to extract from each store URL.

## `onlyInStock` (type: `boolean`):

If enabled, out-of-stock products are skipped and excluded from the dataset and billing.

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

Optional proxy settings (Apify Proxy or custom proxy URLs) to improve reliability on rate-limited stores.

## Actor input object example

```json
{
  "storeUrls": [
    {
      "url": "https://www.allbirds.com"
    },
    {
      "url": "https://www.gymshark.com"
    }
  ],
  "maxProductsPerStore": 100,
  "onlyInStock": false
}
```

# Actor output Schema

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

Dataset items formatted with the overview table view (storeDomain, platform, title, price, compareAtPrice, discountPercent, currency, inStock, sku, productUrl).

# 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 = {
    "storeUrls": [
        {
            "url": "https://www.allbirds.com"
        },
        {
            "url": "https://www.gymshark.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("yorak-labs/shopify-woocommerce-price-stock-monitor").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 = { "storeUrls": [
        { "url": "https://www.allbirds.com" },
        { "url": "https://www.gymshark.com" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("yorak-labs/shopify-woocommerce-price-stock-monitor").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 '{
  "storeUrls": [
    {
      "url": "https://www.allbirds.com"
    },
    {
      "url": "https://www.gymshark.com"
    }
  ]
}' |
apify call yorak-labs/shopify-woocommerce-price-stock-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yorak-labs/shopify-woocommerce-price-stock-monitor"
        }
    }
}
```

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/FfkG3oGHWmPxP6ekZ/builds/lVXYZKvQX6dmamXYk/openapi.json
