# Competitor Price Intelligence (`moving_beacon-owner1/competitor-price-intelligence`) Actor

Collects Shopify product offers, matches identical products across sellers, and compares prices with matching confidence. Extracts product details, seller, price, availability, and identifies the cheapest offer.

- **URL**: https://apify.com/moving\_beacon-owner1/competitor-price-intelligence.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 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/actors/running/actors-in-store.md#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

## Competitor Price Intelligence

Collect product **offers** from Shopify stores and product pages, automatically **match the same product across sellers**, and report the **price spread** between matched offers — each group annotated with a **matching confidence** so you can trust (or discount) the comparison.

The Actor is deliberately conservative: it **never combines different products**. Two offers are only grouped when they share a hard identifier (SKU/GTIN) or their names match with confidence ≥ 0.8. Because matching caps confidence when identifiers conflict, similarly-named but distinct products stay in separate groups.

### What does this Actor do?

1. **Collect offers** — from each Shopify store via the public `products.json` endpoint, and from each product/store URL via embedded schema.org (JSON-LD) `Product` data.
2. **Normalize** — every offer is reduced to `name`, `brand`, `sku`, `seller`, `price`, `currency`, `availability`, `url`, `timestamp`.
3. **Group same-product offers** — SKU/identifier grouping first, then name-similarity matching (`shared.matching.match_records`).
4. **Compare prices** — within each multi-offer group, annotate the difference versus the cheapest offer, flag the cheapest seller, and record the average pairwise matching confidence.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `shopifyStores` | array | Shopify store URLs (collected via `products.json`). |
| `productUrls` | array | Product/store page URLs (parsed for JSON-LD product data). |
| `searchKeyword` | string | Optional. Keep only offers whose name contains every keyword token. |
| `maxProductsPerStore` | integer | Max products per Shopify store (default 100). |
| `proxyConfiguration` | object | Proxy settings (Apify Proxy recommended). |

Provide at least one of `shopifyStores` or `productUrls`.

#### Input example

```json
{
  "shopifyStores": ["https://store-a.myshopify.com", "https://store-b.myshopify.com"],
  "searchKeyword": "desk lamp",
  "maxProductsPerStore": 100
}
```

### Output

One record per offer. Same-product offers share a `groupId`; multi-offer groups carry price-comparison fields.

| Field | Description |
| --- | --- |
| `name`, `brand`, `sku`, `seller` | Product identity and the store/source the offer came from. |
| `price`, `currency`, `availability`, `url` | The offer itself. |
| `timestamp` | ISO-8601 UTC collection time. |
| `groupId`, `offersInGroup` | Which same-product group the offer belongs to and its size. |
| `matchingConfidence` | Average pairwise match confidence within the group (null for singletons). |
| `priceDifference`, `priceDifferencePct` | Difference versus the cheapest offer in the group. |
| `isCheapest` | True for the cheapest offer in the group. |
| `cheapestOffer` | The cheapest offer's `{seller, price, currency, url}`. |

#### Output example

```json
{
  "name": "Aurora Desk Lamp",
  "brand": "Aurora",
  "sku": "LAMP-100",
  "seller": "https://store-b.myshopify.com",
  "price": 44.99,
  "currency": "USD",
  "groupId": 0,
  "offersInGroup": 2,
  "matchingConfidence": 0.98,
  "priceDifference": 5.0,
  "priceDifferencePct": 12.5,
  "isCheapest": false,
  "cheapestOffer": { "seller": "https://store-a.myshopify.com", "price": 39.99, "currency": "USD", "url": "https://store-a.myshopify.com/products/aurora-desk-lamp" }
}
```

You can download the dataset in JSON, CSV, Excel or HTML.

### How matching works (and why it is trustworthy)

- **Identifiers first** — offers sharing a SKU/GTIN are the same product with confidence ≈ 0.98.
- **Then names** — offers are grouped when normalized-name similarity (plus brand/model-token agreement) reaches 0.8. Marketing filler is stripped before comparison.
- **Conflicts cap confidence** — when two offers carry *different* hard identifiers, confidence is capped low, so they are never merged. **Different products are not combined.**

# Actor input Schema

## `shopifyStores` (type: `array`):

Shopify store URLs to collect offers from via the public products.json endpoint, e.g. 'https://store.myshopify.com'.

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

Individual product or store page URLs. Each page is fetched and any embedded schema.org (JSON-LD) Product data becomes an offer.

## `searchKeyword` (type: `string`):

If set, only offers whose product name contains every token of this keyword are kept (e.g. 'wireless headphones').

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

Maximum number of products to collect from each Shopify store.

## `proxyConfiguration` (type: `object`):

Proxy settings. Apify Proxy is recommended to avoid rate limiting.

## `cookies` (type: `string`):

Optional Cookie header string replayed on every request (for sites behind a challenge).

## Actor input object example

```json
{
  "shopifyStores": [
    "https://cettire.com"
  ],
  "maxProductsPerStore": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "shopifyStores": [
        "https://cettire.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/competitor-price-intelligence").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 = { "shopifyStores": ["https://cettire.com"] }

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/competitor-price-intelligence").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 '{
  "shopifyStores": [
    "https://cettire.com"
  ]
}' |
apify call moving_beacon-owner1/competitor-price-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/competitor-price-intelligence"
        }
    }
}

```

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/oJ7TkEFbgvbZnlH6a/builds/bxpt1KThHNvrU7uct/openapi.json
