# Shopify Price Tracker (`unanimous_venus/shopify-price-tracker`) Actor

Monitor Shopify product prices in real-time, get smart alerts on price changes, and never miss a deal again. Perfect for dropshippers, store owners, and e-commerce analysts. Supports scheduled checks, saved product lists, and automatic price comparisons.

- **URL**: https://apify.com/unanimous\_venus/shopify-price-tracker.md
- **Developed by:** [John Alex](https://apify.com/unanimous_venus) (community)
- **Categories:** E-commerce, Automation, Social media
- **Stats:** 11 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$2.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Shopify Real-Time Price Tracker

Monitor Shopify store product prices in real-time, track price changes, and get alerts when prices change by a specified percentage.

### Features

✅ **Real-time Price Tracking** - Monitor product prices across multiple Shopify stores
📊 **Price Change Detection** - Get notified when prices drop or increase by your threshold
💾 **Persistent Storage** - Save product URLs and price history between runs
🔄 **Scheduled Monitoring** - Configure hourly, daily, or weekly checks
📈 **Detailed Reports** - View comprehensive price change statistics
🎯 **Smart Alerts** - Only alert on significant price changes (configurable threshold)

### Input Parameters

#### Required Fields

- **Product URLs** - List of Shopify product URLs to monitor
  - Example: `https://shop.gymshark.com/products/gymshark-vital-seamless-2-0-leggings-black`
  - Leave empty to use saved URLs from previous run

#### Optional Fields

- **Use Saved Product URLs** (default: `true`)
  - Reuse URLs from last run without pasting them again

- **Save Product URLs for Next Run** (default: `true`)
  - Automatically save URLs for future runs

- **Check Interval** (default: `every-6-hours`)
  - Options: `hourly`, `every-6-hours`, `daily`, `weekly`
  - Use this setting when scheduling the Actor

- **Price Change Alert Threshold** (default: `5%`)
  - Only alert if price changes by this percentage or more
  - Range: 0-100%

- **Maximum Products to Track** (default: `10`)
  - Maximum number of products to track per run
  - Range: 1-100

### Output

The Actor produces a structured dataset with the following fields:

- `url` - Product URL
- `productTitle` - Product name
- `currentPrice` - Current price
- `previousPrice` - Price from last run (if available)
- `priceChange` - Dollar amount change
- `percentChange` - Percentage change
- `status` - One of:
  - `tracked` - First time tracking
  - `price_dropped` - Price decreased significantly
  - `price_increased` - Price increased significantly
  - `no_significant_change` - Changed but below threshold
  - `error` - Failed to extract price
- `currency` - Currency code (e.g., USD)
- `timestamp` - ISO timestamp
- `lastChecked` - Human-readable date/time

### How It Works

1. **Price Extraction** - Uses multiple strategies to extract prices:
   - JSON-LD structured data (most reliable)
   - Common Shopify CSS selectors (fallback)

2. **Price Comparison** - Compares current prices with stored historical data

3. **Change Detection** - Calculates price changes and flags significant movements

4. **Data Storage** - Saves price history and product URLs for next run

5. **Report Generation** - Exports results to dataset in table format

### Example Input

```json
{
  "productUrls": [
    {"url": "https://shop.gymshark.com/products/gymshark-vital-seamless-2-0-leggings-black"},
    {"url": "https://www.allbirds.com/products/mens-wool-runners"}
  ],
  "useSavedProducts": true,
  "saveProducts": true,
  "checkInterval": "every-6-hours",
  "priceChangeThreshold": 5,
  "maxProducts": 10
}
```

### Local Development

#### Prerequisites

- Node.js 20+
- Apify CLI (install: `curl -fsSL https://apify.com/install-cli.sh | bash`)

#### Installation

```bash
cd shopify-price-tracker
npm install
```

#### Run Locally

```bash
apify run
```

#### Deploy to Apify Platform

```bash
## Login to Apify
apify login

## Push to platform
apify push
```

### Best Practices

- **Respect Rate Limits** - The Actor uses concurrency controls and delays
- **Monitor Responsibly** - Don't track too many products at once
- **Review Terms of Service** - Ensure compliance with store policies
- **Set Realistic Thresholds** - 5-10% is good for most use cases
- **Schedule Wisely** - Every 6 hours is sufficient for most price tracking

### Scheduling

To run the Actor on a schedule:

1. Deploy to Apify Platform (`apify push`)
2. Go to Actor Settings → Schedule
3. Create schedule matching your `checkInterval` setting
4. Enable "Use Saved Products" to avoid re-entering URLs

### Troubleshooting

#### No prices extracted

- Check if the product page is accessible
- Verify the URL is a valid Shopify product page
- Some stores may require JavaScript rendering (this Actor uses Cheerio)

#### Too many errors

- Reduce `maxProducts` setting
- Check proxy configuration
- Verify network connectivity

#### Missing previous prices

- Ensure `saveProducts` is enabled
- Price history builds over multiple runs

### Support

For issues, feature requests, or questions:

- GitHub Issues: [Report an issue](#)
- Apify Forum: https://forum.apify.com/
- Documentation: https://docs.apify.com/

### License

ISC License - See LICENSE file for details

# Actor input Schema

## `productUrls` (type: `array`):

List of Shopify product URLs to monitor. Leave empty to use saved URLs from previous run.

## `useSavedProducts` (type: `boolean`):

Check to reuse URLs from last run without pasting again.

## `saveProducts` (type: `boolean`):

Automatically save URLs so you don't have to paste them next time.

## `checkInterval` (type: `string`):

How often to check prices (for scheduling purposes).

## `priceChangeThreshold` (type: `integer`):

Only alert if price changes by this percentage or more.

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

Maximum number of products to track per run.

## Actor input object example

```json
{
  "productUrls": [
    {
      "url": "https://shop.gymshark.com/products/gymshark-vital-seamless-2-0-leggings-black"
    }
  ],
  "useSavedProducts": true,
  "saveProducts": true,
  "checkInterval": "every-6-hours",
  "priceChangeThreshold": 5,
  "maxProducts": 10
}
```

# Actor output Schema

## `priceTracking` (type: `string`):

View all tracked products with price changes

## `priceDrops` (type: `string`):

View only products with price decreases

## `dataset` (type: `string`):

Download all tracking results as JSON

# 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 = {
    "productUrls": [
        {
            "url": "https://shop.gymshark.com/products/gymshark-vital-seamless-2-0-leggings-black"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("unanimous_venus/shopify-price-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 = { "productUrls": [{ "url": "https://shop.gymshark.com/products/gymshark-vital-seamless-2-0-leggings-black" }] }

# Run the Actor and wait for it to finish
run = client.actor("unanimous_venus/shopify-price-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "productUrls": [
    {
      "url": "https://shop.gymshark.com/products/gymshark-vital-seamless-2-0-leggings-black"
    }
  ]
}' |
apify call unanimous_venus/shopify-price-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=unanimous_venus/shopify-price-tracker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sOP6xLhtLwlXKtCSG/builds/cQNlw5OKq51wB076g/openapi.json
