# Price & Stock Monitor — Track Product Price Changes (Vigia) (`om_kh/vigia-price-stock-delta`) Actor

Monitor product prices & stock from public pages. Get only changes — price up/down with %, back-in-stock, out-of-stock. Pay only for what changes.

- **URL**: https://apify.com/om\_kh/vigia-price-stock-delta.md
- **Developed by:** [omar khandji](https://apify.com/om_kh) (community)
- **Categories:** E-commerce, Business
- **Stats:** 2 total users, 0 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$7.00 / 1,000 price or stock changes

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

## Vigia Price & Stock Delta

**Monitor product prices and stock — pay only for what changes.**

Point Vigia at public product pages, or give it a Shopify store URL to track its entire catalog, and get only meaningful changes: price up/down (with percent), back-in-stock and out-of-stock. It reads the structured product data (schema.org JSON-LD) shops publish publicly, and Shopify's public `/products.json` catalog feed.

### Why choose Vigia

- **Only changes, only charged for changes, at $0.007** — new products, price up/down, back-in-stock and out-of-stock. Removed and out-of-stock are delivered free. Most trackers bill you every run or every product checked, even when nothing moved — so the real amount you pay is usually higher than their sticker price.
- **Whole-catalog Shopify coverage** — give it a store URL and Vigia reads every product and variant from the store's public catalog feed, no anti-bot fragility.
- **Amazon Best Sellers Rank tracking** — give it ASINs and get price, stock, *and* BSR moves (`bsr_improved`/`bsr_declined`) — fetched via a chained, licensed Amazon actor, never scraped directly.
- **"Lowest price ever" intelligence** — in monitor mode Vigia remembers each product's price history and flags `at_lowest_ever`, `pct_from_lowest` and `pct_from_average`. Know a drop is a *real* all-time low, not noise.
- **Move magnitude** — every price change is tagged `minor` / `moderate` / `major` so you can filter the signal from the noise.
- **Aggregate price signal** — each run returns a `price_signal`: how many up/down, average drop %, biggest mover, total value shift. The story, not just rows.
- **Percent price moves** — every price change includes `previous_price`, `price_change` and `price_change_pct`.
- **Delta monitoring** — turn on monitor mode; later runs return only what changed since the last run.
- **Fair pricing** — hard `maxTotalChargeUsd` cap; never billed without a result.
- **Clean output** — structured JSON/CSV for your CRM, n8n or Make.

### Input

- `productUrls` — public product page URLs, e.g. `["https://shop.example/products/widget"]`
- `shopifyStores` — Shopify store domains, e.g. `["https://shop.example"]`, to track the whole catalog
- `amazonAsins` — Amazon ASINs to track, e.g. `["B01ABCDEF2"]`
- `monitorEnabled` — first run stores a free baseline; later runs deliver only changes.
- `monitorId` — optional name to keep separate targets independent.
- `maxTotalChargeUsd` — hard spend cap for the run.

You can also pass your own `currentProducts` / `previousProducts` arrays if you bring your own data.

### Output

One row per change: `change_type` (new / price_up / price_down / back_in_stock / out_of_stock / removed), `name`, `price`, `previous_price`, `price_change_pct`, `magnitude`, `at_lowest_ever`, `pct_from_lowest`, `pct_from_average`, `in_stock`, `currency`, `source_url`. Plus a `RUN_SUMMARY.json` with the aggregate `price_signal`.

### Notes

- Reads only publicly published structured data. Respects a 1 MB page limit and blocks redirects.
- Price/stock changes are charged after delivery; removed and out-of-stock are free.

# Actor input Schema

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

Public product page URLs to read. Vigia reads only the JSON-LD product data the page publishes.
## `shopifyStores` (type: `array`):

Shopify store domains (e.g. https://shop.example). Vigia reads every product/variant from the store's public products.json — no anti-bot, whole catalog.
## `amazonAsins` (type: `array`):

Amazon product ASINs to track (price, stock and Best Sellers Rank). Fetched via a chained, licensed Amazon actor — never scraped directly.
## `previousProducts` (type: `array`):

Products from the prior run; used to return only what changed.
## `currentProducts` (type: `array`):

Products you supply directly (product_id, name, price, in_stock).
## `monitorEnabled` (type: `boolean`):

The first monitored run stores a free baseline. Later runs deliver and charge only changes.
## `monitorId` (type: `string`):

Pins the persistent baseline to a name of your choice. Leave empty to derive it automatically.
## `maxTotalChargeUsd` (type: `number`):

Hard maximum amount that this run may charge.
## `sources` (type: `array`):

Declare every upstream source before this run.

## Actor input object example

```json
{
  "productUrls": [],
  "shopifyStores": [],
  "amazonAsins": [],
  "previousProducts": [],
  "currentProducts": [
    {
      "product_id": "SKU-1",
      "name": "Example Product",
      "price": 19.99,
      "currency": "USD",
      "in_stock": true
    }
  ],
  "monitorEnabled": false,
  "monitorId": "",
  "maxTotalChargeUsd": 1,
  "sources": [
    {
      "name": "Public product page",
      "authorization": "public_structured_data",
      "estimated_cost_usd": 0
    },
    {
      "name": "Amazon product data (via ryanclinton/amazon-product-scraper)",
      "authorization": "public_search_results",
      "estimated_cost_usd": 0.004
    }
  ]
}
````

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("om_kh/vigia-price-stock-delta").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("om_kh/vigia-price-stock-delta").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 '{}' |
apify call om_kh/vigia-price-stock-delta --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Price & Stock Monitor — Track Product Price Changes (Vigia)",
        "description": "Monitor product prices & stock from public pages. Get only changes — price up/down with %, back-in-stock, out-of-stock. Pay only for what changes.",
        "version": "0.1",
        "x-build-id": "onG4QYYzLMMa2633i"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/om_kh~vigia-price-stock-delta/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-om_kh-vigia-price-stock-delta",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/om_kh~vigia-price-stock-delta/runs": {
            "post": {
                "operationId": "runs-sync-om_kh-vigia-price-stock-delta",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/om_kh~vigia-price-stock-delta/run-sync": {
            "post": {
                "operationId": "run-sync-om_kh-vigia-price-stock-delta",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "maxTotalChargeUsd"
                ],
                "properties": {
                    "productUrls": {
                        "title": "Product page URLs",
                        "type": "array",
                        "description": "Public product page URLs to read. Vigia reads only the JSON-LD product data the page publishes.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "shopifyStores": {
                        "title": "Shopify store URLs",
                        "type": "array",
                        "description": "Shopify store domains (e.g. https://shop.example). Vigia reads every product/variant from the store's public products.json — no anti-bot, whole catalog.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "amazonAsins": {
                        "title": "Amazon ASINs",
                        "type": "array",
                        "description": "Amazon product ASINs to track (price, stock and Best Sellers Rank). Fetched via a chained, licensed Amazon actor — never scraped directly.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "previousProducts": {
                        "title": "Previous products",
                        "type": "array",
                        "description": "Products from the prior run; used to return only what changed.",
                        "default": []
                    },
                    "currentProducts": {
                        "title": "Current products",
                        "type": "array",
                        "description": "Products you supply directly (product_id, name, price, in_stock).",
                        "default": [
                            {
                                "product_id": "SKU-1",
                                "name": "Example Product",
                                "price": 19.99,
                                "currency": "USD",
                                "in_stock": true
                            }
                        ]
                    },
                    "monitorEnabled": {
                        "title": "Monitor only new changes",
                        "type": "boolean",
                        "description": "The first monitored run stores a free baseline. Later runs deliver and charge only changes.",
                        "default": false
                    },
                    "monitorId": {
                        "title": "Monitor ID (optional)",
                        "type": "string",
                        "description": "Pins the persistent baseline to a name of your choice. Leave empty to derive it automatically.",
                        "default": ""
                    },
                    "maxTotalChargeUsd": {
                        "title": "Maximum Vigia charge (USD)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Hard maximum amount that this run may charge.",
                        "default": 1
                    },
                    "sources": {
                        "title": "Declared upstream sources and estimated costs",
                        "type": "array",
                        "description": "Declare every upstream source before this run.",
                        "default": [
                            {
                                "name": "Public product page",
                                "authorization": "public_structured_data",
                                "estimated_cost_usd": 0
                            },
                            {
                                "name": "Amazon product data (via ryanclinton/amazon-product-scraper)",
                                "authorization": "public_search_results",
                                "estimated_cost_usd": 0.004
                            }
                        ]
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
