# Shopify Price & Sale Monitor — Track Price Drops, Sales & Stock (`bisketapis/shopify-price-sale-monitor`) Actor

Monitor any Shopify store and get only what CHANGED since the last run — price drops/rises, sales started/ended, new & removed products and variants, sell-outs and restocks. Schedule it; pay per change. Pure HTTP, no login.

- **URL**: https://apify.com/bisketapis/shopify-price-sale-monitor.md
- **Developed by:** [Chris Lucas](https://apify.com/bisketapis) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 change detecteds

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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## Shopify Price & Sale Monitor

Track **what changed** in any Shopify store's catalog — not another full dump. Schedule this
Actor (daily / weekly), and each run returns **only the changes since the last run**: price
drops and increases, sales starting and ending, new and removed products and variants,
sell-outs and restocks. Pure HTTP, no login, no per-store setup.

### What you get — one row per change

| change_type | fires when | use it for |
|---|---|---|
| `price_drop` / `price_increase` | a variant's price moved | repricing intel, deal alerts |
| `sale_started` / `sale_ended` | the compare-at price flipped on/off | promo & discount tracking |
| `new_product` | a product appeared that wasn't there last run | launch / catalog-expansion alerts |
| `new_variant` | a known product gained a variant | size/color additions |
| `removed` | a variant disappeared | discontinued / delisted |
| `sold_out` / `restocked` | a variant's availability flipped | back-in-stock & demand signals |

Every row carries the **old and new value** plus both run timestamps
(`prior_scraped_at`, `scraped_at`), so each change is auditable between two real observations.

### How it works
1. **First run on a store = baseline.** It records the catalog and emits **no** changes
   (you are not billed for changes on a baseline run). 
2. **Every run after** compares the store to its previous snapshot and returns the deltas.
3. **Schedule it** (Apify Schedules) at the cadence you care about — the gap between runs is
   the window each change is measured over.

> **Honesty note.** Shopify exposes a public `available` flag (in stock / out of stock),
> **not** inventory quantities — so `sold_out` / `restocked` are availability flips, never
> unit counts. `sale_started`/`sale_ended` and `price_pct`/`price_delta` are **derived** from
> the observed `price` and `compare_at_price`.

### Input
| Field | Description |
|---|---|
| `storeUrls` | Shopify store URLs or domains to monitor (e.g. `https://www.allbirds.com`). |
| `mode` | `monitor` (report changes, default) or `baseline` (seed/reset only). |
| `changeTypes` | Only report these change types (empty = all). |
| `minPriceChangePct` | Suppress price moves smaller than this percent (noise filter). |
| `collectionHandles` | Optional — monitor only these collections (split large catalogs). |
| `maxProductsPerStore` | Cap per store (0 = unlimited). |
| `requestDelayMs` | Politeness delay between requests (default 200). |

### Output (one row per change)
`store_domain, change_type, product_id, product_title, product_url, variant_id,
variant_title, sku, old_price, new_price, price_delta, price_pct, old_compare_at,
new_compare_at, old_available, new_available, prior_scraped_at, scraped_at`

### Pricing
Pay-per-event: a tiny per-run start fee plus a charge **per detected change**. Baseline runs
and runs with no changes cost only the trivial start fee — you pay for deltas, not dumps.
See the Store listing for current rates.

### Tips
- For very large catalogs (tens of thousands of variants), split the store across
  `collectionHandles` so each snapshot stays small and runs stay cheap.
- Set `minPriceChangePct` (e.g. `5`) to ignore penny-level repricing churn.

# Actor input Schema

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

Shopify store URLs or bare domains to monitor, e.g. https://www.allbirds.com. The first run on a store records a baseline (no changes billed); every run after it reports what changed since the previous run.
## `mode` (type: `string`):

monitor (default): report changes since the last run. baseline: just (re)record the current catalog as the new starting point and emit nothing — use it to seed a store or reset after big intentional changes.
## `changeTypes` (type: `array`):

Limit output to these change types. Leave empty to report all of them.
## `minPriceChangePct` (type: `integer`):

Suppress price changes smaller than this percentage (noise filter). 0 = report every price change. Does not affect sale or stock changes.
## `collectionHandles` (type: `array`):

If set, monitor only these collections via /collections/<handle>/products.json instead of the whole store. Useful for splitting very large catalogs.
## `maxProductsPerStore` (type: `integer`):

Cap the number of products read per store (0 = unlimited).
## `requestDelayMs` (type: `integer`):

Politeness delay between page requests.

## Actor input object example

```json
{
  "storeUrls": [
    "https://www.allbirds.com"
  ],
  "mode": "monitor",
  "changeTypes": [],
  "minPriceChangePct": 0,
  "maxProductsPerStore": 0,
  "requestDelayMs": 200
}
````

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bisketapis/shopify-price-sale-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"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=bisketapis/shopify-price-sale-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Shopify Price & Sale Monitor — Track Price Drops, Sales & Stock",
        "description": "Monitor any Shopify store and get only what CHANGED since the last run — price drops/rises, sales started/ended, new & removed products and variants, sell-outs and restocks. Schedule it; pay per change. Pure HTTP, no login.",
        "version": "0.1",
        "x-build-id": "P7hkLTcn7vEo2pqRa"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/bisketapis~shopify-price-sale-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-bisketapis-shopify-price-sale-monitor",
                "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/bisketapis~shopify-price-sale-monitor/runs": {
            "post": {
                "operationId": "runs-sync-bisketapis-shopify-price-sale-monitor",
                "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/bisketapis~shopify-price-sale-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-bisketapis-shopify-price-sale-monitor",
                "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": [
                    "storeUrls"
                ],
                "properties": {
                    "storeUrls": {
                        "title": "Store URLs",
                        "type": "array",
                        "description": "Shopify store URLs or bare domains to monitor, e.g. https://www.allbirds.com. The first run on a store records a baseline (no changes billed); every run after it reports what changed since the previous run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "monitor",
                            "baseline"
                        ],
                        "type": "string",
                        "description": "monitor (default): report changes since the last run. baseline: just (re)record the current catalog as the new starting point and emit nothing — use it to seed a store or reset after big intentional changes.",
                        "default": "monitor"
                    },
                    "changeTypes": {
                        "title": "Change types to report",
                        "type": "array",
                        "description": "Limit output to these change types. Leave empty to report all of them.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "price_drop",
                                "price_increase",
                                "sale_started",
                                "sale_ended",
                                "new_product",
                                "new_variant",
                                "removed",
                                "sold_out",
                                "restocked"
                            ],
                            "enumTitles": [
                                "Price drop",
                                "Price increase",
                                "Sale started",
                                "Sale ended",
                                "New product",
                                "New variant",
                                "Removed",
                                "Sold out",
                                "Restocked"
                            ]
                        },
                        "default": []
                    },
                    "minPriceChangePct": {
                        "title": "Minimum price change (%)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Suppress price changes smaller than this percentage (noise filter). 0 = report every price change. Does not affect sale or stock changes.",
                        "default": 0
                    },
                    "collectionHandles": {
                        "title": "Collection handles (optional)",
                        "type": "array",
                        "description": "If set, monitor only these collections via /collections/<handle>/products.json instead of the whole store. Useful for splitting very large catalogs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxProductsPerStore": {
                        "title": "Max products per store",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap the number of products read per store (0 = unlimited).",
                        "default": 0
                    },
                    "requestDelayMs": {
                        "title": "Request delay (ms)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Politeness delay between page requests.",
                        "default": 200
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
