# Shopify Product Catalog & Price Change Monitor (`lumispring/shopify-product-catalog`) Actor

Fetch any public Shopify storefront catalog with variant prices and availability, then diff new products, price up/down, and OOS against the last snapshot. Official products.json only. No login, no leads, no Admin API. Schedule separately.

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

## Pricing

from $0.85 / 1,000 product scrapeds

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

Fetch the **public storefront catalog** of one or more Shopify shops (`/products.json`) and write a structured, **variant-level** product Dataset. Optional incremental mode compares the catalog with the last snapshot and emits compact change rows for:

- new products
- removed products
- price up / price down (per variant)
- out of stock / restocked (per variant, from the public `available` flag)
- new or removed variants

This Actor is **not** a generic HTML crawler and **not** a lead scraper. It does not use the Shopify Admin API, does not log in, and does not collect customer, order, email, or phone data.

### What it does

- Accepts storefront base URLs or `*.myshopify.com` domains (custom domains work if they expose the same public `/products.json` endpoint).
- Paginates `/products.json?limit=250&page=N` until a short or empty page, or a safety cap.
- Writes **one Dataset row per product**, including every variant's id, title, SKU, price, compare-at price, and availability.
- Stores a compact snapshot in the named Key-Value Store `shopify-catalog-snapshots`.
- When incremental mode is on and a previous snapshot exists, writes compact change rows to the named Dataset `catalog-changes`.
- Continues with remaining shops if one store is blocked, missing, or not a Shopify catalog.
- Checks `robots.txt` and skips a shop if `/products.json` is disallowed.

### What it does not do

- No Shopify Admin API, private apps, or access tokens
- No customer / order data, email, phone, or lead scraping
- No review scraping
- No collection, keyword, or product-page enrichment (no barcodes, videos, metafields, or “real inventory” from other endpoints)
- No login, no AI, no built-in Slack / email / webhook alerts
- No Playwright or antibot bypass. Paid proxy is **off** by default and not required for typical public catalogs
- Scheduling is your job: create an **Apify Schedule** to re-run the Actor

### Inventory limitation (important)

The public storefront catalog (`/products.json`) almost always **omits** `inventory_quantity`. In live checks on 2026-11-13 it was absent on Allbirds, official Shopify theme demos (Dawn, Refresh, Craft, Sense), Death Wish Coffee, and ColourPop. Those catalogs **do** expose a per-variant boolean `available`.

This Actor will:

- always map `available` when the JSON includes it
- pass through `inventoryQuantity` **only if** a store actually includes `inventory_quantity`
- set `inventoryQuantityPresent` to `false` otherwise — it will **not** invent a count

Currency codes are also not present on `/products.json`; prices are left as the storefront's price strings (for example `"120.00"`).

### Input

| Field                          | Default                     | Meaning                                                                            |
| ------------------------------ | --------------------------- | ---------------------------------------------------------------------------------- |
| `storeUrls`                    | (required)                  | Storefront URLs or domains. Paths are ignored.                                     |
| `enableIncremental`            | `true`                      | Compare against the last snapshot. The first run is a baseline (no change events). |
| `includeBodyHtml`              | `false`                     | Include public `body_html` on product rows.                                        |
| `maxProductsPerStore`          | `10000`                     | Safety cap per shop.                                                               |
| `requestDelayMs`               | `400`                       | Delay between page requests for the same shop.                                     |
| `maxConcurrency`               | `1`                         | How many shops to fetch in parallel (pages stay sequential).                       |
| `useApifyProxy`                | `false`                     | Leave off unless a shop blocks datacenter IPs (uses proxy credits).                |
| `suggestedPollIntervalMinutes` | `1440`                      | Documentation only; use an Apify Schedule.                                         |
| `snapshotKvStoreName`          | `shopify-catalog-snapshots` | Named KV store for snapshots.                                                      |

#### Example input

```json
{
    "storeUrls": [
        { "url": "https://theme-dawn-demo.myshopify.com" },
        { "url": "https://theme-refresh-demo.myshopify.com" }
    ],
    "enableIncremental": true,
    "includeBodyHtml": false,
    "maxProductsPerStore": 10000,
    "requestDelayMs": 400,
    "maxConcurrency": 1,
    "useApifyProxy": false,
    "suggestedPollIntervalMinutes": 1440
}
```

### Output

#### Default Dataset (full catalog)

One row per product (`itemType: "product"`), including a `variants[]` array and:

| Field                                                           | Description                                                                                |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `storeUrl` / `storeDomain`                                      | Normalized storefront origin                                                               |
| `id`, `title`, `handle`, `url`, `vendor`, `productType`, `tags` | Product identity                                                                           |
| `publishedAt`, `createdAt`, `updatedAt`                         | Public timestamps when present                                                             |
| `images`                                                        | `{ url }` only                                                                             |
| `options`                                                       | Option names and values                                                                    |
| `variants`                                                      | `id`, `title`, `sku`, `price`, `compareAtPrice`, `available`, optional `inventoryQuantity` |
| `available`, `priceMin`, `priceMax`                             | Roll-ups from variants                                                                     |
| `inventoryQuantityPresent`                                      | Whether any variant actually included a quantity                                           |
| `changeTypes`, `hasChanges`, `isBaseline`                       | Incremental flags for this product                                                         |

#### Named Dataset `catalog-changes`

One compact row per atomic change (`itemType: "change"`). `changeType` is one of: `new`, `removed`, `price_up`, `price_down`, `oos`, `restocked`, `new_variant`, `removed_variant`.

Filter this Dataset (or default rows where `hasChanges === true`) on scheduled runs.

The first run for a shop writes a baseline snapshot only. It does **not** mark every product as `new` and does **not** charge change events.

#### Named Dataset `shop-summaries`

Per-shop status (`ok`, `blocked`, `not_found`, `not_shopify`, `robots_disallowed`, `empty`, `error`), product/variant counts, and change counts. A blocked shop does not fail the whole run if another shop succeeded.

#### Snapshots

- Store: `shopify-catalog-snapshots`
- Key: `SNAPSHOT-<sha256(origin) first 32 hex chars>`
- Value: compact product/variant prices and availability for the next diff

### Pricing (Pay Per Event)

Intended Console monetization (must be set manually under Publishing → Monetization; this file does not publish or bill anyone by itself):

| Event               | Intended price                    | When it fires                                                   |
| ------------------- | --------------------------------- | --------------------------------------------------------------- |
| `product-scraped`   | $0.00085 ($0.85 / 1,000 products) | After a product row is successfully written                     |
| `change-detected`   | $0.0015                           | After a compact change row is written (not on the baseline run) |
| `apify-actor-start` | $0.00005                          | Platform synthetic start event (keep)                           |

Failed shop fetches are **not** billed as product or change events. Platform usage is intended to stay on the creator (`isPPEPlatformUsagePaidByUser: false`). Creator profit is approximately `(0.8 × revenue) − compute`, and **only paid-plan users generate revenue**. Default memory is 512 MB so compute stays low.

This is cheaper than inventing “real inventory” enrichment and sits in the mid range of close catalog Actors observed on 2026-11-13 (see the Store listing draft). It is **not** a revenue forecast.

### How to use

1. Add one or more public Shopify storefront URLs.
2. Run once to build a baseline catalog and snapshot.
3. Create an Apify Schedule (for example daily) with the same input.
4. Read `catalog-changes` or filter `hasChanges === true`.

### Legal and fair use

- Only use this on public storefront catalogs you are allowed to access. Respect `robots.txt` and the shop's terms, plus [Shopify's terms](https://www.shopify.com/legal/terms) and the [Apify Acceptable Use Policy](https://apify.com/acceptable-use).
- Some shops (or their CDN) block `/products.json` (for example a CloudFront 403). The Actor records that shop as `blocked` and continues.
- Do not use this Actor to collect personal data or to bypass access controls.

### Development

```bash
npm install
npm test
npm run start:dev
```

Local runs use `storage/` (see `SAMPLE_INPUT.json`). Do not run paid cloud computes just to smoke-test.

### License

ISC

# Actor input Schema

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

Public Shopify storefront base URLs or \*.myshopify.com domains. Paths are ignored; the Actor requests {origin}/products.json. Custom domains work if they expose the same public catalog endpoint. No Admin API or login.

## `enableIncremental` (type: `boolean`):

Compare this run with the last snapshot in the Key-Value Store and write compact change rows (new, removed, price up/down, OOS/restock, new/removed variant). The first run only writes a baseline snapshot and does not emit or charge change events. The full catalog is still written to the default Dataset.

## `includeBodyHtml` (type: `boolean`):

If enabled, include the public body_html field on each product row. Default off to keep Dataset rows smaller.

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

Safety cap per store. Public products.json is paginated at 250 products per page until a short or empty page, this cap, or max pages.

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

Modest delay between /products.json page requests for the same store. Be polite; do not lower this aggressively.

## `maxConcurrency` (type: `integer`):

How many stores to fetch in parallel. Pages within a store are always sequential. Keep low to avoid rate limits; no paid proxy is used by default.

## `useApifyProxy` (type: `boolean`):

Default off. Public /products.json usually works without a proxy. Enabling this may consume proxy credits. Leave off unless a store blocks your datacenter IP.

## `suggestedPollIntervalMinutes` (type: `integer`):

Documentation only. The Actor itself runs once per invocation. Use an Apify Schedule to re-run for incremental diffs.

## `snapshotKvStoreName` (type: `string`):

Named KV store used for per-shop catalog snapshots. Change this only if you need isolated snapshot histories.

## Actor input object example

```json
{
  "storeUrls": [
    {
      "url": "https://theme-dawn-demo.myshopify.com"
    },
    {
      "url": "https://theme-refresh-demo.myshopify.com"
    }
  ],
  "enableIncremental": true,
  "includeBodyHtml": false,
  "maxProductsPerStore": 10000,
  "requestDelayMs": 400,
  "maxConcurrency": 1,
  "useApifyProxy": false,
  "suggestedPollIntervalMinutes": 1440,
  "snapshotKvStoreName": "shopify-catalog-snapshots"
}
```

# Actor output Schema

## `catalog` (type: `string`):

No description

## `snapshots` (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": [
        {
            "url": "https://theme-dawn-demo.myshopify.com"
        },
        {
            "url": "https://theme-refresh-demo.myshopify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lumispring/shopify-product-catalog").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": [
        { "url": "https://theme-dawn-demo.myshopify.com" },
        { "url": "https://theme-refresh-demo.myshopify.com" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lumispring/shopify-product-catalog").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": [
    {
      "url": "https://theme-dawn-demo.myshopify.com"
    },
    {
      "url": "https://theme-refresh-demo.myshopify.com"
    }
  ]
}' |
apify call lumispring/shopify-product-catalog --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lumispring/shopify-product-catalog"
        }
    }
}
```

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/mHDul2qeRYTPYUEWb/builds/0GtN3QeT7rUP2E1hy/openapi.json
