# Shopify SKU Price Comparison (`s.b.furey/shopify-sku-price-comparison`) Actor

Compare supplied Shopify product pairs by exact SKU. Get current prices, currency, stock availability, price gaps and optional pack unit prices, with source links and timestamps. Missing SKUs, errors and currency mismatches have no comparison charge.

- **URL**: https://apify.com/s.b.furey/shopify-sku-price-comparison.md
- **Developed by:** [Samantha Buckley](https://apify.com/s.b.furey) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 sku comparisons

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 SKU Price Comparison

Compare current prices for supplied Shopify product pairs by an exact SKU. Get the price difference, availability, product-page currency, source URLs, timestamps and optional price per unit in a CSV, Excel or JSON export.

Built for ecommerce teams and agencies that maintain a list of competitor product URLs and repeat price checks daily or weekly.

### How to run

1. Add a product pair with `leftUrl`, `rightUrl` and the exact `sku` found on both products.
2. Optionally add `label`, `leftUnits` and `rightUnits`. Both quantities must describe the same unit, such as pieces or grams.
3. Run the Actor and open the SKU comparisons output.
4. Schedule the same input in Apify for recurring checks, or call the Actor through the Apify API, Make or n8n.

```json
{
  "productPairs": [
    {
      "label": "Our product versus competitor",
      "leftUrl": "https://your-store.example/products/product-handle",
      "rightUrl": "https://competitor.example/products/product-handle",
      "sku": "EXACT-SKU-123",
      "leftUnits": 1,
      "rightUnits": 1
    }
  ]
}
```

Replace the illustrative URLs and SKU with your own public product pair. The Console example is one Staedtler eraser listed by two Australian art retailers. Running that example produces one comparison when the public data remains available. A run supports up to 100 pairs.

### What the output means

`sku_matched` means the supplied SKU appeared exactly once in each product and both sessions returned the same currency. SKU matching is case sensitive after trimming surrounding whitespace. Review product names, vendors, variants and pack details before taking a pricing action. An identical SKU alone cannot prove that two merchants mean the same item.

`priceDifference` is left price minus right price. A positive value means the left price is higher. The percentage uses the right price as its baseline and stays blank when that price is zero. Optional unit prices use the buyer's supplied quantities and the same unit on both sides.

Nested `left` and `right` fields contain the product title, vendor, variant title, SKU, variant ID, availability, product JSON source, currency source and observation time. `available` is storefront availability, and does not provide exact inventory quantities. `checkedAt` is the time the pair comparison finished. A product shared by several pairs is fetched once during the run and retains its original observation time.

`currency_mismatch`, `currency_unknown`, `sku_not_found`, `sku_ambiguous`, `invalid_input`, `invalid_url`, `same_product_url`, `fetch_error`, `unsupported_store`, `robots_disallowed`, `robots_unavailable`, `redirect_unsupported` and `response_too_large` explain why a comparison could not complete. Those rows are reported without a comparison event.

### Pricing

The launch price is $0.01 for each completed same-currency SKU comparison, or $10 per 1,000. One event covers both product lookups. Error, ambiguous, missing-SKU and currency-mismatch rows have no comparison charge. Platform usage is included in the published event price. Set a maximum run cost in Apify to cap spending.

### Supported storefronts and limits

The Actor reads Shopify's public locale-aware Product Ajax endpoint and product page using one fresh session per storefront locale. Currency comes from the product page's Shopify currency declaration or structured offer data. Missing or conflicting declarations produce a free currency_unknown row. It respects robots.txt, paces requests, verifies TLS and restricts destinations to public HTTPS addresses.

You supply product URLs and their shared SKU. Discovery of competitor URLs, fuzzy matching, automatic repricing, saved price history and outgoing email alerts are outside this version's scope. Each scheduled run produces a new dated dataset for downstream comparison.

Prices reflect the storefront session and region that Apify receives. Shipping, tax treatment, memberships, subscription pricing, checkout discounts and regional offers can change the final checkout total. The output reports observed prices and currency without currency conversion. Some stores hide their SKUs, disable public endpoints, block requests, or redirect to a different hostname. Such stores need manual review.

### Data and billing

Only public product and product-page currency metadata are read. No customer account or store-admin credentials are needed. Cookies live in memory for the run. The Actor saves results to your default dataset and a summary under `SUMMARY` in the run key-value store.

The event name used by the code is `sku-comparison-completed`. It is emitted through the Apify SDK only after a successful comparison. Actor owners are exempt from event fees when testing their own Actor. `billable` describes whether the row qualifies for the customer event, and does not claim that money changed hands in an owner test.

# Actor input Schema

## `productPairs` (type: `array`):

Up to 100 objects. Each requires leftUrl, rightUrl and sku. Optional label, leftUnits and rightUnits. URLs must be two different public Shopify product pages. Supply both quantities in the same unit to compare packs.

## Actor input object example

```json
{
  "productPairs": [
    {
      "leftUrl": "https://parkersartsupplies.com/products/staedtler-mars-plastic-eraser",
      "rightUrl": "https://seniorart.com.au/products/staedtler-mars-plastic-eraser",
      "sku": "4007817504598",
      "label": "Demo comparison of one eraser at two retailers",
      "leftUnits": 1,
      "rightUnits": 1
    }
  ]
}
```

# 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 = {
    "productPairs": [
        {
            "leftUrl": "https://parkersartsupplies.com/products/staedtler-mars-plastic-eraser",
            "rightUrl": "https://seniorart.com.au/products/staedtler-mars-plastic-eraser",
            "sku": "4007817504598",
            "label": "Demo comparison of one eraser at two retailers",
            "leftUnits": 1,
            "rightUnits": 1
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s.b.furey/shopify-sku-price-comparison").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 = { "productPairs": [{
            "leftUrl": "https://parkersartsupplies.com/products/staedtler-mars-plastic-eraser",
            "rightUrl": "https://seniorart.com.au/products/staedtler-mars-plastic-eraser",
            "sku": "4007817504598",
            "label": "Demo comparison of one eraser at two retailers",
            "leftUnits": 1,
            "rightUnits": 1,
        }] }

# Run the Actor and wait for it to finish
run = client.actor("s.b.furey/shopify-sku-price-comparison").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 '{
  "productPairs": [
    {
      "leftUrl": "https://parkersartsupplies.com/products/staedtler-mars-plastic-eraser",
      "rightUrl": "https://seniorart.com.au/products/staedtler-mars-plastic-eraser",
      "sku": "4007817504598",
      "label": "Demo comparison of one eraser at two retailers",
      "leftUnits": 1,
      "rightUnits": 1
    }
  ]
}' |
apify call s.b.furey/shopify-sku-price-comparison --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s.b.furey/shopify-sku-price-comparison"
        }
    }
}
```

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/VaOGYbdWR0nCOgdyu/builds/9UcrpKlTYP7xer1Dk/openapi.json
