# Shopify Price and Stock Monitor (`kmswiill/shopify-price-stock-monitor`) Actor

Reads the public product feed of any Shopify store and tells you what changed since your last run: new products, price changes, stock changes and removed products. One row per variant.

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

## Pricing

from $0.43 / 1,000 product variant rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Price and Stock Monitor

Watch any Shopify store and get **only what changed since your last run**: new products, price changes, stock
changes and products that left the catalog. One row per variant, with the previous price next to the current one.

The Actor reads the public product feed that Shopify stores publish (`/products.json`). There is no browser, no
login and no proxy involved, so runs are fast and cheap. It checks each store's `robots.txt` first and skips stores
that do not allow the feed to be read.

### What you can do with it

- Track competitor prices and discounts every day without reading the whole catalog yourself.
- Get an alert feed when a product comes back in stock or sells out.
- Spot new launches and discontinued products as they happen.
- Export a full, clean catalog of a store, with variants, prices, SKUs and images.

### Input

| Field | What it does |
|---|---|
| Shopify stores | One store per line. Any address of the store works, only the domain is used. |
| Only changes | Returns only new, changed and removed variants since your previous run. |
| Product title keywords | Keeps only products whose title contains at least one of the words or phrases. |
| Include product description | Adds the description as plain text to every row. |
| Maximum products per store | Upper limit of products read from each store. |

Example:

```json
{
    "stores": ["https://www.allbirds.com", "deathwishcoffee.com"],
    "onlyChanges": true,
    "titleKeywords": ["runner", "coffee"]
}
```

### Output

One row per variant:

```json
{
    "store": "www.deathwishcoffee.com",
    "storeName": "Death Wish Coffee",
    "currency": "USD",
    "productId": "9876543210",
    "productTitle": "Valhalla Java Single-Serve Pods",
    "productHandle": "valhalla-java-single-serve-pods",
    "productType": "Coffee",
    "vendor": "Death Wish Coffee",
    "tags": ["pods"],
    "variantId": "392715452",
    "variantTitle": "10 count",
    "sku": "VJ-10",
    "options": { "Size": "10 count" },
    "price": 14.99,
    "compareAtPrice": 19.99,
    "onSale": true,
    "discountPercent": 25,
    "available": true,
    "url": "https://www.deathwishcoffee.com/products/valhalla-java-single-serve-pods?variant=392715452",
    "imageUrl": "https://cdn.shopify.com/...",
    "publishedAt": "2024-03-01T15:00:00.000Z",
    "updatedAt": "2026-11-20T09:30:00.000Z",
    "change": "price",
    "previousPrice": 19.99,
    "previousAvailable": true,
    "scrapedAt": "2026-11-22T02:10:00.000Z"
}
```

The `change` field tells you what happened to the variant since your previous run:

| Value | Meaning |
|---|---|
| `new` | The variant was not in the store before. |
| `price` | The price changed. `previousPrice` holds the old one. |
| `availability` | The variant went in or out of stock. `previousAvailable` holds the old state. |
| `price+availability` | Both changed. |
| `removed` | The variant is no longer in the store. Only the handle, the link and the last known price are filled in. |
| `null` | Nothing changed. |

A summary of the run is saved in the key-value store under `SUMMARY`, with the number of products, variants and
changes for each store, and the reason for any store that was skipped or failed.

### How change detection works

The Actor remembers the last price and stock state of every variant, per store, in a named key-value store in your
account (`shopify-price-stock-monitor-state`). On the next run it compares the store with that memory.

- The first run for a store reports every variant as `new`, because nothing has been seen yet.
- `change` is filled in on every run, even when "Only changes" is off. Changed rows come first.
- A change that was not delivered because your spending limit was reached is reported again on the next run.
- `removed` is reported only when the whole catalog was read. If the store has more products than "Maximum products
  per store", raise the limit to get removals.

Schedule the Actor to run every hour or every day and connect the dataset to your alerts or your spreadsheet.

### Pricing

You pay per row delivered to the dataset. With "Only changes" on, quiet days cost almost nothing, because unchanged
variants are not delivered. Set a maximum cost per run in the run options and the Actor stops delivering when that
limit is reached.

### Notes and limits

- The store must be a Shopify store with its public product feed enabled. Stores that turned the feed off, or that
  are password protected, are reported as failed in `SUMMARY`.
- `available` is the in stock flag published by the store. Shopify does not publish stock quantities in this feed.
- Prices are in the store's default currency, shown in `currency`.
- A store that disallows the feed in `robots.txt` is skipped and listed in `SUMMARY`.
- This Actor is an independent tool. It is not affiliated with, sponsored by or endorsed by Shopify.

### FAQ

**Where does the data come from?**
From the product feed that every Shopify store publishes by default at `/products.json`, the same data that powers
the store pages.

**How do I know if a site is a Shopify store?**
Open `https://<the store address>/products.json` in your browser. If you see a list of products, it works.

**Can I monitor many stores in one run?**
Yes. Stores are processed in parallel and each one is isolated, so a failing store does not affect the rest.

**I need another field or another platform.**
Open an issue on the Issues tab and it will be considered for the next version.

# Actor input Schema

## `stores` (type: `array`):

One store per line. Paste the store address, for example https://www.allbirds.com or allbirds.com. Any page of the store works, the Actor only uses the domain.

## `onlyChanges` (type: `boolean`):

Return only what changed since your previous run: new products, price changes, stock changes and removed products. The first run for a store returns the whole catalog, because nothing has been seen yet.

## `titleKeywords` (type: `array`):

Keep only products whose title contains at least one of these words or phrases. Not case sensitive. Leave empty to keep every product.

## `includeDescription` (type: `boolean`):

Add the product description as plain text to every row.

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

Upper limit of products read from each store. When a store has more products than this limit, removed products are not reported for it, because the catalog was not read in full.

## Actor input object example

```json
{
  "stores": [
    "https://www.allbirds.com"
  ],
  "onlyChanges": false,
  "includeDescription": false,
  "maxProductsPerStore": 5000
}
```

# Actor output Schema

## `variants` (type: `string`):

One item per product variant, with the current price and stock state and what changed since the previous run.

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

For each store: products, variants and changes found, plus stores that were skipped or failed and the reason.

# 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 = {
    "stores": [
        "https://www.allbirds.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kmswiill/shopify-price-stock-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 = { "stores": ["https://www.allbirds.com"] }

# Run the Actor and wait for it to finish
run = client.actor("kmswiill/shopify-price-stock-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 '{
  "stores": [
    "https://www.allbirds.com"
  ]
}' |
apify call kmswiill/shopify-price-stock-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kmswiill/shopify-price-stock-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/zOW1aCy92QhFQ1TzN/builds/qaVOgJaYffIDiPL8s/openapi.json
