# Shopify New Product & Catalog Change Monitor (`afkdigital/shopify-new-product-catalog-change-monitor`) Actor

Compare authorized dated catalog exports for new products, variant, price and visible availability changes. Export-only v1; conservative coverage and currency guards.

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

## Pricing

$2.00 / 1,000 product observations

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

Compare dated **authorized customer-provided JSON or CSV catalog exports** to monitor new products, products missing from complete catalogs, variant additions/removals, prices, titles, and publicly exposed availability.

**Version 1.0.0 is export-only.** Live store crawling through `storeUrls` is unavailable and a nonempty value fails explicitly. No store pages, products.json endpoint, customer/order data, login, proxy, CAPTCHA, or access restriction bypass are requested. This is a comparison tool for your own or otherwise lawfully provided catalog data. Shopify is a compatibility reference; this Actor is independent of Shopify.

### Try the clearly labeled demo

The prefilled input is a **fictional two-product catalog** at the reserved example domain demo-catalog.example. It requires no Shopify credentials, makes no store requests, and should finish in well under five minutes. Keep `demo=true` for fictional data. The first run emits `baseline` rows and saves a snapshot; it does **not** call existing products newly added.

Use `examples/baseline.json`, then `examples/comparison.json` to see a product price drop, variant price change, variant availability change, and added variant. These are synthetic examples, not verified merchant activity.

### Input

| Field | Meaning |
|---|---|
| currentCatalogFile | Required JSON/CSV envelope or authenticated Apify KVS reference |
| previousSnapshotFile | Optional previous JSON/CSV envelope or KVS reference |
| previousSnapshotKey | Alternative previous snapshot reference, STORE_ID/RECORD_KEY |
| storeUrls | Reserved; live access unavailable in v1 |
| catalogStores | Select all referenced KVS IDs to grant read-only resource access under limited permissions |
| maxProducts | 1–5000 current product observations across all catalogs; default 100 |
| currencyContext | Optional fallback object with currency and market; per-catalog context wins |
| includeVariants | Default true; up to 100 variants per product |
| maxResults | 1–100000 flat Dataset rows; default 20000 |
| demo | Marks every row as fictional; false for actual authorized exports |

Do not supply both previous snapshot inputs. A missing/inaccessible previous record is an error, never a silent baseline reset.

#### JSON catalog envelope

```json
{
  "currentCatalogFile": {
    "catalogs": [{
      "storeDomain": "your-store.example",
      "scopeKey": "online-us-all-products",
      "observedAt": "2026-11-19T12:00:00Z",
      "complete": true,
      "scanSucceeded": true,
      "variantsComplete": true,
      "currencyContext": {"currency": "USD", "market": "US"},
      "sourceUrl": "https://your-store.example/authorized-export.json",
      "products": [{
        "id": "p100",
        "title": "Linen Shirt",
        "handle": "linen-shirt",
        "price": "39.00",
        "available": true,
        "variants": [{"id": "v100-s", "title": "Small", "price": "39.00", "available": true}]
      }]
    }]
  },
  "includeVariants": true,
  "maxProducts": 100,
  "demo": false
}
```

Stable IDs and nonempty product titles are required. Dates must include timezone and must not be future dates. `observedAt` is the date of the supplied observation, not upload time or product creation time. The current catalog must be later than its corresponding previous catalog. Omit unknown price/availability values; unknown is not zero or false. Prices are decimal major currency units, not cents. Translate source-specific money representations before import.

`scopeKey` identifies the exact catalog/channel/filter being compared. Change it when selection changes. Cross-scope catalogs establish separate baselines. Both currency and market must be present and exactly match before prices are compared. No exchange-rate conversion is performed.

#### CSV catalog envelope

Set `currentCatalogFile` to:

```json
{
  "format": "csv",
  "metadata": {
    "storeDomain": "your-store.example",
    "scopeKey": "online-us-all-products",
    "observedAt": "2026-11-19T12:00:00Z",
    "complete": true,
    "scanSucceeded": true,
    "variantsComplete": true,
    "currencyContext": {"currency": "USD", "market": "US"}
  },
  "csv": "productId,title,price,available,variantId,variantTitle,variantPrice,variantAvailable\np100,Linen Shirt,39.00,true,v100-s,Small,39.00,true"
}
```

One row per variant; repeat consistent product-level values. A product without variants has an empty variantId. Optional product columns: handle and productUrl. Boolean values are lowercase true/false or empty. Use properly quoted RFC-style CSV for titles with commas. Raw Shopify Admin CSV column names are not automatically mapped; transform them to this documented contract.

#### Files stored in Apify

Upload a JSON envelope to your own Apify Key-value store and use:

```json
{"currentCatalogFile":{"keyValueStoreId":"YOUR_STORE_ID","recordKey":"CURRENT"},"catalogStores":["YOUR_STORE_ID"]}
```

Select every current/previous KVS in catalogStores, including the store part of previousSnapshotKey. The resource picker declares READ permission only; this Actor remains limited-permission. The KVS record must contain a JSON object, including a CSV envelope when importing CSV. External file URLs and server filesystem paths are intentionally unsupported. This prevents untrusted network fetching and keeps authentication in the Apify run context. Never put secrets in sourceUrl or productUrl.

### Comparison and coverage rules

- First observation: baseline, preserving `firstObservedAt` separately from any source creation date. Product created_at is not interpreted as a monitoring date.
- Existing product: compare known price, known availability, title and supported variant fields. Decimal-equivalent values such as 39 and 39.00 do not create false changes.
- New ID: `product_added` only after a complete previous catalog; otherwise `first_observed`.
- Missing product: `product_removed` only when both matching catalogs explicitly declare `complete=true`, `scanSucceeded=true`, and have no errors. This means absence from that export scope, not guaranteed product deletion.
- Failed/partial exports, reached product limits, and unknown completeness suppress removals. Unseen prior products are carried forward with their original observation dates; dates are not rewritten.
- Variant removal also requires complete variant coverage on both sides and a complete current product catalog. Variant truncation is flagged.
- Disabling variant processing does not create variant changes.
- Unknown currency, changed market or changed currency suppresses all product and variant price comparisons.
- available is only exposed boolean availability. No precise inventory count, units sold, sales, revenue, or order estimates are derived.

The upstream exporter must follow every page/cursor and verify success before asserting completeness. This Actor cannot independently prove the truth of customer-supplied completeness claims. It does not fetch additional pages. For uncertain pages, blocked access, timeouts or non-atomic collections, set complete=false. Shopify's APIs can expose different catalog scopes, markets, channels and variant limits; label these in scopeKey and metadata.

### Output

Flat default Dataset rows include:

storeDomain, productId, variantId, title, productUrl, changeType, previousValue, currentValue, currency, firstObservedAt, previousObservedAt, observedAt, sourceUrl, limitations.

Additional provenance: scopeKey, currencyContext, demo, observationKey and rowKey.

Change types: baseline, unchanged, first_observed, product_added, product_removed, title_changed, price_changed, availability_changed, variant_added, variant_removed, variant_title_changed, variant_price_changed, variant_availability_changed, catalog_status.

Baseline and unchanged rows make paid product observations visible even without change alerts. Filter these plus catalog_status out when delivering change notifications. Multiple changes in one product create multiple output rows while remaining **one product observation** for pricing. Catalog status rows have null productId.

### Snapshots, retention and repeated runs

Every successful run saves a normalized `SNAPSHOT` and a `SUMMARY` in its **own default KVS**, never a shared mutable global store. SUMMARY provides `previousSnapshotKeyForNextRun`; pass it to the next run. Snapshots from separate runs cannot overwrite each other. Keep separate chains for each scope. Concurrent runs against the same previous key create independent branches; choose a single successful successor.

The Actor does not schedule itself, choose the previous run automatically, keep a central catalog database, or delete user stores. Apify account retention applies. Export or preserve needed snapshots before run storage expires; storage access/deletion remains under the customer's account. No automatic TTL guarantee is made. A missing previous snapshot fails explicitly. Budget-limited or failed runs never promote a new snapshot.

Failed scans and unknown variant coverage are preserved conservatively; a second complete observation can be needed before removals become eligible again.

### Limits and timeouts

- Up to 10 catalog scopes; 10 MiB JSON-encoded input envelope per file and normalized snapshot. Oversized normalized snapshots fail before billing.
- Up to 5000 current products and 100 variants per product.
- maxProducts truncation marks a catalog partial. Variant truncation suppresses variant removals.
- maxResults overflow fails **before** billing or writing results; increase it or split catalog scope.
- Runtime processing timeout: 210 seconds; default Apify run limit: 240 seconds, 256 MiB.
- KVS access timeout: 30 seconds baseline with one client retry; no storefront networking, pagination requests or proxy cost.
- Same-run restart deduplicates Dataset row keys and durable billing receipts. An interruption during the charge/receipt boundary stops for reconciliation instead of attempting a potentially duplicate charge. SDK billing retries also use product-scoped idempotency keys. Do not blindly resurrect that ambiguous billing state.

### Pay-Per-Event pricing

**$0.002 per product observation ($2 / 1000), platform usage included.** One observation is one normalized current storeDomain/scopeKey/productId at one dated export in one run, including up to 100 exposed variants and all changes for that product.

Baseline and unchanged product observations count. Multiple variant/price/availability changes do not multiply the charge. Absent products and status rows are not charged. Separate runs are separate observations. Start fee: zero. Dataset row fee: zero. Small batches of at least 10 products are recommended because cloud startup and storage costs have a fixed component.

The code uses the custom `product-observation` event with exactly one count per product, submitted in batches of at most 50 products. Per-row Dataset fees must remain disabled. It stops before starting another charged product when the budget cannot cover the next bounded batch. Reduce maxProducts or increase the budget to cover the whole requested input. The owner approved this pricing on November 19, 2026. The custom product-observation event is configured; the live Store pricing section is authoritative. Development runs made before PPE activation measured infrastructure costs only.

### n8n and Make

See docs/integrations.md and examples/n8n-workflow.json for the authenticated upload → run → success check → export → preserve next snapshot key pattern. Use the Apify credential manager or secret storage; never embed tokens into exported workflows.

### Rights and source policy review

Reviewed on 2026-11-19:

- https://www.shopify.com/legal/api-terms (page says updated October 7, 2026)
- https://help.shopify.com/en/manual/promoting-marketing/seo/editing-robots-txt
- https://shopify.dev/docs/api/ajax/reference/product
- https://shopify.dev/docs/api/ajax

Shopify API access, systematic collection and merchant data use are subject to platform and merchant terms; public visibility and robots permission are not a blanket license. v1 deliberately performs no Shopify access and accepts only data the customer has the right to process. Users remain responsible for permissions governing their exports and service-provider processing. No customer PII, orders, complete descriptions, images, credentials or copyrighted catalog archives are needed. This product is an operational change report, not a resale feed of third-party catalogs.

### Development

Python 3.12+.
`pip install -r requirements.txt`
`python -m unittest discover -s tests -v`

The Docker build copies only runtime source and pinned dependencies. Operator authorization, evidence, test tools and credentials are excluded from deployment.

# Actor input Schema

## `currentCatalogFile` (type: `object`):

JSON envelope, CSV envelope, or Apify KVS reference. v1 does not crawl stores.

## `previousSnapshotFile` (type: `object`):

Optional previous JSON/CSV envelope or KVS reference; omitted on baseline run.

## `previousSnapshotKey` (type: `string`):

Optional STORE_ID/RECORD_KEY, e.g. the SUMMARY previousSnapshotKeyForNextRun value. Missing keys fail; no silent reset.

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

Live crawling is unavailable in v1. Nonempty values fail before any store request.

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

Global across catalogs; exceeding this cap marks coverage partial and suppresses removals.

## `maxResults` (type: `integer`):

Fail before writing or charging if the comparison exceeds this limit.

## `currencyContext` (type: `object`):

Example: currency USD, market US. Per-catalog values take precedence. Missing/different context suppresses price comparisons.

## `includeVariants` (type: `boolean`):

Up to 100 variants per product; incomplete coverage suppresses variant removals.

## `demo` (type: `boolean`):

Keep true for the prefilled fictional example. Set false for your authorized real exports.

## `catalogStores` (type: `array`):

For KVS references and previousSnapshotKey, select every referenced KVS here. Read-only access; no account-wide permissions requested.

## Actor input object example

```json
{
  "currentCatalogFile": {
    "catalogs": [
      {
        "storeDomain": "demo-catalog.example",
        "scopeKey": "all-online-products",
        "observedAt": "2026-11-18T12:00:00Z",
        "complete": true,
        "scanSucceeded": true,
        "variantsComplete": true,
        "currencyContext": {
          "currency": "USD",
          "market": "US"
        },
        "sourceUrl": "https://demo-catalog.example/authorized-export.json",
        "products": [
          {
            "id": "p100",
            "title": "Demo Linen Shirt",
            "handle": "linen-shirt",
            "price": "39.00",
            "available": true,
            "variants": [
              {
                "id": "v100-s",
                "title": "Small",
                "price": "39.00",
                "available": true
              },
              {
                "id": "v100-m",
                "title": "Medium",
                "price": "39.00",
                "available": false
              }
            ]
          },
          {
            "id": "p200",
            "title": "Demo Canvas Bag",
            "handle": "canvas-bag",
            "price": "24.00",
            "available": true,
            "variants": []
          }
        ]
      }
    ]
  },
  "storeUrls": [],
  "maxProducts": 100,
  "maxResults": 20000,
  "includeVariants": true,
  "demo": true
}
```

# Actor output Schema

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

No description

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

No description

## `snapshot` (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 = {
    "currentCatalogFile": {
        "catalogs": [
            {
                "storeDomain": "demo-catalog.example",
                "scopeKey": "all-online-products",
                "observedAt": "2026-11-18T12:00:00Z",
                "complete": true,
                "scanSucceeded": true,
                "variantsComplete": true,
                "currencyContext": {
                    "currency": "USD",
                    "market": "US"
                },
                "sourceUrl": "https://demo-catalog.example/authorized-export.json",
                "products": [
                    {
                        "id": "p100",
                        "title": "Demo Linen Shirt",
                        "handle": "linen-shirt",
                        "price": "39.00",
                        "available": true,
                        "variants": [
                            {
                                "id": "v100-s",
                                "title": "Small",
                                "price": "39.00",
                                "available": true
                            },
                            {
                                "id": "v100-m",
                                "title": "Medium",
                                "price": "39.00",
                                "available": false
                            }
                        ]
                    },
                    {
                        "id": "p200",
                        "title": "Demo Canvas Bag",
                        "handle": "canvas-bag",
                        "price": "24.00",
                        "available": true,
                        "variants": []
                    }
                ]
            }
        ]
    },
    "demo": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/shopify-new-product-catalog-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 = {
    "currentCatalogFile": { "catalogs": [{
                "storeDomain": "demo-catalog.example",
                "scopeKey": "all-online-products",
                "observedAt": "2026-11-18T12:00:00Z",
                "complete": True,
                "scanSucceeded": True,
                "variantsComplete": True,
                "currencyContext": {
                    "currency": "USD",
                    "market": "US",
                },
                "sourceUrl": "https://demo-catalog.example/authorized-export.json",
                "products": [
                    {
                        "id": "p100",
                        "title": "Demo Linen Shirt",
                        "handle": "linen-shirt",
                        "price": "39.00",
                        "available": True,
                        "variants": [
                            {
                                "id": "v100-s",
                                "title": "Small",
                                "price": "39.00",
                                "available": True,
                            },
                            {
                                "id": "v100-m",
                                "title": "Medium",
                                "price": "39.00",
                                "available": False,
                            },
                        ],
                    },
                    {
                        "id": "p200",
                        "title": "Demo Canvas Bag",
                        "handle": "canvas-bag",
                        "price": "24.00",
                        "available": True,
                        "variants": [],
                    },
                ],
            }] },
    "demo": True,
}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/shopify-new-product-catalog-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 '{
  "currentCatalogFile": {
    "catalogs": [
      {
        "storeDomain": "demo-catalog.example",
        "scopeKey": "all-online-products",
        "observedAt": "2026-11-18T12:00:00Z",
        "complete": true,
        "scanSucceeded": true,
        "variantsComplete": true,
        "currencyContext": {
          "currency": "USD",
          "market": "US"
        },
        "sourceUrl": "https://demo-catalog.example/authorized-export.json",
        "products": [
          {
            "id": "p100",
            "title": "Demo Linen Shirt",
            "handle": "linen-shirt",
            "price": "39.00",
            "available": true,
            "variants": [
              {
                "id": "v100-s",
                "title": "Small",
                "price": "39.00",
                "available": true
              },
              {
                "id": "v100-m",
                "title": "Medium",
                "price": "39.00",
                "available": false
              }
            ]
          },
          {
            "id": "p200",
            "title": "Demo Canvas Bag",
            "handle": "canvas-bag",
            "price": "24.00",
            "available": true,
            "variants": []
          }
        ]
      }
    ]
  },
  "demo": true
}' |
apify call afkdigital/shopify-new-product-catalog-change-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/shopify-new-product-catalog-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/MM1a5T85QD6AELWhD/builds/9qacYbZk3XhmXXTdq/openapi.json
