# Universal Price & Stock Monitor (`codeclouds/universal-price-monitor`) Actor

Track price and stock status on any webshop via schema.org JSON-LD — no per-site setup, with optional cross-run change detection.

- **URL**: https://apify.com/codeclouds/universal-price-monitor.md
- **Developed by:** [Dennis](https://apify.com/codeclouds) (community)
- **Categories:** E-commerce, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 product results

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 Price & Stock Monitor 🏷️

Track **price and stock status on any webshop** — not just one platform. Give it a list of product page
URLs and it extracts price, currency and availability directly from the page's own `schema.org` structured
data (the same `Product`/`Offer` JSON-LD most modern e-commerce sites already publish for Google Rich
Results). No per-site setup, no API keys, no login.

Optional cross-run change detection tells you exactly what moved: new listing, price change, or a
back-in-stock/out-of-stock flip — compared against the same URL's result from the last run.

### Why this monitor?

Most price-tracking actors are built for one specific platform, or rely on fragile CSS selectors that break
on every redesign. This one reads the structured data that shops themselves publish for search engines —
more robust, and it works on virtually any modern webshop, regardless of platform:

- 🌍 **Platform-independent** — works on any shop that publishes `schema.org Product`/`Offer` JSON-LD, not
  just one specific e-commerce platform
- 🧱 **Robust by design** — reads standardized structured data instead of CSS classes, so it doesn't break on
  a visual redesign the way a selector-based scraper would
- 📉 **Change detection** — every record can be annotated `new`, `price_change`, `back_in_stock`,
  `out_of_stock` or `unchanged`, including the previous price and % change
- 🔀 **Handles multiple price shapes** — a fixed price (`Offer`) or a price range from multiple sellers
  (`AggregateOffer`, common on marketplaces) are both normalized into one flat structure
- 🛡️ **Fails per URL, not per run** — one blocked or JSON-LD-less page never stops the rest of the batch
- 🧾 **Clean, flat JSON** — no nested blobs, ready for spreadsheets, BI tools or AI agents (MCP)

### When should an AI agent use this?

- "Did the price of \[product URL] change since yesterday?"
- "Is \[product] currently in stock at \[shop.example.com]?"
- "Check these 20 product URLs and tell me which ones dropped in price."
- "Is this listing still available, or has it been discontinued?"
- "Monitor my top 5 competitor product pages and alert me on any price move."
- "What's the current price range for \[product] across these marketplace listings?"

### What data do you get?

One record per product URL:

```json
{
  "url": "https://www.example-shop.com/products/wireless-headphones",
  "productName": "Wireless Noise-Cancelling Headphones",
  "schemaType": "Product",
  "price": 219,
  "priceMin": null,
  "priceMax": null,
  "currency": "EUR",
  "availability": "in_stock",
  "sku": "969421",
  "foundJsonLd": true,
  "error": null,
  "checkedAt": "2026-09-03T16:01:22.529Z",
  "changeType": "price_change",
  "previousPrice": 249,
  "priceChangePercent": -12.05
}
```

On a marketplace-style page with multiple sellers (`ProductGroup`/`AggregateOffer` — no single fixed
price), `price` is `null` and `priceMin`/`priceMax` are filled instead:

```json
{
  "url": "https://www.example-marketplace.com/p/wireless-headphones/123456",
  "productName": "Wireless Noise-Cancelling Headphones",
  "schemaType": "ProductGroup",
  "price": null,
  "priceMin": 129,
  "priceMax": 217.5,
  "currency": "EUR",
  "availability": "unknown"
}
```

If a page has no usable `Product`/`ProductGroup` JSON-LD, `foundJsonLd` is `false` (not an error) — the
actor reports this per URL instead of failing the run.

### Use cases

- **Competitive price intelligence** — track competitor product pages across any number of different shops
- **MAP / brand compliance** — verify resellers respect a minimum advertised price, regardless of which
  platform they sell on
- **Deal hunting & arbitrage** — schedule daily runs and alert only on real price drops
- **Availability monitoring** — know the moment a sold-out item is back in stock
- **Marketplace price-range tracking** — watch the low/high price spread on multi-seller listings
- **AI agents & dashboards** — clean structured JSON, ideal for LLM tools (MCP), Google Sheets or BI
  pipelines

### Quick start

**Check current price/stock for a handful of products:**

```json
{ "productUrls": ["https://www.example-shop.com/products/wireless-headphones"] }
```

**Daily price-alert monitoring:**

```json
{
  "productUrls": [
    "https://shopA.example.com/product/1",
    "https://shopB.example.com/product/2"
  ],
  "trackChanges": true,
  "minPriceChangePercent": 2
}
```

Schedule this daily: the first run establishes a baseline (`changeType: "new"` for every URL), every next
run reports only genuine changes. Wire it to Slack, e-mail or Google Sheets via Apify integrations.

### Input reference

| Field | Description |
|---|---|
| `productUrls` | Product page URLs to check (required, up to 500 per run) |
| `maxConcurrency` | How many pages to fetch in parallel (default 3) |
| `trackChanges` | Compare each result against the same URL's result from the last run. Only meaningful on a **scheduled** actor — a one-off run always reports `new` (nothing to compare against yet) |
| `minPriceChangePercent` | With `trackChanges` on: a price move smaller than this percentage is recorded as `unchanged` instead of `price_change` (filters out currency-rounding noise) |

### Pricing

Pay per event: regular checks are billed at the base rate; a genuinely detected **change**
(`price_change`/`back_in_stock`/`out_of_stock`) is billed at a slightly higher rate — you pay for insight,
not bulk. A first/baseline run (`changeType: "new"`) is always billed at the base rate.

- **`product-result`:** $0.003 per checked URL (base data — includes the first `new` sighting of a URL)
- **`price-alert`:** $0.01 per URL, only for a genuinely detected `price_change`, `back_in_stock` or
  `out_of_stock` (requires `trackChanges: true` and a previous run to compare against)

### Run summary

A `RUN_SUMMARY` object (checked/alert/error counts) is written to the actor's key-value store after every
run, and is also pushed as the last item in the **dataset** (marked `"recordType": "run_summary"`, easy to
filter out) — so no-code integrations (Zapier, Make, Google Sheets) that only read the dataset see it too,
without an extra API call. No extra charge.

### Reliability notes

- Reads `schema.org` structured data (`application/ld+json`), the same data shops publish for Google Rich
  Results — far more stable across redesigns than CSS-selector scraping
- A page without usable Product/ProductGroup JSON-LD is reported as `foundJsonLd: false`, not an error — some
  shops or individual pages simply don't publish this data
- A blocked or unreachable URL (HTTP error, network failure, bot protection) is reported per URL with an
  `error` message and never fails the rest of the run
- Product/price/stock data only — no personal data is collected, so GDPR exposure is minimal
- Because this actor works on any URL you supply, it cannot pre-verify every possible target site's terms of
  service — you're responsible for only monitoring pages you're permitted to access. This actor only reads
  publicly accessible pages (no login, no CAPTCHA bypass, no paywall circumvention)

### FAQ

**Does it work on every webshop?** Any shop that publishes `schema.org Product` or `ProductGroup` JSON-LD —
which is the large majority of modern e-commerce platforms (implemented for SEO/Google Rich Results). A page
without it is reported as `foundJsonLd: false`.

**What if a shop uses multiple sellers/offers for one product?** The actor reads the first offer, or — for
an `AggregateOffer` (e.g. marketplace listings with several sellers) — the low/high price range instead of a
single price.

**Does `trackChanges` work on a one-off run?** It needs a previous run to compare against, so a single manual
run always reports every URL as `new`. Schedule the actor to get ongoing change detection.

**Where is the change history stored?** A compact snapshot (price, availability, timestamp) per monitored
URL lives in the actor's key-value store; each run compares against it and updates it.

### Related Actors

Also by this developer:

- **[Shopify Product & Price Monitor](https://apify.com/codeclouds/shopify-price-monitor)** — same
  change-detection value, deeper Shopify-specific data (variants, tags, sale detection via compare-at
  price) via Shopify's own product API. Use that one if every store you monitor is Shopify-powered; use this
  actor when your target list spans different platforms.

***

*Keywords: price tracker, price monitor, stock monitor, price drop alert, competitor price tracking,
schema.org product data, JSON-LD price extraction, e-commerce intelligence, MAP monitoring, universal
webshop scraper.*

### Keywords

price monitor, price tracker, stock monitor, availability tracker, schema.org, json-ld, structured data,
e-commerce, competitor pricing, MAP compliance, deal alert, price drop, universal scraper

### Changelog

#### 0.2.0

- Now also reads Product data nested under a `BuyAction.object` wrapper (found live on MediaMarkt.nl) —
  previously only a top-level `Product`/`ProductGroup` node was recognized. No pricing change.

#### 0.1.0 - Initial release

- Extracts price, currency, availability and SKU from `schema.org Product`/`Offer` JSON-LD on any product
  page, plus `ProductGroup`/`AggregateOffer` (multi-seller price ranges)
- Normalizes both string and numeric price representations, and both bare and full-URI availability tokens
- Optional cross-run change detection (`trackChanges`) via a named key-value-store snapshot: `new`,
  `price_change`, `back_in_stock`, `out_of_stock`, `unchanged`
- `minPriceChangePercent` noise threshold for price-change alerts
- Pay-Per-Event pricing with separate `product-result` and `price-alert` events

# Actor input Schema

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

One or more product page URLs to check. Works on any webshop that publishes schema.org Product/Offer (or ProductGroup/AggregateOffer) JSON-LD data — most modern e-commerce sites do this for Google Rich Results, regardless of platform.

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

How many product pages to fetch in parallel. Keep this low (2-3) for sites with basic bot-protection.

## `trackChanges` (type: `boolean`):

When enabled, each result is compared against the same URL's result from the LAST run and annotated with changeType (new/price\_change/back\_in\_stock/out\_of\_stock/unchanged). Only useful on a SCHEDULED actor — a one-off run always reports every URL as 'new' since there is no previous run to compare against.

## `minPriceChangePercent` (type: `integer`):

Only used when 'Track changes between runs' is on. A price move smaller than this percentage is recorded as 'unchanged' instead of 'price\_change' — filters out currency-rounding noise. Leave empty to alert on any change.

## Actor input object example

```json
{
  "productUrls": [
    "https://www.alternate.nl/HP/EliteBook-8-G2i-DW7K2ET-ABH-14-inch-Copilotplus-laptop/html/product/1950510"
  ],
  "maxConcurrency": 3,
  "trackChanges": false
}
```

# Actor output Schema

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

Results stored in the default dataset.

# 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.alternate.nl/HP/EliteBook-8-G2i-DW7K2ET-ABH-14-inch-Copilotplus-laptop/html/product/1950510"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codeclouds/universal-price-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.alternate.nl/HP/EliteBook-8-G2i-DW7K2ET-ABH-14-inch-Copilotplus-laptop/html/product/1950510"] }

# Run the Actor and wait for it to finish
run = client.actor("codeclouds/universal-price-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://www.alternate.nl/HP/EliteBook-8-G2i-DW7K2ET-ABH-14-inch-Copilotplus-laptop/html/product/1950510"
  ]
}' |
apify call codeclouds/universal-price-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codeclouds/universal-price-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/ExWufu1EL2RvB8tlg/builds/0wgcjiKc9hcHMYpFT/openapi.json
