# Competitor Price & Stock Monitor (`iveeeeeen/competitor-price-stock-monitor`) Actor

Track price and stock on any product URL. Detects drops, increases and stock changes versus the last run. Reads JSON-LD, Open Graph, microdata and common CSS, with optional selector overrides and a Slack-compatible webhook. $0.0008 per product checked; failed pages are free.

- **URL**: https://apify.com/iveeeeeen/competitor-price-stock-monitor.md
- **Developed by:** [Ivan Alvarado](https://apify.com/iveeeeeen) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.80 / 1,000 product checkeds

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

## Competitor Price & Stock Monitor: Track Any Product URL

**Watch competitor product pages and get price drops, price increases and stock changes — on any store, not just Shopify.** Paste a list of product URLs. Each run extracts price, currency, availability and title, compares them with the previous run, and can POST a Slack-compatible webhook when something changes. $0.0008 per product checked, and failed pages are free.

### What it does

For every product URL you give it, this Actor:

- **Extracts** the current price, currency, in-stock / out-of-stock status and title
- **Compares** them with the previous run (stored in a uniquely named key-value store in your account)
- **Reports** `priceChange` (`drop`, `increase`, `unchanged`, `new`), `priceChangeAmount`, `priceChangePercent`, and `stockChange` (`now-in-stock`, `now-out-of-stock`, `unchanged`, `new`)
- **Notifies** an optional webhook (Slack, Discord, Zapier, Make, n8n) only when a price or stock change is detected

The first run stores a baseline and writes a row for every product (`status: baseline`). Later scheduled runs add the change fields.

### How it finds the price (extraction waterfall)

It does **not** depend on a single shop platform. For each page it tries, in order:

1. **Your CSS selectors**, if you passed `priceSelector` / `availabilitySelector` / `titleSelector` (globally or per URL). If a selector matches nothing, the next steps still run.
2. **JSON-LD** `Product` / `Offer` / `AggregateOffer` (including `@graph` and `priceSpecification`)
3. **Open Graph and product meta tags** (`product:price:amount`, `product:price:currency`, `product:availability`, `og:price:amount`, `og:title`)
4. **Microdata** (`itemtype=Product`, `itemprop=price`, `priceCurrency`, `availability`)
5. **Common CSS selectors** used by WooCommerce, Shopify, books.toscrape-style catalogs, and generic `.price` / `[data-price]` markup
6. **Regex fallbacks** on JSON blobs and visible currency amounts

The method that produced the result is in `extractionMethod`.

### Input

```json
{
  "productUrls": [
    "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
    "https://scrapeme.live/shop/Abra/",
    {
      "url": "https://www.example.com/product/123",
      "priceSelector": ".product-hero .price",
      "availabilitySelector": ".stock-status"
    }
  ],
  "monitorName": "europe-competitors",
  "webhookUrl": "https://hooks.slack.com/services/…",
  "outputOnlyChanges": false
}
```

- `productUrls` (required): URL strings, or objects with per-URL selector overrides
- `priceSelector`, `currencySelector`, `availabilitySelector`, `titleSelector`: optional global CSS overrides
- `monitorName`: keep several monitors' baselines apart (default `default`)
- `outputOnlyChanges`: if `true`, only changed rows are written (leave `false` so the first run and the daily auto-test produce a dataset)
- `webhookUrl`: POST a summary when anything changed. The body has a Slack-compatible `text` field plus structured `changes`.
- `concurrency`: parallel fetches, 1–10 (default 5)

### Output

One dataset row per product:

| Field | Meaning |
|---|---|
| `url`, `title`, `sku`, `brand`, `image` | Product identity |
| `price`, `currency`, `priceFormatted` | Current price (`51.77`, `GBP`, `£51.77`) |
| `availability`, `inStock` | Normalized status (`InStock`, `OutOfStock`, `PreOrder`, …) and a boolean |
| `previousPrice`, `previousCurrency`, `previousAvailability`, `previousInStock`, `previousCheckedAt` | Last run's snapshot |
| `priceChange` | `drop` / `increase` / `unchanged` / `new` / `unknown` |
| `priceChangeAmount`, `priceChangePercent` | Signed delta (e.g. `-5.00`, `-9.68`) |
| `stockChange` | `now-in-stock` / `now-out-of-stock` / `unchanged` / `new` / `unknown` |
| `extractionMethod` | `json-ld`, `open-graph`, `microdata`, `css-common`, `override`, or `regex` |
| `status` | `baseline` (first run), `changed`, `unchanged`, or `error` |
| `error`, `httpStatus` | Set on failed fetches. **Failed pages are not charged.** |

Download as JSON, CSV or Excel, or consume the dataset through the API. Schedule the Actor daily or hourly for a live competitor feed.

### Pricing (pay per event)

**$0.0008 per product checked** ($0.80 per 1,000 products). There is no start fee. Pages that fail to load (timeouts, DNS, HTTP 4xx/5xx) are **not charged**.

Checking 50 competitor products every day costs about **$1.20 a month**. Closest generic URL monitors on the Apify Store charge around $0.0015–$0.005 per check, often plus a start fee; Shopify-only catalog monitors sit around $0.001. This Actor is cheaper and works on any public product URL.

### Typical setups

- **Daily competitor watch list**: 20–200 product URLs, scheduled once a day, webhook to Slack when a price drops or an item comes back in stock
- **Price-drop campaign trigger**: `outputOnlyChanges: true` after the first baseline, feed changes into Zapier or Make
- **Hard-to-parse pages**: pass a `priceSelector` (and optional availability selector) for that URL; everything else still uses the automatic waterfall

### Notes

It reads **server-rendered HTML** and does not run JavaScript, so it is fast and cheap. If a store only injects the price after a client-side render and publishes no JSON-LD or Open Graph tags, use a CSS selector that appears in the raw HTML, or a different tool that drives a browser.

State is stored in a uniquely named key-value store (`iveeeeeen-competitor-price-stock-monitor-state`). If that store cannot be opened (for example a permission collision), the run falls back to the default store and still finishes — it will not crash.

### FAQ

**Will the first run report a drop?** No. The first run is a `baseline`. Comparisons start on the second run.

**Can I monitor several lists separately?** Yes. Set a different `monitorName` for each list.

**Does it work on Shopify, WooCommerce, Magento, custom stores?** Yes, as long as the product page is public and exposes price in HTML, JSON-LD, Open Graph or microdata (most do). It is not limited to one platform.

**What if a page is blocked or 404s?** You get an `error` row, you are not charged for that URL, and the rest of the list continues.

### Run it from your code (API)

Every run returns a dataset you can fetch as JSON, CSV or Excel. Replace `YOUR_APIFY_TOKEN` with your token from **Console → Settings → API & Integrations**.

**cURL** (waits for the run and returns the results):

```bash
curl -X POST "https://api.apify.com/v2/acts/iveeeeeen~competitor-price-stock-monitor/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"productUrls": ["https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"]}'
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("iveeeeeen/competitor-price-stock-monitor").call(run_input={"productUrls": ["https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js** (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('iveeeeeen/competitor-price-stock-monitor').call({"productUrls": ["https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"]});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Use it with AI agents (MCP)

Add this Actor as a tool in Claude Desktop, Claude Code, Cursor, VS Code or any MCP client through the Apify MCP server:

```
https://mcp.apify.com/?tools=iveeeeeen/competitor-price-stock-monitor
```

Then just ask, for example: “Check these 20 competitor product pages and tell me which prices dropped since yesterday.”

### Schedule it and connect it

Run it daily with a Schedule and set `outputOnlyChanges` plus a `webhookUrl` so you only hear about drops, increases and stock changes. Results work with Apify's integrations: Google Sheets, Slack, email, Zapier, Make, n8n and webhooks.

### Also known as

People find this Actor when searching for: competitor price tracker, price drop alert, back-in-stock alert, Shopify and WooCommerce price monitor, ecommerce price scraper.

### More tools from this developer

- [AI Search Readiness Audit](https://apify.com/iveeeeeen/ai-search-readiness-audit)
- [Website Change Monitor](https://apify.com/iveeeeeen/website-change-monitor-diff)
- [Video Clipper](https://apify.com/iveeeeeen/video-clipper-shorts)
- [Broken Link Checker](https://apify.com/iveeeeeen/broken-link-checker-pro)
- [Website Tech Stack Detector](https://apify.com/iveeeeeen/website-tech-stack-detector)
- [Sitemap URL Extractor](https://apify.com/iveeeeeen/sitemap-url-extractor-pro)
- [RSS Feed Reader](https://apify.com/iveeeeeen/rss-feed-reader-pro)
- [Hacker News Scraper](https://apify.com/iveeeeeen/hacker-news-scraper-api)

Found a bug or want a feature? Open an issue on the **Issues** tab.

# Actor input Schema

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

Public product page URLs to check. Each entry can be a URL string, or an object with a url and optional CSS selector overrides (priceSelector, currencySelector, availabilitySelector, titleSelector) for that page.

## `priceSelector` (type: `string`):

If set, used first for every URL (per-URL priceSelector still wins). If it matches nothing, the built-in extractors run as a fallback.

## `currencySelector` (type: `string`):

CSS selector for a currency code or symbol. Only needed when the price element has no currency.

## `availabilitySelector` (type: `string`):

CSS selector for an in-stock / out-of-stock label.

## `titleSelector` (type: `string`):

CSS selector for the product title.

## `monitorName` (type: `string`):

Separates baselines when you run several monitors in the same account. State is stored in a uniquely named key-value store.

## `outputOnlyChanges` (type: `boolean`):

If true, the dataset only includes products whose price or stock changed (plus the first-run baseline is skipped). Leave false so the first run — and Apify's daily auto-test — always produces rows.

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

If any product's price or stock changed, POST a JSON summary here. The body includes a Slack/Discord-compatible text field, plus structured change details.

## `concurrency` (type: `integer`):

How many product pages to fetch in parallel (1–10).

## Actor input object example

```json
{
  "productUrls": [
    "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
    "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
    "https://scrapeme.live/shop/Abra/"
  ],
  "monitorName": "default",
  "outputOnlyChanges": false,
  "concurrency": 5
}
```

# Actor output Schema

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

Price, stock and change rows for every product that was checked.

# 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://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
        "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
        "https://scrapeme.live/shop/Abra/"
    ],
    "monitorName": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("iveeeeeen/competitor-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://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
        "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
        "https://scrapeme.live/shop/Abra/",
    ],
    "monitorName": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("iveeeeeen/competitor-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 '{
  "productUrls": [
    "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
    "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
    "https://scrapeme.live/shop/Abra/"
  ],
  "monitorName": "default"
}' |
apify call iveeeeeen/competitor-price-stock-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,iveeeeeen/competitor-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/7YX3A578eFMVXq623/builds/2kh9a5hwF0YDiv0md/openapi.json
