# Universal E-commerce Product, Price & Stock Monitor (`solncev/ecommerce-product-price-stock-scraper`) Actor

Extract product prices, stock availability (in_stock), SKU, GTIN, brand, ratings, images, and Schema.org Product data from any online store (Shopify, WooCommerce, Prom, etc.).

- **URL**: https://apify.com/solncev/ecommerce-product-price-stock-scraper.md
- **Developed by:** [Yevhen Solntsev](https://apify.com/solncev) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 product scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 E-commerce Product, Price & Stock Monitor

Automatically extract **product prices**, **stock availability (`in_stock`)**, **SKU / GTIN**, **brand**, **customer ratings**, and **high-resolution images** from almost any online store (Shopify, WooCommerce, Magento, BigCommerce, Prom.ua, Rozetka, and custom e-commerce sites).

### 🛡️ Fair Billing Guarantee

> **You only pay when product data is successfully extracted!**
>
> - If a store page is blocked by anti-bot systems (e.g. Akamai, Cloudflare) or if no product price/SKU is found, **you are NOT charged ($0.00)**.
> - Blocked or missing pages are recorded in the dataset with `availability_status: "BlockedByAntiBot"` for 100% transparency, but completely free of charge.
> - Zero wasted budget on failed or protected requests!

### Why Use This Price & Stock Scraper?

- **Universal Compatibility**: Combines `Schema.org (JSON-LD Product/Offer)`, `OpenGraph Product`, `HTML Microdata`, and DOM heuristics to work across thousands of stores without custom configuration.
- **Fair & Risk-Free**: Pay only for successful extractions (`price` or `sku`).
- **Built for Automated Repricing & Alerts**: Returns normalized numeric `price`, `currency` (`USD`, `EUR`, `GBP`, `PLN`, `UAH`), and a clean boolean `in_stock` flag (`true`/`false`) ready for **Make.com**, **n8n**, **Zapier**, or Google Sheets.
- **Fast & Lightweight**: Powered by pure HTTP + BeautifulSoup for maximum speed and minimal platform compute usage.

### Extracted Fields

- `title`, `brand`, `description`
- `price` (numeric float) & `currency` (ISO code)
- `in_stock` (boolean) & `availability_status` (`InStock`, `OutOfStock`, `PreOrder`)
- `sku` & `gtin` (EAN/UPC barcodes)
- `rating_value` & `review_count`
- `primary_image` & full `images` gallery
- `scraped_at` (UTC timestamp for historical price tracking)

### Input Parameters

- `startUrls` (*array*, required): List of product URLs or category pages to scrape.
- `discoverProductLinks` (*boolean*, default `false`): If enabled, discovers and scrapes internal product links found on category or starting pages.
- `maxProducts` (*integer*, default `50`): Maximum number of pages to process per crawl.

#### Example Input

```json
{
  "startUrls": [
    { "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html" }
  ],
  "discoverProductLinks": false,
  "maxProducts": 50
}
```

#### Example Output

```json
{
  "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
  "domain": "books.toscrape.com",
  "title": "A Light in the Attic",
  "brand": "",
  "price": 51.77,
  "currency": "GBP",
  "in_stock": true,
  "availability_status": "InStock",
  "sku": "a897bf448149e813",
  "gtin": "",
  "rating_value": null,
  "review_count": null,
  "primary_image": "https://books.toscrape.com/media/cache/fe/72/fe72f0532301ec28892ae79a629a293c.jpg",
  "images": [
    "https://books.toscrape.com/media/cache/fe/72/fe72f0532301ec28892ae79a629a293c.jpg"
  ],
  "description": "It's hard to imagine a world without A Light in the Attic...",
  "scraped_at": "2026-10-15T14:45:00.000000+00:00"
}
```

### Integrations & Export

Export data directly to **JSON**, **CSV**, **Excel**, or stream items via webhook to **Make**, **Zapier**, **n8n**, or your internal pricing engine.

# Actor input Schema

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

Enter product page URLs (or category URLs if link discovery is enabled) from any e-commerce store.

## `discoverProductLinks` (type: `boolean`):

If enabled, the scraper will also follow internal product links found on the starting pages.

## `maxProducts` (type: `integer`):

Maximum number of pages to process during the run.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
    }
  ],
  "discoverProductLinks": false,
  "maxProducts": 50
}
```

# Actor output Schema

## `dataset` (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": [
        {
            "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("solncev/ecommerce-product-price-stock-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 = { "startUrls": [{ "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html" }] }

# Run the Actor and wait for it to finish
run = client.actor("solncev/ecommerce-product-price-stock-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 '{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
    }
  ]
}' |
apify call solncev/ecommerce-product-price-stock-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,solncev/ecommerce-product-price-stock-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/kxxNCOKQ2EJfERiZH/builds/gMllcc6i7VOXWdkCh/openapi.json
