# Shopify Competitor Change Monitor (`pleasureful_cormorant/shopify-competitor-change-monitor`) Actor

Monitor Shopify competitors for new and removed products, variant price changes, and stock changes. First run builds a baseline; later runs return only changes.

- **URL**: https://apify.com/pleasureful\_cormorant/shopify-competitor-change-monitor.md
- **Developed by:** [Lâm Đỗ](https://apify.com/pleasureful_cormorant) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Competitor Change Monitor

Monitor public Shopify storefronts and receive only product changes since the previous
compatible run—not another full catalog dump. This Shopify competitor monitor produces
structured, API-friendly price, stock, and product-change records without Shopify
credentials.

**FIRST RUN CREATES THE BASELINE AND NORMALLY RETURNS ZERO DATASET ITEMS.** Run it
again later with the same configuration to receive detected changes.

### What it monitors

- `NEW_PRODUCT` — a product appears in a complete comparison.
- `PRODUCT_REMOVED` — a product disappears from a complete comparison.
- `PRICE_DROP` — a variant price decreases.
- `PRICE_INCREASE` — a variant price increases.
- `OUT_OF_STOCK` — a variant becomes unavailable for purchase.
- `BACK_IN_STOCK` — a variant becomes available again.

Price and availability changes are tracked by stable Shopify variant IDs. This makes
the Actor useful as a Shopify price monitor, Shopify price tracker, and Shopify stock
monitor without treating product renames or variant reordering as changes.

### How it works

```text
Run 1  → establish baseline → return zero changes
Run 2+ → compare with baseline → return changes only
```

The Actor checks public storefront sitemaps and Shopify's public product data. It
supports multiple stores and automatically manages the latest compatible baseline.

### Who is this for?

- E-commerce operators monitoring competitor assortments and availability.
- Shopify merchants tracking market price movements.
- Competitive-intelligence and pricing teams.
- Agencies monitoring multiple client or competitor stores.
- Data and API workflows that need structured Shopify product changes.

### Input

```json
{
  "storeUrls": [
    "https://example-store.com",
    "https://another-store.myshopify.com"
  ],
  "maxProducts": 500
}
```

`storeUrls` accepts 1–20 public HTTP(S) storefronts. `maxProducts` applies per store,
defaults to 500, which is also the V1 maximum, and can be lowered for small tests.

### Output

The default dataset contains only detected changes. Stable product and variant IDs and
human-facing URLs remain available in raw JSON.

Price change:

```json
{
  "changeType": "PRICE_DROP",
  "storeUrl": "https://example-store.com",
  "productId": "329678821",
  "handle": "red-rain-coat",
  "title": "Red Rain Coat",
  "productUrl": "https://example-store.com/products/red-rain-coat",
  "variantId": "794864229",
  "variantTitle": "Small",
  "previousPriceMinor": 12900,
  "currentPriceMinor": 10900,
  "detectedAt": "2026-08-26T10:00:00.000Z"
}
```

Stock change:

```json
{
  "changeType": "OUT_OF_STOCK",
  "storeUrl": "https://example-store.com",
  "productId": "329678821",
  "handle": "red-rain-coat",
  "title": "Red Rain Coat",
  "productUrl": "https://example-store.com/products/red-rain-coat",
  "variantId": "794864229",
  "variantTitle": "Small",
  "previousAvailable": true,
  "currentAvailable": false,
  "detectedAt": "2026-08-26T10:00:00.000Z"
}
```

Product-level change:

```json
{
  "changeType": "NEW_PRODUCT",
  "storeUrl": "https://example-store.com",
  "productId": "329678999",
  "handle": "new-jacket",
  "title": "New Jacket",
  "productUrl": "https://example-store.com/products/new-jacket",
  "detectedAt": "2026-08-26T10:00:00.000Z"
}
```

Prices use Shopify's exact integer minor-unit representation. Currency formatting is
intentionally left to the consumer.

### How to monitor automatically

Create an Apify Task with the desired input, then schedule that Task in Apify Console.
Executions of the same Task share an isolated monitoring baseline. The Actor does not
create schedules itself.

### Important behavior

- The first compatible run normally returns zero changes and creates the baseline.
- Later compatible runs return changes only.
- Changing `maxProducts` establishes a new compatible baseline context.
- If the previous extraction was incomplete, unsafe `NEW_PRODUCT` events are suppressed.
- If the current extraction is incomplete, unsafe `PRODUCT_REMOVED` events are suppressed.
- Directly observed matching variants can still produce reliable price and availability changes.
- Dataset delivery is at least once: a rare persistence failure after output may cause
  duplicate changes on retry rather than permanently losing events.

### Limits

- Only publicly accessible Shopify storefront data is supported.
- Private, password-protected, malformed, or merchant-blocked storefronts may fail.
- Availability means storefront purchasability, not physical inventory quantity.
- No CAPTCHA bypass, authentication bypass, private API, or anti-bot evasion is used.
- V1 monitors at most 500 products per store.
- Large catalogs intentionally use conservative request pacing for reliability.
- A best-effort stale-write guard exists, but overlapping runs are not transactionally locked.

### Pricing

Platform usage is included. Customers are not charged underlying compute, storage, or
data-transfer usage separately.

| Event | Price | Charged when |
|---|---:|---|
| Actor start | $0.00005 | Once per run |
| Product checked | $0.00005 | For each successfully fetched and validated Shopify product |
| Change detected | $0.008 | For each change result written to the dataset |

That is $0.05 per 1,000 successfully checked products and $8 per 1,000 detected
changes. A quiet scheduled run still costs product-check fees because the catalog must
be checked to determine that nothing changed.

Examples:

- 10 products and no changes: $0.00055.
- 500 products and no changes: $0.02505.
- 500 products and one detected change: $0.03305.
- 500 products and five detected changes: $0.06505.

### Local development

```bash
npm install
npm run build
npm run typecheck
npm test
npm start
```

# Actor input Schema

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

Enter 1–20 public Shopify storefront URLs. Custom domains and .myshopify.com domains are supported. The first compatible run establishes the monitoring baseline.

## `maxProducts` (type: `integer`):

Limits work performed for each store. V1 supports up to 500 products per store. Lower values are useful for testing. If a catalog exceeds this limit, unsafe new and removed product signals are suppressed.

## Actor input object example

```json
{
  "storeUrls": [
    "https://example-store.com"
  ],
  "maxProducts": 500
}
```

# Actor output Schema

## `changes` (type: `string`):

Detected Shopify product, price, and stock changes. The first baseline run may contain zero items.

# 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("pleasureful_cormorant/shopify-competitor-change-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pleasureful_cormorant/shopify-competitor-change-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 '{}' |
apify call pleasureful_cormorant/shopify-competitor-change-monitor --silent --output-dataset

```

## MCP server setup

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