# Smart E-Commerce Price & Stock Monitor (`harry.automazione/smart-ecommerce-price-stock-monitor`) Actor

Monitor competitor e-commerce prices and stock availability with zero-code JSON-LD parsing, stateful diffing, and secure Webhook notifications for n8n, Make, Telegram, and Discord.

- **URL**: https://apify.com/harry.automazione/smart-ecommerce-price-stock-monitor.md
- **Developed by:** [Harry.automazione](https://apify.com/harry.automazione) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 product price & stock checks

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Smart E-Commerce Price & Stock Monitor (Apify Actor)

An enterprise-grade, high-performance Apify Actor for automated e-commerce competitor price tracking and stock availability monitoring.

Features zero-code JSON-LD parsing, stateful diffing, rate-limiting anti-ban protection, and secure Webhook notifications (formatted for **n8n**, **Make**, **Telegram**, and **Discord**).

***

### 💡 Why E-Commerce Store Owners & Marketers Use This Actor

- 📊 **Real-Time Price & Stock Tracking:** Track price changes (drops and increases) and stock status updates (when items go out of stock or come back in stock).
- 📦 **Out-of-Stock Opportunity Alerts:** Get notified the exact moment a competitor goes out of stock so you can scale your ads or capture their displaced customers.
- 🕵️ **Universal Brand Store Support:** Works on any direct-to-consumer brand website — Shopify, WooCommerce, Zalando, Nike, Zara, ASOS, Decathlon, Gymshark, Farfetch, H\&M, and thousands more.
- 💰 **Save $200+/Month:** Get enterprise-grade price intelligence without paying expensive monthly SaaS subscriptions (e.g. Prisync, Competera).
- ⚡ **2-Minute Zero-Code Integration:** Easily connect alerts directly to your phone via Telegram, Discord, n8n, or Make.

***

### ✅ Supported Platforms & Verified Stores

This Actor is engineered as a **lightweight, high-speed, cost-effective HTTP monitor** (built on `got-scraping` + `CheerioCrawler`). It consumes minimal RAM (128-256 MB) and is optimized for e-commerce platforms that serve product metadata via server-side rendered **Schema.org JSON-LD microdata**.

#### 🛒 E-Commerce Platforms (Tested & 100% Supported Out-of-the-Box)

| Platform | Notes & Examples |
| :--- | :--- |
| **Shopify** | Gymshark, Skims, Fashion Nova, Velasca, Allbirds, Kylie Cosmetics, and millions of D2C stores |
| **Salesforce Commerce Cloud** | New Balance, Under Armour |
| **WooCommerce** | Any brand store on WordPress |
| **THG Ingenuity** | Lookfantastic, Cult Beauty |
| **Enterprise Custom / Magento / PrestaShop** | Foot Locker, Dyson, Zalando, and any D2C store with standard JSON-LD |

***

### ⚠️ Known Technical Limitations (READ BEFORE USING)

To ensure complete transparency and prevent unexpected results, please review the technology requirements below:

> \[!IMPORTANT]
> **This Actor uses static HTTP scraping (Cheerio) for maximum speed and lowest compute costs. It does NOT run a full browser (Puppeteer/Playwright).**

#### ❌ Unsupported Technologies & Websites

1. **Full Client-Side Rendering / Single Page Applications (SPA):**
   - **Examples:** Zara, Farfetch.
   - **Why:** These sites send empty HTML skeletons and rely on client-side React/Angular JS to build prices dynamically in a real browser. The Actor will return `jsRenderingRequired: true` or `null` price.
2. **Aggressive Enterprise Anti-Bot Protections (Akamai / Cloudflare Bot Manager):**
   - **Examples:** Amazon, MediaWorld, Kiehl's / L'Oréal Group, Decathlon.
   - **Why:** These stores employ strict TLS fingerprinting and challenge protocols that block static HTTP crawlers with HTTP `403 Forbidden` status codes, regardless of proxy configuration.

***

### 🚀 Quick Start Guide for Beginners (3 Easy Steps)

No technical background required! Follow these 3 simple steps to monitor your first products:

1. **Paste Product URLs:** In the **Product URLs to Monitor** section, click **+ Add** and paste the direct product page links from any supported brand store (e.g. a Nike shoe page, a Zalando product, a Shopify store item).
2. **Add Webhook (Optional):** If you want instant price drop alerts on your phone or team chat (Telegram, Discord, n8n, Make), paste your Webhook URL into **Webhook Target URL**.
3. **Click Start:** Leave all advanced settings as default — the Actor automatically detects prices, stock, and handles anti-bot protection!

***

### Key Features

- ⚡ **Ultra-Low Memory & Fast:** Built on `got-scraping` + `CheerioCrawler` (128-256 MB RAM) for fast execution and minimal Apify compute costs.
- 🎯 **2-Tier Extraction Engine:**
  - **Tier 1 (Zero-Code Auto-Detection):** Automatically extracts Schema.org JSON-LD microdata (`Product`, `Offer`, `AggregateOffer`) for D2C brand stores (Shopify, WooCommerce, Magento, PrestaShop, Zalando, Nike, etc.).
  - **Tier 2 (CSS Fallback):** Pre-configured DOM fallback engine for stores that partially implement JSON-LD.
- 🌐 **Locale-Aware Currency Parsing:** Accurately parses both US (`$1,299.99`) and European (`1.299,99 €`) currency formats.
- 🔔 **Hybrid Webhook Payloads:** Delivers structured raw JSON events alongside a ready-to-send `formattedText` Markdown message complete with emojis for Telegram and Discord bots.
- 🛡️ **Zero-Trust Security & Anti-SSRF:** Includes strict URL validation, private network IP blocking (Anti-SSRF), HMAC-SHA256 request signatures, and secret masking in log outputs.
- 🔄 **Stateful Diffing & Atomic Checkpointing:** Keeps track of historical prices in Apify's Key-Value Store (`STATE.json`) with auto-save checkpointing.
- 🛑 **Rate-Limiting Anti-Ban:** Configurable per-domain concurrency and throttling to avoid HTTP 429 rate limit blocks.

***

### Input Options

| Option | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `productUrls` | `Array<String>` | **Required** | List of brand store product page URLs to monitor. Click **+ Add** to paste multiple links. |
| `webhookUrl` | `String` | `null` | HTTP POST Webhook URL (n8n, Make, Telegram bridge, etc.). |
| `webhookAuthToken` | `String` | `null` | Optional secret token for HMAC-SHA256 signature (`X-Webhook-Signature`). |
| `minPriceChangePercentage` | `Number` | `0` | Minimum percentage price change required to trigger an alert (0 = trigger on any change). |
| `notifyOnFirstRun` | `Boolean` | `false` | Send alerts on initial state setup (default is FALSE for silent setup). |
| `notifyOnStockChangeOnly` | `Boolean` | `false` | Ignore price changes and alert ONLY on stock availability changes. |
| `maxConcurrencyPerDomain` | `Integer` | `5` | Maximum parallel requests per domain. Default is 5. Increase up to 20 when using Residential Proxies. |
| `customSelectors` | `Object` | *Pre-filled* | Optional CSS fallback selectors for stores without JSON-LD. Leave as default for 95%+ of supported stores. |

***

### Output Example

#### Dataset Record Format

```json
{
  "url": "https://skims.com/en-it/products/iconic-swim-hardware-underwire-bikini-top-obsidian",
  "title": "ICONIC SWIM HARDWARE UNDERWIRE BIKINI TOP | OBSIDIAN",
  "currency": "EUR",
  "currentPrice": 86.00,
  "previousPrice": 98.00,
  "priceChanged": true,
  "priceDeltaPercentage": "-12.24%",
  "inStock": true,
  "previousInStock": false,
  "stockStatusChanged": true,
  "isNewProduct": false,
  "shouldAlert": true,
  "jsRenderingRequired": false,
  "checkedAt": "2026-07-27T12:00:00.000Z"
}
```

#### Webhook Payload Format

```json
{
  "actor": "smart-ecommerce-price-stock-monitor",
  "timestamp": "2026-07-27T12:00:00.000Z",
  "totalAlerts": 1,
  "formattedText": "🚨 *E-Commerce Monitor Alert (1 updates)*\n\n📌 *[ICONIC SWIM HARDWARE UNDERWIRE BIKINI TOP](https://skims.com/en-it/products/iconic-swim-hardware-underwire-bikini-top-obsidian)*\n🟢 *PRICE DROP!*\n• Old Price: `EUR 98` ➡️ New Price: `EUR 86` (-12.24%)\n",
  "events": [ ... ]
}
```

***

### 🔄 2-Minute n8n & Telegram Integration Guide

Connect this Apify Actor to your Telegram Bot in 3 simple steps:

#### Step 1: Create a Telegram Bot

1. Message `@BotFather` on Telegram and send `/newbot`.
2. Save your **Bot API Token** (e.g. `123456789:ABCdefGhIJKlmNo...`).
3. Get your **Chat ID** by starting a chat with your bot and opening `https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates`.

#### Step 2: Import Workflow into n8n

1. Open n8n, click **Workflows** -> **Import from File / Paste JSON**.
2. Paste the JSON template below:

```json
{
  "name": "E-Commerce Price Monitor to Telegram",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "ecommerce-price-alert",
        "options": {}
      },
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [250, 300]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.body.totalAlerts > 0 }}",
              "value2": true
            }
          ]
        }
      },
      "name": "Has Alerts?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [470, 300]
    },
    {
      "parameters": {
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "text": "={{ $json.body.formattedText }}",
        "additionalFields": {
          "parse_mode": "Markdown"
        }
      },
      "name": "Send Telegram Alert",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [690, 200]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Has Alerts?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Alerts?": {
      "main": [
        [
          {
            "node": "Send Telegram Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
```

#### Step 3: Connect n8n Webhook to Apify

Copy the Webhook URL from your n8n **Webhook Trigger** node and paste it into the `webhookUrl` field of this Apify Actor.

***

### License

ISC License. Built for Apify Store deployment.

# Actor input Schema

## `productUrls` (type: `array`):

Paste 1 or more product page URLs you want to monitor. Works great with Shopify, WooCommerce, Zalando, Nike, Zara, ASOS, Decathlon, Gymshark, and any brand store. Click '+ Add' to monitor multiple products.

## `webhookUrl` (type: `string`):

Optional HTTP Webhook URL (n8n, Make, Telegram bot, Discord) to get instant alerts on price drops or stock changes.

## `webhookAuthToken` (type: `string`):

Optional secret key to sign Webhook requests with HMAC-SHA256 for advanced security. Leave empty if not needed.

## `minPriceChangePercentage` (type: `number`):

Leave at 0 to get notified on any price change, or set to e.g. 5 to ignore tiny cent fluctuations.

## `notifyOnFirstRun` (type: `boolean`):

Leave FALSE for silent initial setup (recommended). Set TRUE if you want immediate alerts for all products on the first run.

## `notifyOnStockChangeOnly` (type: `boolean`):

Set TRUE if you only care when products go out of stock or come back in stock, ignoring price changes.

## `maxConcurrencyPerDomain` (type: `integer`):

Leave at default (5) for safe direct scraping. If using Apify Residential Proxies, you can increase this up to 20 for ultra-fast parallel scraping.

## `customSelectors` (type: `object`):

Advanced / Optional. Leave empty — automatic JSON-LD detection handles 95%+ of brand e-commerce stores (Shopify, WooCommerce, Zalando, Nike, Zara, etc.) automatically. Only needed for old or custom-built stores without Schema.org metadata.

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

Select Apify Proxies (or Residential Proxies) to bypass strict anti-bot protections on stores protected by Cloudflare or Akamai.

## Actor input object example

```json
{
  "productUrls": [
    "https://www.nike.com/t/vomero-18-womens-road-running-shoes-7rbVWb/HM6804-115"
  ],
  "minPriceChangePercentage": 0,
  "notifyOnFirstRun": false,
  "notifyOnStockChangeOnly": false,
  "maxConcurrencyPerDomain": 5,
  "customSelectors": {
    "title": "h1.product-title, h1.product_title, h1",
    "price": ".product-price, [data-price], .price, .current-price, [itemprop=\"price\"]",
    "stock": ".in-stock, .availability, [itemprop=\"availability\"], #availability"
  },
  "proxyConfiguration": {
    "useApifyProxies": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

The output dataset containing price drops, stock updates, and product guidance.

# 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 = {
    "productUrls": [
        "https://www.nike.com/t/vomero-18-womens-road-running-shoes-7rbVWb/HM6804-115"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("harry.automazione/smart-ecommerce-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 = { "productUrls": ["https://www.nike.com/t/vomero-18-womens-road-running-shoes-7rbVWb/HM6804-115"] }

# Run the Actor and wait for it to finish
run = client.actor("harry.automazione/smart-ecommerce-price-stock-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "productUrls": [
    "https://www.nike.com/t/vomero-18-womens-road-running-shoes-7rbVWb/HM6804-115"
  ]
}' |
apify call harry.automazione/smart-ecommerce-price-stock-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=harry.automazione/smart-ecommerce-price-stock-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/qx1JleI61NabYzl1g/builds/eyDRguEnipQJ6eCOw/openapi.json
