# Universal Product Page Extractor: Price, Variants, GTIN, Stock (`zhtech/universal-product-extractor`) Actor

Turn any store product URL, category page or sitemap into clean product JSON: price, currency, sale price, stock, every variant with its own price and stock, SKU, GTIN, brand, rating, seller. Shopify, WooCommerce, BigCommerce, Magento and any JSON-LD store. Price monitor mode.

- **URL**: https://apify.com/zhtech/universal-product-extractor.md
- **Developed by:** [ZH Tech](https://apify.com/zhtech) (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

from $1.20 / 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.
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

## Universal Product Page Extractor: price, variants, GTIN, stock and ratings from any store

Paste product URLs, category pages or sitemaps from almost any online store and get clean, consistent product JSON: name, brand, SKU, GTIN, price, currency, sale price, availability, **every variant with its own price and stock**, images, rating and review count, seller and canonical URL.

It reads the data stores publish on purpose, in this order:

1. **Public platform JSON**: Shopify `/products/<handle>.js`, the WooCommerce Store API, BigCommerce `BCData` and Magento 2 product configs.
2. **schema.org JSON-LD** (Product, ProductGroup with variants, AggregateOffer, offers per variant).
3. **Microdata** and **OpenGraph product tags**.
4. Optional: a **headless browser** for pages that inject their structured data with JavaScript (off by default).

Every row tells you where its data came from (`source`, plus `fieldSources` per field), so you know which fields you can trust.

No login, no API key, no proxy needed for most stores. Fast plain HTTP by default.

### What makes it different

- **Real variants**: every size and color with its own price, regular price, sale price, stock flag, stock quantity (when the store publishes it), SKU, GTIN and image. Nested in one row, or one row per variant for spreadsheets. You pay per product either way.
- **Currency you can trust**: read only from structured data (platform JSON, JSON-LD `priceCurrency`, microdata, OpenGraph). It is never guessed from a `$` sign, the domain or the language. If the page does not state it, `currency` is `null`.
- **Ratings and reviews count** included whenever the store publishes them.
- **Sale detection**: `price`, `regularPrice`, `salePrice`, `onSale`, `discountPercent` on product and variant level.
- **Monitor mode**: remembers each product's price and stock between runs and outputs only products that are new or changed, with a list of exactly what changed. Unchanged checks cost a fraction of a product.
- **Category pages and sitemaps**: give a collection, category or shop page (product links are followed, with paging) or an XML sitemap (indexes and `.xml.gz` too).
- **Free rows for everything skipped**: robots.txt blocks, bot protection, refused marketplaces, rate limits, 404s and pages without product data each get a clear row with `charged: false`. A run that extracts nothing always tells you why, and you never pay for it.

### Which stores work

- **Shopify** stores (platform JSON when the store allows it, otherwise the page's JSON-LD).
- **WooCommerce** stores (Store API, or the page's JSON-LD plus the variation data in the add to cart form when the API is disallowed).
- **BigCommerce** and **Magento 2** stores.
- **Any store with schema.org structured data**: IKEA, DTC brands, most modern shops. Search engines need this data, so most stores publish it.

#### What it will not do

This actor is built to be a good citizen. These are deliberate, and they are why it is cheap and stable:

- **robots.txt is respected** for every URL it fetches, including JSON endpoints. Disallowed URLs get a free `blocked_by_robots` row.
- **Bot protection is never bypassed.** Pages that answer with a challenge (Cloudflare, DataDome, PerimeterX, Kasada, Imperva, Akamai or a captcha page) get a free `bot_protected` row. No challenge solving, no unblocking proxies, no fingerprint tricks.
- **Amazon, eBay, Walmart, AliExpress, Etsy and Temu are refused up front** with a free `refused_marketplace` row. For Walmart.com use our dedicated [Walmart Product Scraper](https://apify.com/zhtech/walmart-product-scraper).
- **Polite by default**: 1.5 s between requests to the same domain, robots.txt `Crawl-delay` honored, and on HTTP 429 it waits (respecting `Retry-After`), slows down for that domain and gives up after two retries with a free `rate_limited` row.
- **No login cookies, ever**, and no proxy unless you turn one on.

### Use cases

- **Competitor price and stock monitoring** across many different stores with one actor and one output format.
- **Product feed building** for comparison sites, affiliate sites and marketplaces you are allowed to feed.
- **Catalog enrichment**: fill GTIN, brand, images and ratings for SKUs you already track.
- **MAP and pricing compliance** checks for brands and distributors.
- **AI and LLM pipelines**: clean, typed product JSON instead of raw HTML.

Need a whole Shopify catalog instead of single pages? Our [Shopify Store Scraper](https://apify.com/zhtech/shopify-store-scraper) reads a store's full public catalog feed (up to 25,000 products per store) for under $1 per 1,000 products.

### How to use

1. Add URLs to **Product, category or sitemap URLs**. Mix them freely, the type of each URL is detected automatically.
2. Set **Max results** and, for category pages and sitemaps, **Max products per category page or sitemap**.
3. Optional: choose **Variants output**, turn on **Monitor mode**, or the **Browser fallback**.
4. Run, then open the **Output** tab. Views: Products, Variants, Changes (monitor mode) and Skipped. Export JSON, CSV, Excel, XML or HTML, or read it through the API.

Leave the input empty (`{}`) and the actor runs a built in WooCommerce example.

### Input examples

Product pages from different platforms:

```json
{
    "startUrls": [
        "https://www.nutribullet.com/shop/accessories/nutribullet-flex-accessory-set/",
        "https://www.ikea.com/us/en/p/billy-bookcase-white-90522043/"
    ]
}
```

A category page, 10 products, one row per variant:

```json
{
    "startUrls": ["https://scrapeme.live/shop/"],
    "maxProductsPerListing": 10,
    "variantMode": "rows"
}
```

A sitemap, only product URLs:

```json
{
    "startUrls": ["https://vanleeuwenicecream.com/sitemap_index.xml"],
    "sitemapUrlFilter": "/product/",
    "maxProductsPerListing": 50
}
```

Daily price and stock monitor (schedule this input):

```json
{
    "startUrls": ["https://www.ikea.com/us/en/p/billy-bookcase-white-90522043/"],
    "monitorMode": true,
    "monitorWatchlist": "competitors",
    "includeDescription": false
}
```

### Output example

A WooCommerce product (trimmed to one variant):

```json
{
    "status": "ok",
    "url": "https://www.nutribullet.com/shop/accessories/nutribullet-flex-accessory-set/",
    "canonicalUrl": "https://www.nutribullet.com/shop/accessories/nutribullet-flex-accessory-set/",
    "domain": "www.nutribullet.com",
    "source": "woo-store-api",
    "platform": "woocommerce",
    "name": "nutribullet Flex Accessory Set",
    "sku": "ECOM01601-PDP",
    "price": 34.99,
    "regularPrice": null,
    "salePrice": null,
    "onSale": false,
    "currency": "USD",
    "priceMin": 34.99,
    "priceMax": 34.99,
    "availability": "InStock",
    "inStock": true,
    "category": "Accessories",
    "breadcrumb": "Shop > Accessories",
    "image": "https://nbmedia.imgix.net/ANBPBBCL22-flex-accessory-set-Black-PDP-1500x1200-1.jpg?auto=compress%2Cformat&ixlib=php-3.3.0",
    "options": [{ "name": "Color", "values": ["Black", "Forest Green", "Orchid Purple", "Ruby Red", "Sapphire Blue", "Violet Purple"] }],
    "variantCount": 6,
    "variants": [
        {
            "variantId": "1025796",
            "sku": "ECOM01603",
            "options": { "Color": "Forest Green" },
            "price": 34.99,
            "regularPrice": null,
            "salePrice": null,
            "onSale": false,
            "currency": "USD",
            "availability": "InStock",
            "inStock": true,
            "stockQuantity": null,
            "image": "https://nbmedia.imgix.net/ANBPBBCL22EG-flex-accessory-set-Green-PDP-1500x1200-1.jpg?auto=compress%2Cformat&ixlib=php-3.3.0"
        }
    ],
    "fieldSources": { "name": "woo-store-api", "price": "woo-store-api", "currency": "woo-store-api", "variants": "woo-store-api" },
    "charged": true,
    "scrapedAt": "2026-11-23T07:04:23.552Z"
}
```

A JSON-LD only store (IKEA) adds rating, review count and seller:

```json
{
    "status": "ok",
    "source": "json-ld",
    "name": "BILLY Bookcase - white 31 1/2x11x41 3/4 \"",
    "brand": "IKEA",
    "mpn": "905.220.43",
    "price": 49,
    "currency": "USD",
    "availability": "InStock",
    "seller": "IKEA",
    "rating": 4.5,
    "reviewCount": 1049,
    "breadcrumb": "Products > Storage & organization > Shelving furniture > Bookshelves & bookcases"
}
```

Free rows explain every skip:

```json
[
    { "status": "blocked_by_robots", "url": "https://www.scrapingcourse.com/ecommerce/product/abominable-hoodie/", "message": "robots.txt of www.scrapingcourse.com disallows /ecommerce/product/abominable-hoodie/", "charged": false },
    { "status": "bot_protected", "url": "https://scrubdaddy.com/product/scrub-daddy-logo-hoodie/", "protection": "cloudflare", "httpStatus": 403, "message": "scrubdaddy.com answered with a bot challenge (cloudflare, HTTP 403). The page is skipped, challenges are never bypassed.", "charged": false },
    { "status": "refused_marketplace", "url": "https://www.walmart.com/ip/123456", "message": "Walmart pages are not handled by this general extractor. For Walmart.com use our dedicated actor zhtech/walmart-product-scraper (apify.com/zhtech/walmart-product-scraper). No charge for this row.", "charged": false }
]
```

In monitor mode, changed products carry a `monitor` object:

```json
"monitor": {
    "change": "changed",
    "changes": [
        { "field": "price", "before": 39.99, "after": 34.99 },
        { "field": "variantInStock", "variantId": "1025776", "before": false, "after": true }
    ],
    "previousCheckAt": "2026-11-23T07:15:30.928Z"
}
```

#### Row statuses

| status | Meaning | Charged |
|---|---|---|
| `ok` | Product extracted (in monitor mode: new or changed) | Yes, `product` (or `product-rendered`) |
| `unchanged` | Monitor mode: price and stock unchanged (row only with "Also output unchanged products") | Yes, `price-check-unchanged` |
| `blocked_by_robots` | robots.txt disallows the URL | No |
| `bot_protected` | The site answered with a bot challenge | No |
| `refused_marketplace` | Amazon, eBay, Walmart, AliExpress, Etsy or Temu | No |
| `rate_limited` | The site kept answering HTTP 429 after polite retries | No |
| `not_found` | HTTP 404 or 410 | No |
| `no_product_data` | The page has no product structured data | No |
| `invalid_input`, `error` | Bad URL, network error, server error | No |

#### The `source` field

`shopify-json`, `woo-store-api`, `bigcommerce`, `magento`, `json-ld`, `microdata` or `opengraph`: the source of the price data. `sourcesUsed` lists every source that contributed a field, and `fieldSources` names the source of each field. When WooCommerce variant data comes from the add to cart form (because the Store API is disallowed), `fieldSources.variants` is `woocommerce-form`. `dom` (page title only) appears only on free `no_product_data` rows, because nothing is guessed from page text.

### Pricing

Pay per event, you only pay for products actually extracted:

- **Product** (HTTP path): see the Pricing tab, about one third of the leading general e-commerce scraper.
- **Product rendered** (browser fallback, opt in): higher, because a browser costs more compute.
- **Price check unchanged** (monitor mode): a small fraction of a product.
- A tiny start fee per run.

Free: every skipped row (robots, bot protection, refused marketplace, rate limit, 404, no product data, errors), duplicates, category pages and sitemaps themselves. Set a **max cost per run** and the actor stops cleanly when it is reached.

### FAQ

**Why is a Shopify product `rate_limited`?**
Many Shopify storefronts answer HTTP 429 to automated clients on product URLs. The actor waits as the store asks (`Retry-After`), retries twice, then stops asking that store and returns a free row. Try fewer URLs per store, a longer delay, or for whole catalogs use the [Shopify Store Scraper](https://apify.com/zhtech/shopify-store-scraper).

**Why is a site `bot_protected` when it opens fine in my browser?**
The site uses bot management that challenges non browser visitors. This actor does not try to get past such challenges. Nothing is charged.

**Can you add Amazon or Walmart?**
No. Those marketplaces block automated access, so this actor refuses them up front. For Walmart.com see our [Walmart Product Scraper](https://apify.com/zhtech/walmart-product-scraper).

**Why is `currency` null?**
The page does not state its currency in structured data. We never guess it from a price symbol or the domain, because `$` can be USD, CAD, AUD and more.

**Why is `stockQuantity` null?**
Most stores publish only in stock or out of stock. Quantities appear when the platform publishes them (WooCommerce low stock, BigCommerce, some Shopify themes).

**Which price is `price`?**
The price you pay now. When a product is on sale, `regularPrice` is the original price, `salePrice` equals `price`, and `onSale` is true. For variable products, `price` is the first in stock variant and `priceMin` / `priceMax` give the range.

**Do prices depend on location?**
Some stores show prices by visitor country (Shopify Markets, for example). Prices are what the store serves to the actor's IP, and the currency is read from the same page, so price and currency always match.

**How does monitor mode remember products?**
In a named key-value store `product-extractor-monitor` in your account, one record per watchlist. Use a different **Watchlist name** for each monitor. Delete that record to start over.

### Limitations

- Stores without structured data (rare) return `no_product_data`. The browser fallback helps only when the data is added by JavaScript.
- Very large variant sets: WooCommerce variations are read up to 100 per product from the Store API.
- Category pages are discovered with platform specific selectors, schema.org ItemList data and common product URL patterns. Unusual layouts may yield few links: use a sitemap instead.
- BigCommerce pages expose the default variant's price and stock, not every variant, unless the page's JSON-LD lists them.

### API and integrations

Run it from the Apify API, the JavaScript or Python client, Make, Zapier, n8n or a schedule. Example with the API:

```bash
curl -X POST "https://api.apify.com/v2/acts/zhtech~universal-product-extractor/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":["https://www.ikea.com/us/en/p/billy-bookcase-white-90522043/"]}'
```

**LLM and MCP use**: the actor works as a tool for AI agents through the Apify MCP server. An agent can pass product URLs and get typed JSON back (price, currency, stock, variants), with `status` and `message` explaining anything it could not read.

### Support

Found a store that publishes structured data but extracts wrong? Open an issue on the Issues tab with the URL. Fixes for real stores ship fast.

# Actor input Schema

## `startUrls` (type: `array`):

Any mix of product page URLs, category or collection page URLs (product links are followed) and XML sitemaps (sitemap.xml, sitemap indexes, .xml.gz). The type of each URL is detected automatically. Amazon, eBay, Walmart, AliExpress, Etsy and Temu are refused with a free row. Leave empty to run a built in WooCommerce example.

## `maxResults` (type: `integer`):

Stop after this many products (in monitor mode: products checked). Skipped rows (robots, bot protection, not found) do not count. 0 means no limit.

## `maxProductsPerListing` (type: `integer`):

How many product links are taken from each category URL (across its pages) or each sitemap.

## `maxListingPages` (type: `integer`):

How many pages of a category are followed through its "next page" link.

## `followListings` (type: `boolean`):

When a URL is a category, collection or search result page, extract the products it links to. Turn off to treat every URL as a single product page.

## `sitemapUrlFilter` (type: `string`):

Optional. Only sitemap URLs matching this pattern are extracted, for example /products/ or /p/. Without it, URLs that look like product pages are kept (or all URLs when none look like products).

## `variantMode` (type: `string`):

Nested: one row per product with a variants array (each variant has its own price, sale price, stock, SKU and GTIN). Separate rows: one row per variant with the product fields repeated, easiest for spreadsheets. You pay per product either way.

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

Adds the product description as clean plain text.

## `descriptionMaxChars` (type: `integer`):

Longer descriptions are cut to this many characters.

## `monitorMode` (type: `boolean`):

Remembers each product's price and stock between runs (in the named key-value store "product-extractor-monitor") and outputs only products that are new or changed, with a list of what changed. Unchanged checks are billed at the much cheaper price-check-unchanged rate. Schedule the same input daily or hourly.

## `monitorWatchlist` (type: `string`):

Keeps separate memory for separate monitors. Use a different name per watchlist (for example competitor-a, competitor-b).

## `emitUnchanged` (type: `boolean`):

Adds a short "unchanged" row for every product whose price and stock did not change.

## `usePlatformJson` (type: `boolean`):

Reads the store platform's own public product JSON first (Shopify /products/<handle>.js, WooCommerce Store API) for exact variant prices and stock. Each endpoint is checked against robots.txt. Turn off to use only the data in the page itself (one request per product).

## `browserFallback` (type: `boolean`):

When a page loads fine but has no product data in its HTML (data injected by JavaScript), render it in a headless browser and try again. Billed as product-rendered. Needs at least 2048 MB memory. Never used to get past bot protection.

## `maxConcurrency` (type: `integer`):

How many pages are processed at the same time across all domains. Requests to one domain are always spaced by the delay below.

## `requestDelayMs` (type: `integer`):

Polite pause between two requests to the same domain. A robots.txt crawl-delay raises it automatically, and a 429 answer doubles it for that domain.

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

Not needed for most stores. Off by default. A proxy is never used to get past bot protection: pages that show a challenge are skipped either way.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.nutribullet.com/shop/accessories/nutribullet-flex-accessory-set/",
    "https://www.ikea.com/us/en/p/billy-bookcase-white-90522043/"
  ],
  "maxResults": 20,
  "maxProductsPerListing": 20,
  "maxListingPages": 3,
  "followListings": true,
  "variantMode": "nested",
  "includeDescription": true,
  "descriptionMaxChars": 2000,
  "monitorMode": false,
  "monitorWatchlist": "default",
  "emitUnchanged": false,
  "usePlatformJson": true,
  "browserFallback": false,
  "maxConcurrency": 4,
  "requestDelayMs": 1500,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `products` (type: `string`):

No description

## `variants` (type: `string`):

No description

## `changes` (type: `string`):

No description

## `skipped` (type: `string`):

No description

## `allResults` (type: `string`):

No description

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

No description

# 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 = {
    "startUrls": [
        "https://www.nutribullet.com/shop/accessories/nutribullet-flex-accessory-set/",
        "https://www.ikea.com/us/en/p/billy-bookcase-white-90522043/"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhtech/universal-product-extractor").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 = {
    "startUrls": [
        "https://www.nutribullet.com/shop/accessories/nutribullet-flex-accessory-set/",
        "https://www.ikea.com/us/en/p/billy-bookcase-white-90522043/",
    ],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("zhtech/universal-product-extractor").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 '{
  "startUrls": [
    "https://www.nutribullet.com/shop/accessories/nutribullet-flex-accessory-set/",
    "https://www.ikea.com/us/en/p/billy-bookcase-white-90522043/"
  ],
  "maxResults": 20
}' |
apify call zhtech/universal-product-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zhtech/universal-product-extractor"
        }
    }
}
```

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/ElkaZmaNPfmoPgJEb/builds/lKa9wQ8LeMkzwNrmS/openapi.json
