# Shopify Store Price, Discount & Restock Monitor (`simon_kundrik/shopify-price-restock-monitor`) Actor

Monitor any public Shopify store or collection for price drops, back-in-stock restocks, new products, and newly started sales via public products.json. Zero proxies, stateful delta tracking, exact discount math, and instant n8n/Make/MCP alerts.

- **URL**: https://apify.com/simon_kundrik/shopify-price-restock-monitor.md
- **Developed by:** [Kundrik Apps](https://apify.com/simon_kundrik) (community)
- **Categories:** E-commerce, Automation, AI
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 product changes emitted

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/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

## Shopify Store Price, Discount & Restock Monitor

Monitor any public **Shopify storefront or collection** for **price drops, back-in-stock restocks, newly launched products, and freshly started sales** via public `/products.json` and `/meta.json` endpoints - with **zero proxies, zero browser overhead, and stateful delta persistence**.

Built for **e-commerce competitor price tracking, restock alerts, deal-finding bots, n8n/Make/Zapier automations, and AI agents (MCP)**.

### Key Advantages

- **True Stateful Delta Tracking (`deltaMode: true`):** Persists variant prices, compare-at prices, and stock availability in a named Apify Key-Value Store. Scheduled runs emit and charge **only for actual changes** (`price_drop`, `back_in_stock`, `sale_started`, `new`, `price_increase`, `out_of_stock`) instead of re-charging for an entire catalog every hour.
- **Exact Price-Drop Math Included:** Every change row includes `price`, `previousPrice`, `priceChange`, `priceChangePercent`, `compareAtPrice`, `discountPercent`, `currency` (auto-detected via `/meta.json`), and `available` / `previousAvailable`.
- **Collection-Scoped or Full-Store Monitoring:** Paste bare domains (`allbirds.co.uk`), collection URLs (`https://allbirds.co.uk/collections/sale`), or `{ "url": "...", "collection": "..." }` objects.
- **Filter Before Charging:** Filter by `watchEvents`, `minPriceChangePercent`, `includeKeywords`, `excludeKeywords`, `vendors`, `productTypes`, `minPrice`, `maxPrice`, `minDiscountPercent`, and `onlyAvailable`.
- **Proxy-Free & Fast:** Runs at 256 MB RAM with polite 429/5xx backoff and `LIMITED_PERMISSIONS` for Apify MCP discovery.

### Input Example

```json
{
  "stores": [
    "https://deathwishcoffee.com",
    "https://allbirds.co.uk"
  ],
  "watchEvents": ["new", "price_drop", "back_in_stock", "sale_started"],
  "deltaMode": true,
  "firstRunMode": "emit_limited",
  "firstRunEmitLimit": 10,
  "minPriceChangePercent": 5,
  "onlyAvailable": true
}
```

### Output Example

```json
{
  "changeType": "price_drop",
  "changes": ["price_drop", "sale_started"],
  "store": "allbirds.co.uk",
  "storeUrl": "https://allbirds.co.uk",
  "productId": "7412901847123",
  "variantId": "41928374615012",
  "handle": "mens-wool-runners",
  "title": "Men's Wool Runners",
  "variantTitle": "Natural Grey / UK 9",
  "vendor": "Allbirds",
  "productType": "Shoes",
  "tags": ["wool", "runners", "sale"],
  "sku": "WR-NG-09",
  "price": 78.0,
  "previousPrice": 110.0,
  "priceChange": -32.0,
  "priceChangePercent": -29.09,
  "compareAtPrice": 110.0,
  "discountPercent": 29.09,
  "currency": "GBP",
  "available": true,
  "previousAvailable": true,
  "url": "https://allbirds.co.uk/products/mens-wool-runners?variant=41928374615012",
  "imageUrl": "https://cdn.shopify.com/s/files/1/example/wool-runners.jpg",
  "publishedAt": "2026-09-10T08:00:00Z",
  "updatedAt": "2026-12-04T08:45:00Z",
  "descriptionText": "",
  "detectedAt": "2026-12-04T09:00:00Z"
}
```

### Transparent Pay-Per-Event Pricing

| Event Name | Title | Price |
|---|---|---|
| `store-checked` | Shopify store or collection checked | `$0.001` (`$1.00 / 1,000 checks`) |
| `item-emitted` | Matching product/variant change emitted | `$0.001` (`$1.00 / 1,000 changes`) |

- **Free Apify Plan Limits:** Free users can test up to **3 stores** and **25 emitted changes per run**. Paid Apify plans unlock unlimited stores and up to 25,000 changes per run.
- **Note:** Only works on Shopify storefronts that leave their public `/products.json` endpoint enabled (password-protected or headless stores with disabled `/products.json` return an explanatory error without aborting other stores in the run).

#### Realistic Monthly Cost Examples

| Schedule & Scope | Monthly Store Checks | Est. Price/Restock Events / Mo | Total Monthly Cost |
|---|---|---|---|
| 10 competitor Shopify stores checked every 6 hours | 1,200 | 300 | **~$1.50 / month** |
| 5 sneaker/drop stores checked every 30 minutes | 7,200 | 400 | **~$7.60 / month** |
| 50 niche brand collections checked daily | 1,500 | 500 | **~$2.00 / month** |

### Automation & AI Agent Recipes

#### 1. Apify MCP Server (AI Shopping & Competitor Intel Agents)

Connect `https://mcp.apify.com` and prompt:

> *"Run `simon_kundrik/shopify-price-restock-monitor` on `https://allbirds.co.uk` with `watchEvents: ["price_drop", "sale_started"]` and list the steepest discounts."*

#### 2. Discord / Slack Deal & Restock Bot (n8n / Make)

- **Ready-to-import n8n template:** Download [`shopify-price-drop-discord.json`](https://kundrikapps.co.uk/templates/shopify-price-drop-discord.json) ([setup guide](https://kundrikapps.co.uk/templates/#shopify-n8n)).

1. Schedule **Apify → Run Actor** (`simon_kundrik/shopify-price-restock-monitor`) with `deltaMode: true` and `minPriceChangePercent: 10`.
2. Send each emitted variant's `title`, `variantTitle`, `price`, `previousPrice`, `discountPercent`, `imageUrl`, and direct `url` into a Discord or Slack webhook.

#### 3. Direct REST API (cURL)

```bash
curl -X POST "https://api.apify.com/v2/acts/simon_kundrik~shopify-price-restock-monitor/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"stores":["https://allbirds.co.uk"],"deltaMode":true,"firstRunMode":"emit_limited","firstRunEmitLimit":5}'
```

### Frequently Asked Questions

**Do I get charged for unchanged products on every run?**
No. With `deltaMode: true`, only actual variant changes (`price_drop`, `back_in_stock`, `sale_started`, `new`, `price_increase`, `out_of_stock`) are emitted and billed.

**How is the store currency detected?**
The Actor checks Shopify's public `/meta.json` endpoint automatically to resolve `GBP`, `USD`, `EUR`, and other store currencies.

**What if a Shopify store has disabled `/products.json`?**
Password-protected or custom headless storefronts that block `/products.json` are logged cleanly in `RUN_SUMMARY` without failing the rest of your store watchlist.

**Built & Maintained by [Kundrik Apps](https://kundrikapps.co.uk)** (UK). Support & custom requests: `support@kundrikapps.co.uk`.

# Actor input Schema

## `stores` (type: `array`):

List of Shopify store domains, collection URLs (e.g. 'https://allbirds.co.uk/collections/sale'), or objects like {"url": "https://allbirds.co.uk", "collection": "sale"}.

## `watchEvents` (type: `array`):

Which variant-level state transitions should trigger an emitted dataset item in delta mode.

## `deltaMode` (type: `boolean`):

When enabled, seen variant prices and stock flags are persisted in a named Key-Value Store so scheduled runs only emit and charge for changes.

## `stateStoreName` (type: `string`):

Apify Key-Value Store name used to remember variant prices and availability between scheduled runs.

## `stateNamespace` (type: `string`):

Separate state key if you run multiple independent Shopify monitoring schedules against the same Key-Value Store.

## `firstRunMode` (type: `string`):

Choose whether run 1 emits up to firstRunEmitLimit items per store, seeds silently with 0 emissions, or emits all matching variants.

## `firstRunEmitLimit` (type: `integer`):

Caps emitted variants per store on run 1 when firstRunMode is 'emit_limited' so seeding a large catalog stays cheap.

## `minPriceChangePercent` (type: `number`):

Ignore tiny price fluctuations smaller than this percentage threshold (e.g. 5 ignores price changes under 5%).

## `includeKeywords` (type: `array`):

Only emit variants whose title, variant title, vendor, product type, tags, or SKU contain at least one of these terms.

## `excludeKeywords` (type: `array`):

Skip variants whose metadata contains any of these terms (e.g. 'gift card', 'sample', 'kids').

## `vendors` (type: `array`):

Optional list of exact Shopify vendor names to include.

## `productTypes` (type: `array`):

Optional list of exact Shopify product_type values to include.

## `minPrice` (type: `number`):

Only emit variants priced at or above this amount in the store's currency.

## `maxPrice` (type: `number`):

Only emit variants priced at or below this amount in the store's currency.

## `minDiscountPercent` (type: `number`):

Only emit variants whose compare_at_price discount is at least this percentage.

## `onlyAvailable` (type: `boolean`):

When enabled, only emit variants currently marked available=true.

## `includeDescription` (type: `boolean`):

Include HTML-stripped plain-text product description (up to 1,500 chars) on each emitted variant.

## `maxPagesPerStore` (type: `integer`):

Safety limit on products.json pages fetched per store (10 pages = up to 2,500 products).

## `maxItemsPerStore` (type: `integer`):

Upper limit on dataset rows emitted from any single store in one run.

## `maxTotalItems` (type: `integer`):

Hard ceiling on total dataset rows emitted across all stores in one run.

## `requestTimeoutSecs` (type: `integer`):

Timeout in seconds for each Shopify storefront JSON request.

## `dryRun` (type: `boolean`):

Preview detected changes without saving updated variant baselines to the Key-Value Store.

## Actor input object example

```json
{
  "stores": [
    "https://deathwishcoffee.com",
    "https://allbirds.co.uk"
  ],
  "watchEvents": [
    "new",
    "price_drop",
    "back_in_stock",
    "sale_started"
  ],
  "deltaMode": true,
  "stateStoreName": "shopify-monitor-state",
  "stateNamespace": "default",
  "firstRunMode": "emit_limited",
  "firstRunEmitLimit": 10,
  "minPriceChangePercent": 0,
  "includeKeywords": [],
  "excludeKeywords": [],
  "vendors": [],
  "productTypes": [],
  "onlyAvailable": false,
  "includeDescription": false,
  "maxPagesPerStore": 10,
  "maxItemsPerStore": 200,
  "maxTotalItems": 1000,
  "requestTimeoutSecs": 20,
  "dryRun": false
}
```

# Actor output Schema

## `changesDataset` (type: `string`):

Structured variant records including changeType, price, previousPrice, priceChangePercent, discountPercent, currency, available, and product URL.

## `runSummary` (type: `string`):

Execution summary including stores checked, variants scanned, items emitted, change type breakdown, and errors.

# 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 = {
    "stores": [
        "https://deathwishcoffee.com",
        "https://allbirds.co.uk"
    ],
    "stateStoreName": "shopify-monitor-state",
    "stateNamespace": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("simon_kundrik/shopify-price-restock-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 = {
    "stores": [
        "https://deathwishcoffee.com",
        "https://allbirds.co.uk",
    ],
    "stateStoreName": "shopify-monitor-state",
    "stateNamespace": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("simon_kundrik/shopify-price-restock-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 '{
  "stores": [
    "https://deathwishcoffee.com",
    "https://allbirds.co.uk"
  ],
  "stateStoreName": "shopify-monitor-state",
  "stateNamespace": "default"
}' |
apify call simon_kundrik/shopify-price-restock-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,simon_kundrik/shopify-price-restock-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/MhjcOJb6O0JGWcQa0/builds/X8VEslTY3ntEYvKN7/openapi.json
