# Shopify Price & Stock Monitor (`robustish_ametrine/shopify-price-monitor`) Actor

Paste Shopify store links. Get every product and variant with price and stock, plus alerts for price changes, sell-outs, restocks and new or removed products since your last run.

- **URL**: https://apify.com/robustish_ametrine/shopify-price-monitor.md
- **Developed by:** [Mike Miller](https://apify.com/robustish_ametrine) (community)
- **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/actors/running/actors-in-store.md#pay-per-usage

## 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 & Stock Monitor

Paste the Shopify stores you watch (competitors, suppliers, brands you resell). You get every product and size/colour with its price and stock, and on later runs, **alerts**: price down, price up, back in stock, sold out, new product, removed product.

### Who it is for

- Store owners watching competitor prices.
- Resellers and deal hunters waiting for drops and restocks.
- Brands checking how retailers price their products.

### What you put in

| Field | Example |
|---|---|
| Stores | `allbirds.com`, `https://shop.example.com/collections/sale` |
| Only changes | on = alert feed; off = full catalog |
| Keywords / Brands / On sale / In stock | optional filters |

### What you get (one row per variant)

`change` and `changes`, `store`, `product`, `variant`, `vendor`, `productType`, `tags`, `sku`, `price`, `previousPrice`, `priceChangePct`, `compareAtPrice`, `onSale`, `available`, `url`, `imageUrl`, `publishedAt`, `updatedAt`, `firstSeenAt`, `removedAt`, `scrapedAt`.

### Honest limits

- Works only on **Shopify** stores that keep their public product feed (`/products.json`) on. Some stores turn it off; those are reported and skipped.
- Prices are the store's default currency. We don't see discount codes, cart-level promotions, or exact stock counts (only in stock / sold out).
- The **first run is a baseline**. Alerts start from the second run, so schedule it (daily is typical).
- If a store fails, or you capped "max products" below its catalog size, we skip "removed" alerts that run, so you never get false removals.
- No product descriptions are included. They are the store's own copyrighted writing.

### How it behaves

- Reads only the public feed. No logins, no password-protected stores, no getting around blocks.
- Follows each store's robots.txt and waits at least 1.5 seconds between requests to the same store.
- No personal data. Product data only.

### Pricing (pay per event)

- $0.005 per run start
- $0.001 per product row saved ($1.00 per 1,000)
- $0.002 per alert (price change, restock, sell-out, new, removed)

### Run it yourself (no Apify account needed)

```
npm test                 # offline checks
node test/selftest.js    # live check against 3 real stores
```

# Actor input Schema

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

Shopify store addresses or collection links, e.g. allbirds.com or https://shop.example.com/collections/sale.

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

Turn on for a daily alert feed: new, price down/up, back in stock, sold out, removed. The first run is always the full baseline.

## `keywords` (type: `array`):

Keep products whose name, type or tags contain any of these.

## `vendors` (type: `array`):

Keep only these brands (the Shopify "vendor" field), e.g. Allbirds.

## `onSaleOnly` (type: `boolean`):

Keep only products with a compare-at price above the current price.

## `inStockOnly` (type: `boolean`):

Keep only variants currently in stock.

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

Stop after this many products per store (250 per page). Removed-product alerts are skipped when a store is capped.

## Actor input object example

```json
{
  "stores": [
    "allbirds.com"
  ],
  "onlyChanges": false,
  "onSaleOnly": false,
  "inStockOnly": false,
  "maxProductsPerStore": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

One row per product variant with price, stock and change type (baseline, new, price_down, price_up, back_in_stock, sold_out, removed).

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

Per-store counts: products, variants, rows saved, alerts, and any stores that were skipped.

# 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": [
        "allbirds.com"
    ]
};

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

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

```

## MCP server setup

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