# E-Commerce Price & Stock Scraper — Any Online Store (`skipper_lume/ecommerce-product-scraper`) Actor

Scrape product data from any online store: price, title, stock, images, brand, SKU, specs. Works on Amazon, Rozetka, Walmart, eBay, AliExpress and 50+ more. 4-layer extraction: JSON-LD, Open Graph, Microdata, CSS. HTTP-first with Playwright fallback. No API key needed. Universal and reliable.

- **URL**: https://apify.com/skipper_lume/ecommerce-product-scraper.md
- **Developed by:** [Maksym Horbachov](https://apify.com/skipper_lume) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 77 total users, 5 monthly users, 98.4% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## E-Commerce Product Scraper

Extract structured product data from **any e-commerce website** — title, price, currency, availability, images, specs, and more.

Works with 50+ online stores out of the box. Uses smart **HTTP-first** fetching with automatic **Playwright fallback** for JavaScript-heavy sites.

### Features

- **Universal extraction** — works with any e-commerce site, not just specific stores
- **4-layer parsing** — JSON-LD → Open Graph → Microdata → CSS heuristics for maximum coverage
- **Smart rendering** — tries fast HTTP first; switches to headless browser only when needed
- **Structured output** — clean JSON with title, price, currency, stock status, images, brand, SKU, specs
- **Multi-currency** — auto-detects UAH, USD, EUR, GBP, PLN, CZK, RON
- **Breadcrumbs** — extracts product category path when available
- **Proxy support** — works with Apify proxy for anti-bot bypass

### Supported Stores (tested)

| Region | Stores |
|--------|--------|
| 🇺🇦 Ukraine | Rozetka, Foxtrot, Epicentr, Comfy, Allo, Citrus, Moyo, Prom.ua |
| 🇪🇺 Europe | Amazon.de, MediaMarkt, Notino, Zara, H\&M, IKEA |
| 🌍 Global | Amazon.com, eBay, AliExpress\*, Best Buy, Walmart |

*\*AliExpress requires Playwright mode (set `forcePlaywright: true`)*

The scraper also works with **any other e-commerce site** that uses standard product markup (JSON-LD, Open Graph, or Microdata) — which is the vast majority of online stores.

### Input

```json
{
    "urls": [
        "https://rozetka.com.ua/ua/some-product/p123456/",
        "https://www.amazon.com/dp/B0EXAMPLE/"
    ],
    "forcePlaywright": false,
    "maxConcurrency": 5
}
```

| Field | Type | Description |
|-------|------|-------------|
| `urls` | string\[] | **Required.** Product page URLs to scrape |
| `forcePlaywright` | boolean | Force headless browser for all URLs (default: `false`) |
| `maxConcurrency` | integer | Max parallel pages (default: `5`, max: `20`) |
| `proxyConfiguration` | object | Proxy settings (Apify proxy recommended for protected sites) |

### Output

Each product is saved to the dataset as a JSON object:

```json
{
    "url": "https://rozetka.com.ua/ua/samsung-galaxy-s24/p395058825/",
    "store": "rozetka.com.ua",
    "title": "Samsung Galaxy S24 Ultra 12/256GB Titanium Black",
    "price": 51999.0,
    "currency": "UAH",
    "in_stock": true,
    "image": "https://content.rozetka.com.ua/...",
    "brand": "Samsung",
    "sku": "SM-S928BZKDSEK",
    "description": "Смартфон Samsung Galaxy S24 Ultra...",
    "rating": 4.8,
    "review_count": 342,
    "breadcrumbs": ["Смартфони", "Samsung", "Galaxy S24"],
    "extraction_method": "json-ld"
}
```

#### Output fields

| Field | Type | Description |
|-------|------|-------------|
| `url` | string | Original URL |
| `store` | string | Store domain |
| `title` | string | Product name |
| `price` | float | Price as a number |
| `currency` | string | ISO currency code (UAH, USD, EUR, etc.) |
| `in_stock` | boolean | Availability status |
| `image` | string | Main product image URL |
| `brand` | string | Brand name |
| `sku` | string | Product SKU or MPN |
| `description` | string | Short description (max 500 chars) |
| `rating` | float | Average rating (if available) |
| `review_count` | integer | Number of reviews (if available) |
| `breadcrumbs` | string\[] | Category path |
| `specs` | object | Technical specifications (if available) |
| `extraction_method` | string | Which extraction layer succeeded |

### How it works

The scraper uses a 4-layer extraction strategy, running each layer in order and filling in missing data:

1. **JSON-LD** (highest confidence) — parses `<script type="application/ld+json">` with `@type: Product`
2. **Open Graph** — reads `<meta property="og:*">` and `<meta property="product:*">` tags
3. **Microdata** — finds `itemscope itemtype="schema.org/Product"` attributes
4. **CSS Heuristics** — falls back to common CSS selector patterns for price, title, etc.

If HTTP fetch returns weak data (no title or no price), the scraper automatically retries with a headless Chromium browser (Playwright) to handle JavaScript-rendered pages.

### Use Cases

- **Price monitoring** — track competitor prices across multiple stores
- **Market research** — collect pricing data for analysis
- **Product catalog** — build product databases from multiple sources
- **Dropshipping** — check prices and availability across suppliers
- **Price comparison** — aggregate offers for the same product

### Tips

- For best results with **protected sites** (Cloudflare, AWS WAF), enable Apify Proxy
- Set `forcePlaywright: true` for sites known to require JavaScript (AliExpress, some fashion stores)
- Keep `maxConcurrency` at 3-5 for sites with aggressive rate limiting
- The scraper respects `robots.txt` — use responsibly

### Cost estimate

| Mode | Compute units per URL | Cost\* |
|------|----------------------|-------|
| HTTP only | ~0.005 | ~$0.0005 |
| Playwright | ~0.05-0.1 | ~$0.005-0.01 |
| Mixed (auto) | ~0.01-0.03 avg | ~$0.001-0.003 |

*\*Based on Apify platform pricing. Actual costs depend on page complexity and proxy usage.*

# Actor input Schema

## `urls` (type: `array`):

List of product page URLs to scrape. Each URL should point to a single product page.

## `forcePlaywright` (type: `boolean`):

Force headless browser for all URLs. By default, HTTP is tried first and Playwright is used only as fallback. Enable for JS-heavy sites.

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

Maximum number of pages scraped in parallel.

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

Proxy settings for bypassing anti-bot protection. Auto-enabled when running on Apify platform if not set.

## Actor input object example

```json
{
  "urls": [
    "https://www.amazon.com/dp/B09B8V1LZ3",
    "https://www.amazon.com/dp/B0D1XD1ZV3"
  ],
  "forcePlaywright": false,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `products` (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 = {
    "urls": [
        "https://www.amazon.com/dp/B09B8V1LZ3",
        "https://www.amazon.com/dp/B0D1XD1ZV3"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("skipper_lume/ecommerce-product-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 = {
    "urls": [
        "https://www.amazon.com/dp/B09B8V1LZ3",
        "https://www.amazon.com/dp/B0D1XD1ZV3",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("skipper_lume/ecommerce-product-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 '{
  "urls": [
    "https://www.amazon.com/dp/B09B8V1LZ3",
    "https://www.amazon.com/dp/B0D1XD1ZV3"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call skipper_lume/ecommerce-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,skipper_lume/ecommerce-product-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/i7JUhx4B2VzGSMJzI/builds/0l45Wo1nHNsOh1VHx/openapi.json
