# Price & Stock Change Tracker for Shopify and WooCommerce (`kacperor/ecommerce-price-stock-tracker`) Actor

Schedule it and get only what changed since the last run: price drops and increases, sales starting or ending, items going out of stock or back in stock, new and removed products. Remembers the previous state for you.

- **URL**: https://apify.com/kacperor/ecommerce-price-stock-tracker.md
- **Developed by:** [Kacper Kruszka](https://apify.com/kacperor) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Price & Stock Change Tracker for Shopify and WooCommerce

Most store scrapers hand you the whole catalogue every time and leave the comparing to you. This one **remembers the previous run and returns only what changed**: price drops and increases, sales starting and ending, products going out of stock or coming back, new products and removed ones.

Put it on a schedule, connect the dataset to email, Slack, Google Sheets or your own system, and you have a competitor monitor.

### How it works

1. **First run** records a baseline of each store and reports no changes.
2. **Every later run** reads the store again, compares it with the saved snapshot and outputs one row per change, plus one summary row per store.
3. The snapshot lives in a named key-value store in your account (`stateStoreName`), so it survives between runs and schedules.

Works with Shopify and WooCommerce — the platform is detected automatically. No browser and no proxy, so a daily check of a 5,000-product store costs a fraction of a cent in platform usage.

### Input

| Field | What it does |
|---|---|
| `storeUrls` | Stores to watch |
| `changeTypes` | Optional filter: `price_drop`, `price_increase`, `sale_started`, `sale_ended`, `out_of_stock`, `back_in_stock`, `new_product`, `removed_product` |
| `minPriceChangePercent` | Ignore tiny price movements |
| `maxProductsPerStore` | Default 5,000 |
| `stateStoreName` | Use different names for independent trackers |

### Output

A change row (example of the format — real change rows appear from the second run on, when something in the store changes):

```json
{
  "type": "price_drop",
  "store": "https://allbirds.com",
  "title": "Women's Wool Cruiser",
  "variantTitle": "8",
  "oldPrice": 135,
  "newPrice": 120,
  "changePercent": -11.11,
  "currency": "USD",
  "available": true,
  "url": "https://allbirds.com/products/womens-wool-cruiser",
  "detectedAt": "2026-11-14T08:00:00.000Z",
  "previousCheckAt": "2026-11-13T08:00:00.000Z"
}
```

Each store also gets a `store_summary` row with the number of items tracked and a count of changes by type — handy for "nothing changed today" checks.

Real `store_summary` row from a first run on 16 Nov 2026 (snapshot saved, nothing to compare yet):

```json
{
  "type": "store_summary",
  "store": "https://allbirds.com",
  "platform": "shopify",
  "currency": "USD",
  "itemsTracked": 620,
  "firstRun": true,
  "changes": 0,
  "changesByType": {},
  "checkedAt": "2026-11-16T20:45:48.851Z",
  "previousCheckAt": null
}
```

### Good to know

- On Shopify every variant (size, colour) is tracked separately; on WooCommerce every product.
- A store that cannot be read is reported in a summary row with the reason, free of charge, and its saved baseline is left untouched.
- You pay per store check and per change reported. A day with no changes costs only the store check.

# Actor input Schema

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

Shopify or WooCommerce stores to watch. The platform is detected automatically.

## `changeTypes` (type: `array`):

Leave empty to report everything.

## `minPriceChangePercent` (type: `integer`):

0 = report every price change.

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

Upper limit of products tracked in one store.

## `stateStoreName` (type: `string`):

Named key-value store that keeps the previous snapshot. Use different names to run independent trackers on the same store.

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

How many stores are read at the same time.

## Actor input object example

```json
{
  "storeUrls": [
    "allbirds.com"
  ],
  "minPriceChangePercent": 0,
  "maxProductsPerStore": 5000,
  "stateStoreName": "price-stock-tracker-state",
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("kacperor/ecommerce-price-stock-tracker").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": ["allbirds.com"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kacperor/ecommerce-price-stock-tracker"
        }
    }
}
```

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/Rww8aV7rnoe8u8Cjy/builds/Hx91yC2dbAkxy00gi/openapi.json
