# Shopify Competitor Price, Stock & New Product Monitor (`maitreya_buddha/shopify-competitor-delta-monitor`) Actor

Track Shopify competitor stores and get only what changed: price drops, price hikes, restocks, out-of-stock alerts, and new product launches. Zero-proxy pure HTTP with persistent KV snapshots and Slack/Discord/n8n webhooks. $2.00 / 1K deltas; $0 when unchanged.

- **URL**: https://apify.com/maitreya_buddha/shopify-competitor-delta-monitor.md
- **Developed by:** [BoGeun Kim](https://apify.com/maitreya_buddha) (community)
- **Categories:** E-commerce, Automation, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 competitor delta events

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

## Shopify Competitor Price, Stock, Restock & MAP Delta Monitor

Monitor up to **50 Shopify competitor stores or specific collections** for **new products, removed products, price drops, price increases, newly started/ended discounts, stockouts, restocks, and MAP (Minimum Advertised Price) violations** — powered by Shopify's public JSON endpoints with **zero browser overhead, zero proxy costs, and persistent Named Key-Value Store snapshots**.

> **Zero charge on baseline & unchanged catalogs — pay only when prices or stock actually change.**
>
> **Built for scheduled daily/hourly runs, n8n/Make/Slack/Discord webhooks, MAP compliance, and MCP AI agents.**

### Why This Monitor Beats Traditional Shopify Scrapers

- **$0 Baseline & Zero-Noise Billing**: Unlike scrapers that bill thousands of "new product" events on your very first run, baseline initialization only stores your catalog snapshot (`recordType: "baseline_initialized"`) at **$0 `delta-event` cost**. Unchanged catalogs and skipped/blocked stores also cost **$0**.
- **8 Precision Variant-Level Delta Events**:
  - `new_product` — newly launched product or variant
  - `removed_product` — deleted or delisted variant
  - `price_drop` — price decreased by at least `minPriceChangePercent` (includes `oldPrice`, `newPrice`, `priceDiff`, `priceChangePercent`)
  - `price_increase` — price increased by at least `minPriceChangePercent`
  - `discount_started` — `compare_at_price` activated above selling price (includes `discountPercent`)
  - `discount_ended` — promotional `compare_at_price` removed or cleared
  - `out_of_stock` — variant availability changed `true → false`
  - `restocked` — variant availability changed `false → true`
- **MAP (Minimum Advertised Price) Violation Detection**: Pass SKU or product handle thresholds in `mapThresholds` (e.g. `{"SKU-123": 49.99}`). Any delta priced below MAP is automatically flagged with `mapViolation: true` and `mapPrice`.
- **Built-in Slack / Discord / n8n Webhook Alerts**: Automatically POSTs a Slack (`text`), Discord (`content`), and n8n/Make (`summary` + `topEvents`) compatible JSON payload whenever 1 or more changes are detected.
- **Shopify 429 Defense & Safe Skipping**: Enforces 1.5s inter-page/inter-store pacing, `Retry-After`-aware exponential backoff retries on HTTP 429/5xx, 15s request timeout, numeric price normalization, atomic snapshot integrity (partial pagination failures never corrupt snapshots), and zero-cost safe skipping of non-Shopify or blocked stores.
- **Persistent Named Key-Value Store Snapshots**: Zero external database needed — snapshots survive across scheduled hourly/daily runs in your chosen `stateStoreName`.

### Input Parameters

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `storeUrls` | string\[] | *(required)* | Up to 50 Shopify store domains or collection URLs (e.g. `https://www.allbirds.com`, `https://www.allbirds.com/collections/mens`) |
| `stateStoreName` | string | `"shopify-delta-monitor-state"` | Named Apify Key-Value Store for persistent cross-run snapshots |
| `maxProductsPerStore` | integer | `500` | Max products fetched per store (`50`–`2500`, paginated at up to 250/page) |
| `minPriceChangePercent` | number | `1.0` | Minimum percentage change required to trigger `price_drop` / `price_increase` |
| `mapThresholds` | object | `{}` | Optional SKU or product handle → Minimum Advertised Price map (e.g. `{"SKU-123": 49.99}`) |
| `eventTypes` | string\[] | All 8 types | Filter which delta event types to emit and charge |
| `emitBaselineSummary` | boolean | `true` | Emit 1 zero-cost `baseline_initialized` summary record on a store's first run |
| `webhookUrl` | string | *(optional)* | Slack, Discord, or n8n/Make webhook URL notified when >= 1 delta event occurs |

### Pay-per-Event Billing

- Charged **only** for emitted `delta` events (`delta-event`), with automatic `maxTotalChargeUsd` budget-cap protection.
- **Never charged** for baseline runs, unchanged stores, or non-Shopify/blocked stores.
- If `eventChargeLimitReached` is triggered mid-store, execution stops immediately and preserves the previous snapshot intact so unbilled deltas are not lost.

### Output Example (Real Live Delta Event)

```json
{
  "recordType": "delta",
  "eventType": "price_drop",
  "store": "https://allbirds.com",
  "storeKey": "snap-allbirds-com-all",
  "productId": "7119956050000",
  "variantId": "40967048167504",
  "handle": "digital-gift-cards",
  "sku": "GIFTDGT050",
  "title": "Digital Gift Card",
  "variantTitle": "$50",
  "vendor": "Allbirds",
  "productType": "Gift Cards",
  "oldPrice": 75,
  "newPrice": 50,
  "priceDiff": -25,
  "priceChangePercent": -33.33,
  "oldCompareAtPrice": null,
  "newCompareAtPrice": null,
  "discountPercent": null,
  "oldAvailable": true,
  "available": true,
  "mapViolation": true,
  "mapPrice": 55,
  "productUrl": "https://allbirds.com/products/digital-gift-cards?variant=40967048167504",
  "imageUrl": "https://cdn.shopify.com/s/files/1/1104/4168/files/Q424_Gifting_Site_PDP_GiftCard_1600x1600_3cbf0651-7406-4a93-910a-551a042bfe4f.png?v=1730312896",
  "updatedAt": "2026-11-20T07:41:09-08:00",
  "detectedAt": "2026-11-20T15:41:09.862Z"
}
```

### Quick Start for Scheduled Monitoring & Webhooks

1. Run once with your competitor `storeUrls` — this initializes your baseline snapshots at **$0 delta cost**.
2. Create an **Apify Schedule** (hourly or daily) using the same `stateStoreName`.
3. Optionally paste your **Slack, Discord, or n8n Webhook URL** into `webhookUrl` to receive instant alerts whenever prices drop, items restock, or competitors breach MAP.

***

### 한국어 요약 (Korean Summary)

경쟁 Shopify/DTC 스토어(최대 50개 도메인 또는 컬렉션 URL)의 \*\*신상품 출시(`new_product`), 상품 삭제(`removed_product`), 가격 인하/인상(`price_drop`/`price_increase`), 할인 시작/종료(`discount_started`/`discount_ended`), 품절(`out_of_stock`), 재입고(`restocked`), MAP(최저광고가격) 위반(`mapViolation`)\*\*을 자동 추적하는 초저비용·고마진 모니터 Actor입니다.

- **첫 실행(Baseline) 및 변동 0건 과금 $0**: 실제 변동(`delta-event`)이 발생한 건에 대해서만 과금됩니다.
- **외부 DB 없이 영구 스냅샷 보존**: Apify Named Key-Value Store(`stateStoreName`)에 Variant 단위 스냅샷을 저장해 정기 스케줄(시간/일간) 비교를 지원합니다.
- **Slack / Discord / n8n Webhook 즉시 알림**: 변동 발생 시 상위 10건 요약 페이로드를 자동 POST 발송하며, 1.5초 요청 간격·지수 백오프·비-Shopify 스토어 안전 스킵을 내장했습니다.

# Actor input Schema

## `storeUrls` (type: `array`):

List of Shopify store domains or collection URLs to monitor (max 50). Examples: 'https://www.allbirds.com', 'https://www.allbirds.com/collections/mens'.

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

Named Apify Key-Value Store used to persist product/variant snapshots across scheduled runs (alphanumeric and hyphens only).

## `maxProductsPerStore` (type: `integer`):

Maximum number of products to fetch per store URL (paginated at up to 250 products/page).

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

Minimum absolute percentage change required to emit 'price_drop' or 'price_increase' events.

## `mapThresholds` (type: `object`):

Optional map of SKU or product handle to Minimum Advertised Price (e.g. {"SKU-123": 49.99, "mens-tree-runner": 95}). Delta events priced below MAP are flagged with mapViolation: true.

## `eventTypes` (type: `array`):

Filter which of the 8 delta event types to emit and bill. Allowed values: new_product, removed_product, price_drop, price_increase, discount_started, discount_ended, out_of_stock, restocked.

## `emitBaselineSummary` (type: `boolean`):

On the first run for a store (Baseline), push 1 summary record (recordType: 'baseline_initialized') to the Dataset at $0 delta-event cost.

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

Optional webhook endpoint that receives a Slack/Discord/n8n-compatible summary JSON POST whenever 1 or more delta events are detected.

## Actor input object example

```json
{
  "storeUrls": [
    "https://www.allbirds.com"
  ],
  "stateStoreName": "shopify-delta-monitor-state",
  "maxProductsPerStore": 50,
  "minPriceChangePercent": 1,
  "eventTypes": [
    "new_product",
    "removed_product",
    "price_drop",
    "price_increase",
    "discount_started",
    "discount_ended",
    "out_of_stock",
    "restocked"
  ],
  "emitBaselineSummary": true
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "storeUrls": [
        "https://www.allbirds.com"
    ],
    "maxProductsPerStore": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("maitreya_buddha/shopify-competitor-delta-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 = {
    "storeUrls": ["https://www.allbirds.com"],
    "maxProductsPerStore": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("maitreya_buddha/shopify-competitor-delta-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 '{
  "storeUrls": [
    "https://www.allbirds.com"
  ],
  "maxProductsPerStore": 50
}' |
apify call maitreya_buddha/shopify-competitor-delta-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,maitreya_buddha/shopify-competitor-delta-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/BWVPFzcnTryG81Q7O/builds/PUgotHXGNQ5oP3FZi/openapi.json
