# Shopify Competitor Price Monitor (`davidbenittah/shopify-competitor-price-monitor`) Actor

Shopify competitor price monitor: watch rival stores on a schedule and get only the changes — price moves, restocks, out-of-stocks, and new products.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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 Competitor Price Monitor

**Shopify competitor price monitor** that watches rival stores on a schedule and returns **only what changed** since the last run: price moves (with old price, new price, and %), restocks, out-of-stocks, and new product launches. DTC brands usually discover a competitor's price cut days too late — this monitor tells you the morning it happens.

### Features

- **Diff, not dump**: the first run snapshots each store's catalog; every following run outputs only changes.
- **Four change types**: `price_change` (old/new/% delta), `restock`, `out_of_stock`, `new_product`.
- **Variant-level tracking**: every size/color variant is tracked by its own price and availability, with SKU.
- **Multi-store**: watch up to 20 competitor stores per run — one scheduled task covers your whole competitive set.
- **No login, no proxy games**: reads each store's public `products.json` catalog endpoint that Shopify exposes on every storefront.
- **Resilient**: a store that fails to fetch is reported as `store_error` and keeps its baseline; pagination caps never cause false "new product" alerts.

### Use cases

- **DTC brands**: get pinged when a competitor cuts prices, launches a product, or sells out of a bestseller.
- **Pricing teams**: feed `price_change` events straight into repricing rules via the Apify API or integrations.
- **Dropshippers & resellers**: catch restocks of high-demand items the hour they happen.
- **Market analysts**: track launch cadence and assortment moves across a niche.

### Input / Output

Input:

```json
{
  "storeUrls": ["https://shop.gymshark.com", "https://competitor2.com"],
  "maxProductsPerStore": 250
}
````

Output — one dataset item per change:

```json
{
  "type": "price_change",
  "store": "https://competitor2.com",
  "title": "Sneaker Classique — 42",
  "sku": "SNK-42",
  "productUrl": "https://competitor2.com/products/sneaker-classique",
  "previousPrice": "89.00",
  "newPrice": "79.00",
  "changePercent": -11.24,
  "detectedAt": "2026-07-06T09:00:00.000Z"
}
```

The first run pushes one `baseline` item per store (products tracked count). Every later run pushes only changes. A `SUMMARY` record reports per-run counts.

### Pricing

Pay per event: a small fee per change detected. No underlying scraper costs — the Actor reads Shopify's public catalog JSON directly, so a daily monitor of 5 stores costs cents per month in platform usage plus the per-result fee only when something actually changes.

### FAQ

**Which stores does this work on?**
Any Shopify storefront that exposes the standard public `/products.json` catalog (the default for Shopify stores). If a store has disabled it, you get a clear `store_error` item instead of silent gaps.

**Why did my first run return almost nothing?**
By design: the first run saves the baseline and outputs one summary item per store. Changes start from the second run.

**How is stock detected?**
From the `available` flag on each variant in the public catalog. If a store's catalog does not expose availability, stock alerts are skipped for it (prices and new products still work).

**Can I track more than 250 products per store?**
Yes, raise `maxProductsPerStore` up to 1000. Products beyond the cap are ignored consistently and never generate false alerts.

**Is this legal?**
The Actor reads a public, unauthenticated catalog endpoint that Shopify serves for every storefront, and collects no personal data. You are responsible for how you use the data.

# Actor input Schema

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

Base URLs of the Shopify stores to watch (e.g. 'https://examplestore.com'). Hard maximum: 20 stores per run.

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

Safety cap on catalog size read per store. Hard maximum: 1000.

## `monitorId` (type: `string`):

Optional. Advanced: name this monitor to keep separate baselines for the same set of stores, or reset one by changing the ID.

## Actor input object example

```json
{
  "storeUrls": [
    "https://shop.gymshark.com"
  ],
  "maxProductsPerStore": 250
}
```

# 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://shop.gymshark.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("davidbenittah/shopify-competitor-price-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://shop.gymshark.com"] }

# Run the Actor and wait for it to finish
run = client.actor("davidbenittah/shopify-competitor-price-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://shop.gymshark.com"
  ]
}' |
apify call davidbenittah/shopify-competitor-price-monitor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Shopify Competitor Price Monitor",
        "description": "Shopify competitor price monitor: watch rival stores on a schedule and get only the changes — price moves, restocks, out-of-stocks, and new products.",
        "version": "1.0",
        "x-build-id": "tcfgVDqZo1WcQCrb2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/davidbenittah~shopify-competitor-price-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-davidbenittah-shopify-competitor-price-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/davidbenittah~shopify-competitor-price-monitor/runs": {
            "post": {
                "operationId": "runs-sync-davidbenittah-shopify-competitor-price-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/davidbenittah~shopify-competitor-price-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-davidbenittah-shopify-competitor-price-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": "Competitor Shopify store URLs",
                        "type": "array",
                        "description": "Base URLs of the Shopify stores to watch (e.g. 'https://examplestore.com'). Hard maximum: 20 stores per run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxProductsPerStore": {
                        "title": "Max products tracked per store",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Safety cap on catalog size read per store. Hard maximum: 1000.",
                        "default": 250
                    },
                    "monitorId": {
                        "title": "Custom monitor ID",
                        "type": "string",
                        "description": "Optional. Advanced: name this monitor to keep separate baselines for the same set of stores, or reset one by changing the ID."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
