# Shopify Catalog & Price Monitor (`agentutils/shopify-catalog-monitor`) Actor

Pull products, variants, prices, and stock from public Shopify storefront /products.json endpoints, and optionally emit price, stock, new, and removed changes against a saved snapshot.

- **URL**: https://apify.com/agentutils/shopify-catalog-monitor.md
- **Developed by:** [AgentUtils](https://apify.com/agentutils) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.30 / 1,000 products

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 Catalog & Price Monitor

Pull structured products, variants, prices, and stock from **public Shopify storefront JSON** (`/products.json` and `/collections/<handle>/products.json`). No login, no Shopify Admin API, and no paid proxies.

Use it for **competitor price tracking**, **dropshipping research**, and **MAP monitoring**. Schedule a changes run to see price moves, stock flips, new arrivals, and removals against a saved snapshot.

### What you get

- **Catalog mode** — every variant from one or more public Shopify stores, with title, vendor, type, tags, price, compare-at price, availability, SKU, images, URL, and timestamps.
- **Changes mode** — compare the current catalog to a snapshot in a named key-value store and emit only **new**, **removed**, **price**, and **stock** diffs (or `price_and_stock` when both moved). The first changes run saves the baseline.
- **Collection filters** — pass a collection URL or a list of handles to read `/collections/<handle>/products.json` instead of the full catalog.
- **Polite requests** — default 500 ms between calls, concurrency 1, and a clean skip when a host is not Shopify or has disabled the public JSON.
- **Host fallback** — if `www.example.com` blocks `/products.json`, the Actor tries `example.com` once (and the other way around). Some live stores only expose the catalog on one of the two hosts.

A `SUMMARY` document is written to the default key-value store with product and variant counts, change counts, skipped stores, and whether a pay-per-event budget stopped the run.

### Use cases

- **Competitor price tracking** — schedule catalog or changes runs against rival Shopify storefronts and watch list price, compare-at (sale) price, and availability by variant.
- **Dropshipping research** — collect a supplier or niche store catalog (title, type, tags, images, variant SKUs, and prices) without a Shopify app install.
- **MAP monitoring** — compare advertised price and compare-at price to a minimum advertised price policy, and get a row when a price changes.

### Public endpoints used

The Actor calls only these public HTTPS resources:

- `https://{store}/products.json?limit=250&page={n}`
- `https://{store}/collections/{handle}/products.json?limit=250&page={n}`

It does not use the Shopify Admin API, customer login, or unofficial HTML scrapers. Merchants can disable storefront JSON; those stores are skipped and **not charged**.

The public catalog does not include currency codes or exact warehouse quantities. Prices are returned as numbers (and the original string) in whatever currency the storefront published.

### Input example

Full catalog of two well-known public stores, capped for a cheap test:

```json
{
  "mode": "catalog",
  "storeUrls": ["https://allbirds.com", "https://gymshark.com"],
  "maxProducts": 50
}
```

A single collection, then later a changes run on a schedule:

```json
{
  "mode": "changes",
  "storeUrls": ["https://allbirds.com/collections/mens"],
  "maxProducts": 250,
  "snapshotStoreName": "shopify-catalog-monitor-snapshots"
}
```

Collection handles applied to stores that do not already have a collection in the URL:

```json
{
  "mode": "catalog",
  "storeUrls": ["https://allbirds.com"],
  "collectionHandles": ["mens", "womens"],
  "maxProducts": 100
}
```

### Output example

One dataset row is one variant. This shape matches the public `/products.json` fields:

```json
{
  "recordType": "product",
  "mode": "catalog",
  "changeType": null,
  "storeUrl": "https://allbirds.com",
  "storeDomain": "allbirds.com",
  "collectionHandle": null,
  "productId": "7215632482384",
  "variantId": "41315598073936",
  "handle": "mens-wool-runner-nz-waterproof-natural-black",
  "title": "Men's Wool Runner NZ Waterproof - Natural Black (Natural Black Sole)",
  "variantTitle": "8",
  "vendor": "Allbirds",
  "type": "Shoes",
  "tags": ["allbirds-kosher"],
  "price": 105,
  "compareAtPrice": 150,
  "priceRaw": "105.00",
  "compareAtPriceRaw": "150.00",
  "available": false,
  "sku": "A12019M080",
  "grams": 0,
  "options": { "Size": "8" },
  "images": ["https://cdn.shopify.com/s/files/1/1104/4168/products/example.jpg"],
  "url": "https://allbirds.com/products/mens-wool-runner-nz-waterproof-natural-black?variant=41315598073936",
  "productCreatedAt": "2025-08-29T11:40:32-07:00",
  "productUpdatedAt": "2026-11-23T23:46:51-08:00",
  "productPublishedAt": "2025-08-29T11:40:33-07:00",
  "variantCreatedAt": "2025-08-29T11:40:33-07:00",
  "variantUpdatedAt": "2026-11-23T23:46:51-08:00",
  "scrapedAt": "2026-11-24T07:50:00.000Z",
  "previousPrice": null,
  "previousCompareAtPrice": null,
  "previousAvailable": null
}
```

In changes mode, `changeType` is `new`, `removed`, `price`, `stock`, or `price_and_stock`, and the `previous*` fields hold the last snapshot.

### Pricing

Pay per event: **$0.0003 per product** (`product-item`). That is the primary event.

- Charged **once per product**, including every variant of that product written to the dataset.
- In **changes** mode, only products that are new, removed, or have a price or stock change are charged. Unchanged products are not written and not charged.
- Failed or non-Shopify stores are not charged.
- Additional variants of an already-charged product are stored at no extra event charge.

This is priced below comparable Shopify catalog Actors that list around **$0.0010 per product** on the free plan (about $0.0009–$0.00095 on paid tiers). The Actor stays cheap to run because it only fetches public JSON.

Respect the run's **Max total charge**. The Actor uses `ChargingManager.calculateMaxEventChargeCountWithinLimit` and stops cleanly when the budget is exhausted.

### Limitations

- Only stores that still expose `/products.json` (or the collection equivalent) can be read. A 403/404 or an HTML response is treated as “not available,” not retried with a proxy.
- Currency is not present in the public products JSON, so it is not invented in the output.
- Availability is the public `available` flag, not a warehouse quantity.
- Very large catalogs should set `maxProducts` (default 250 per store) so a first test cannot walk an unbounded catalog.

### Development

```bash
npm install
npm test
npm run build
```

Local run (no platform charges):

```bash
npx apify run -p
```

# Actor input Schema

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

One store per line. Use the store homepage (https://allbirds.com) or a collection URL (https://allbirds.com/collections/mens). A collection path is used as a filter for that store. If the www host blocks /products.json, the Actor tries the apex host once (and the other way around).

## `collectionHandles` (type: `array`):

Optional collection handles (for example mens or shoes) applied to store URLs that do not already include /collections/<handle>. Each handle is fetched from /collections/<handle>/products.json. Leave empty to pull the full catalog from /products.json.

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

Maximum number of products (not variants) to read from each store or collection. Pagination uses 250 products per page. Keep this modest when testing.

## `mode` (type: `string`):

Catalog emits every variant in the current catalog. Changes compares the current catalog to a snapshot in a named key-value store and emits only new, removed, price, and stock diffs. The first changes run saves a baseline (every current item is tagged new).

## `snapshotStoreName` (type: `string`):

Named key-value store used in changes mode to remember the previous catalog. Reuse the same name on a schedule so diffs accumulate. Ignored in catalog mode.

## `snapshotKeyPrefix` (type: `string`):

Optional prefix if you want several monitors to share the same named store without overwriting each other.

## `requestDelayMs` (type: `integer`):

Minimum wait between HTTP requests, to stay polite to the storefront. Default 500 ms.

## `maxRequestConcurrency` (type: `integer`):

How many catalog requests to send in parallel. Keep this at 1 unless you have a good reason not to.

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

Per-request timeout when calling a storefront JSON endpoint.

## Actor input object example

```json
{
  "storeUrls": [
    "https://allbirds.com"
  ],
  "maxProducts": 50,
  "mode": "catalog",
  "snapshotStoreName": "shopify-catalog-monitor-snapshots",
  "requestDelayMs": 500,
  "maxRequestConcurrency": 1,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

Normalized variant rows. In changes mode, changeType is new, removed, price, stock, or price_and_stock.

## `summary` (type: `string`):

JSON summary with product and variant counts, change counts, skipped stores, and charge limits.

# 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://allbirds.com"
    ],
    "maxProducts": 50,
    "mode": "catalog",
    "snapshotStoreName": "shopify-catalog-monitor-snapshots"
};

// Run the Actor and wait for it to finish
const run = await client.actor("agentutils/shopify-catalog-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://allbirds.com"],
    "maxProducts": 50,
    "mode": "catalog",
    "snapshotStoreName": "shopify-catalog-monitor-snapshots",
}

# Run the Actor and wait for it to finish
run = client.actor("agentutils/shopify-catalog-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://allbirds.com"
  ],
  "maxProducts": 50,
  "mode": "catalog",
  "snapshotStoreName": "shopify-catalog-monitor-snapshots"
}' |
apify call agentutils/shopify-catalog-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agentutils/shopify-catalog-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/iUyN97VWgaoaVurxj/builds/ruIPYJdqa4NuTODAL/openapi.json
