# Product Matcher - Match Products Across Stores (GTIN + Fuzzy) (`freecamp008/product-matcher`) Actor

Match the same products across two catalogs, stores or scraped competitor datasets. GTIN/EAN/UPC exact match, model numbers, and fuzzy title scoring that catches 128GB vs 256GB, color and pack-size false positives. Price differences included. No AI APIs.

- **URL**: https://apify.com/freecamp008/product-matcher.md
- **Developed by:** [Camp8 fr0](https://apify.com/freecamp008) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 product compareds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Product Matcher: Match Products Across Stores & Catalogs (GTIN, Model Number, Fuzzy Title Matching)

Find the **same product in two catalogs** (your store vs a competitor, supplier feed vs marketplace, two scraped shops) and get the **price difference** for every match. Product Matcher is a deterministic **product matching / SKU matching / catalog reconciliation** engine: GTIN/EAN/UPC exact matching, model number matching, and fuzzy title scoring that understands capacities, sizes, colors and pack counts. It needs no embeddings, no LLM API and no API keys, and the same input always gives the same output.

### What it does

You give it two product lists, **catalog A** (for example your products) and **catalog B** (for example a competitor's products scraped with any Apify scraper). For every product in A it finds the best match in B, scores it from 0 to 1, explains why, and calculates `priceDiff` and `priceDiffPercent`.

It is built to avoid the classic false positives of naive fuzzy matching:

- `iPhone 15 128GB` is **not** `iPhone 15 256GB` (capacity conflict)
- `Coca-Cola 6 x 330ml` is **not** a single `330ml` can (pack size conflict)
- `Sony WH-1000XM4` is **not** `WH-1000XM5` (model number conflict)
- `Dior Sauvage EDP` is **not** `Dior Sauvage EDT` (concentration conflict)
- `Nike Air Force 1 White 42` is **not** `... White 43` or `... Black 42` (size / color conflict)
- `Galaxy S24` is **not** `Galaxy S24 Ultra`, `PlayStation 5` is **not** `PlayStation 4` (variant / generation conflict)

### Key features

- **GTIN / EAN / UPC / ISBN exact match** with checksum validation and normalization (UPC-12 = EAN-13 = GTIN-14 with zero padding, ISBN-10 converted to ISBN-13). A valid GTIN match scores 1.0.
- **Model number matching**: detects codes such as `WH-1000XM5`, `QE55Q60C`, `RB3025`, `ILCE-7M4`, even when written as `WH1000XM5/S` or `WH 1000XM5`, and also uses SKU / MPN fields.
- **Unit-aware attribute extraction**: storage (GB/TB/Go/To), volume (ml/cl/l/fl oz), weight (g/kg/lb/oz), screen and length (inch, ", cm, mm, Zoll, pouces), power (W), battery (mAh), voltage, pack counts (`6 x 330ml`, `6-pack`, `6er Pack`, `lot de 3`, `pack of 12`), piece counts (`80 tea bags`, `40 washes`, `16 capsules`), clothing and shoe sizes (`S/M/L/XL`, `EU 42`, `UK 9`, `W32 L34`), gender, fit, perfume concentration (EDP/EDT/parfum), day/night, sugar-free and alcohol-free variants, tech specs (DDR4/DDR5, 4K/8K, E27/GU10, SPF30/SPF50).
- **Multilingual**: colors and common product words in English, French, German and Spanish (some Italian), unicode/accent folding, UK/US spellings.
- **Fuzzy title similarity**: TF-IDF weighted token cosine, containment and character-trigram Jaccard, with brand words removed so two products from the same brand don't look alike just because of the brand.
- **Explainable**: every result has `reasons` like `model number WH-1000XM5 matches` or `capacity conflict 128GB vs 256GB`, plus the top candidates.
- **Fast on big catalogs**: an inverted index on rare tokens and model numbers avoids comparing every pair. 20,000 x 20,000 products took 5.6 s locally, and 50,000 x 50,000 took 23 s.
- **One-to-one mode**: optional global assignment so each B product is used at most once.
- **Price sanity check**: optionally penalizes pairs with very different prices (catches accessories, bundles, refurbished items) and never compares different currencies.
- Reads products **inline (JSON)** or from **any Apify dataset** (works with limited permissions).

### Use cases

- **Competitor price monitoring**: match your catalog to a competitor's scraped catalog and get price gaps per product.
- **Marketplace / retailer catalog mapping**: map supplier feeds to Amazon, eBay, Zalando, Bol or Cdiscount listings.
- **Deduplication and catalog merging** after an acquisition or a platform migration.
- **MAP / price-compliance checks** for brands monitoring resellers.
- **Assortment gap analysis**: unmatched products show what a competitor sells that you don't (and the reverse).
- **E-commerce data pipelines**: run it after any Apify e-commerce scraper and feed the matches to your BI tool.

### How to use

#### In Apify Console

1. Paste your products into **Catalog A** and **Catalog B** as JSON arrays, or pick existing datasets (for example the output of a scraper run) in **Catalog A dataset** / **Catalog B dataset**.
2. If your fields are not called `title`, `price`, `brand`, `gtin`..., set the **Field mapping** (dot paths like `offers.price` work). Use **Field overrides for catalog B** when the two catalogs use different field names.
3. Keep **Minimum match score** at 0.6, or raise it to 0.75 or more if you will act on the matches automatically.
4. Run it and open the **Matches** table, or export it as JSON, CSV or Excel.

#### Via API

```bash
curl -X POST "https://api.apify.com/v2/acts/freecamp008~product-matcher/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "datasetIdA": "YOUR_STORE_DATASET_ID",
    "datasetIdB": "COMPETITOR_DATASET_ID",
    "titleField": "name",
    "fieldMappingB": { "price": "offers.price" },
    "minScore": 0.7,
    "oneToOne": true
  }'
```

#### Standby HTTP API (real-time)

The Actor also runs as an always-on HTTP service. Send the same fields as the input, either as a POST JSON body or as GET query parameters. The response is `{ "count": n, "items": [...] }`.

```bash
curl -X POST "https://freecamp008--product-matcher.apify.actor/?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "productsA": [{ "id": "a1", "title": "Apple iPhone 15 128GB Black", "price": 799 }],
    "productsB": [
      { "id": "b1", "title": "iPhone 15 256 GB Black", "price": 899 },
      { "id": "b2", "title": "Apple iPhone 15 (128 GB) - Black", "price": 779 }
    ]
  }'
```

```bash
curl -G "https://freecamp008--product-matcher.apify.actor/" \
  --data-urlencode 'token=YOUR_APIFY_TOKEN' \
  --data-urlencode 'productsA=[{"title":"Sony WH-1000XM5 Black","price":349}]' \
  --data-urlencode 'productsB=[{"title":"SONY WH1000XM5/B Headphones","price":329}]'
```

**AI agents** can call this Actor and pay per call via **x402** through Apify: it uses pay-per-event pricing and runs with limited permissions.

### Input example

```json
{
  "productsA": [
    { "id": "A1", "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones, Black", "brand": "Sony", "price": 349.99 },
    { "id": "A2", "title": "Apple iPhone 15 128GB Black", "brand": "Apple", "price": 799 },
    { "id": "A4", "title": "Coca-Cola Original Taste 6 x 330ml cans", "brand": "Coca-Cola", "price": 4.99 },
    { "id": "A5", "title": "L'Oréal Paris Revitalift Laser X3 Day Cream 50ml", "price": 24.9, "gtin": "3600523257461" }
  ],
  "productsB": [
    { "id": "B1", "title": "SONY WH1000XM5 Noise-Cancelling Bluetooth Headphones (Black)", "price": 329 },
    { "id": "B2", "title": "iPhone 15 256 GB - Black - Apple", "price": 899 },
    { "id": "B3", "title": "Apple iPhone 15 (128 GB) – Black", "price": 779 },
    { "id": "B5", "title": "Coca-Cola Original 330 ml can", "price": 0.99 },
    { "id": "B6", "title": "L'Oreal Revitalift Laser X3 Anti-Ageing Day Cream 50 ml", "price": 21.99, "gtin": "03600523257461" }
  ],
  "minScore": 0.6,
  "topK": 3,
  "oneToOne": false,
  "currencyAware": false
}
```

| Field | Default | Description |
|---|---|---|
| `productsA` / `productsB` | – | Arrays of product objects |
| `datasetIdA` / `datasetIdB` | – | Apify dataset IDs or names (instead of, or in addition to, the arrays) |
| `titleField`, `idField`, `brandField`, `priceField`, `gtinField`, `skuField`, `mpnField`, `urlField` | `title`, `id`, `brand`, `price`, `gtin`, `sku`, `mpn`, `url` | Field names (dot paths allowed). Common alternatives (`name`, `ean`, `upc`, `manufacturer`, `link`...) are tried automatically |
| `fieldMappingB` | – | Different field names for catalog B, e.g. `{"title": "name", "price": "offers.price"}` |
| `minScore` | `0.6` | Matches below this score are reported as unmatched |
| `topK` | `3` | Number of candidates listed per product |
| `oneToOne` | `false` | Each B product is matched at most once (highest scores first) |
| `currencyAware` / `maxPriceRatio` | `false` / `2.5` | Price sanity check; mixed currencies are never compared |
| `includeUnmatched` | `true` | Also output A products without a match |

### Output example

One item per product in catalog A:

```json
{
  "aId": "A2",
  "aTitle": "Apple iPhone 15 128GB Black",
  "aUrl": "https://shop-a.example/p/iphone-15-128-black",
  "matched": true,
  "score": 1,
  "matchType": "model",
  "bestMatch": {
    "bId": "B3",
    "bTitle": "Apple iPhone 15 (128 GB) – Black",
    "bPrice": 779,
    "bUrl": "https://shop-b.example/item/3",
    "bBrand": null
  },
  "priceA": 799,
  "priceB": 779,
  "currency": null,
  "priceDiff": -20,
  "priceDiffPercent": -2.5,
  "reasons": ["model number IPHONE 15 matches", "brand Apple matches", "capacity 128GB matches", "color black matches", "title similarity 1"],
  "candidates": [
    { "bId": "B3", "bTitle": "Apple iPhone 15 (128 GB) – Black", "bPrice": 779, "score": 1, "matchType": "model" },
    { "bId": "B2", "bTitle": "iPhone 15 256 GB - Black - Apple", "bPrice": 899, "score": 0.495, "matchType": "model" }
  ]
}
```

An unmatched product looks like this:

```json
{
  "aId": "A4",
  "aTitle": "Coca-Cola Original Taste 6 x 330ml cans",
  "matched": false,
  "score": 0.429,
  "matchType": null,
  "bestMatch": null,
  "reasons": ["best candidate B5 scored 0.429 < minScore 0.6", "brand Coca-Cola matches", "volume 330ml matches", "pack of 6 vs single item", "title similarity 0.78"]
}
```

- `matchType`: `gtin` (barcode match), `model` (model number, SKU or MPN match) or `fuzzy` (title and attributes only).
- `priceDiff` = priceB − priceA and `priceDiffPercent` = priceDiff / priceA × 100.
- A run summary (counts and timings) is saved as `SUMMARY` in the default key-value store.

### Pricing

Pay-per-event. You pay only for products that are compared:

| Event | Price | Per 1,000 |
|---|---|---|
| `product-compared`: one product from catalog A compared against catalog B (matched or unmatched) | $0.005 | **$5.00** |

Products in catalog B are free, and so are rows rejected for a missing title. If you turn off `includeUnmatched`, unmatched products are not output and not charged. Typical alternatives charge around $0.01 per item. Apify platform usage (compute and storage) is billed separately by Apify; matching is CPU-light, so a 20k x 20k run takes seconds. Set **Maximum cost per run** to cap spend: the Actor compares only as many products as the budget allows.

### FAQ

**How accurate is it?**
It depends heavily on the data. With GTINs or model numbers on both sides, matches are close to exact. On our hand-labeled test sets, every product has one to three look-alike decoys in B (same product in another capacity, color, size, pack or generation). On the set used to tune the rules we measured precision 0.985 and recall 0.971 at `minScore` 0.6. On a final blind set written after tuning, precision was 0.67 and recall 0.73 at 0.6, and precision was 0.79 at 0.8. The hard cases are pure wording differences between flavors or sub-lines ("Paprika" vs "Classic", "Chicken" vs "Vegetable") and color names outside any dictionary ("Desert Titanium"). Check `reasons` and `candidates`, and use 0.75 or more before automating price changes.

**How big can the catalogs be?**
Up to 250,000 products per side per run. 50,000 x 50,000 used about 1.2 GB of memory locally; use 4 GB of memory for catalogs above about 30,000 products per side. For bigger catalog A files, split them into several runs against the same catalog B.

**Which languages are supported?**
Titles in any Latin-script language work. Colors, units, sizes, pack wording and common product words are normalized for English, French, German and Spanish (and partly Italian), so `Noir`, `Schwarz`, `Negro` and `Black` are all the same color, and `256 Go` equals `256GB`.

**Does it use AI, embeddings or external APIs?**
No. It is a deterministic rules + statistics engine running entirely inside the Actor. Nothing is sent to third parties and results are reproducible.

**What about privacy?**
Your catalogs are processed in your own Apify run and written only to your own dataset. No data leaves Apify and nothing is stored for training.

**Can I match my catalog with a competitor's website?**
Yes. Scrape the competitor with any Apify e-commerce scraper, then pass that run's dataset ID as `datasetIdB`. Use `fieldMappingB` if its field names differ from yours.

**What does one-to-one mode do?**
Without it, two of your products can match the same competitor product (useful for duplicates). With `oneToOne`, the highest-scoring pairs are assigned first and each B product is used at most once.

**Is it legal?**
Matching data you already hold is legal. Make sure the competitor data you collected respects the source website's terms and applicable law (for example GDPR for personal data, which product catalogs normally don't contain). Publicly visible product names and prices are generally fine to analyze for price monitoring.

# Actor input Schema

## `productsA` (type: `array`):

Products to match, as a JSON array of objects (e.g. your own catalog). Every product in A gets one result row with its best match in B. Use this OR <b>Catalog A dataset</b>.

## `productsB` (type: `array`):

Products to match against, as a JSON array of objects (e.g. scraped competitor data). Use this OR <b>Catalog B dataset</b>.

## `datasetIdA` (type: `string`):

ID or name of an Apify dataset with catalog A products (e.g. the output of a scraper run). Used instead of / in addition to <b>Catalog A products</b>.

## `datasetIdB` (type: `string`):

ID or name of an Apify dataset with catalog B products. Used instead of / in addition to <b>Catalog B products</b>.

## `titleField` (type: `string`):

Field holding the product title/name. Dot paths like <code>product.name</code> work. Falls back to <code>name</code> / <code>productName</code> when missing.

## `idField` (type: `string`):

Field with a unique product ID. Falls back to <code>sku</code>, <code>url</code>, then the row position.

## `brandField` (type: `string`):

Field with the brand/manufacturer. If missing, the brand is guessed from the first word of the title (known brands + brands seen in your data).

## `priceField` (type: `string`):

Field with the price (number or text like <code>1.299,00 €</code> / <code>$1,299.99</code>).

## `gtinField` (type: `string`):

Field with the barcode. Checksums are validated and UPC-12, EAN-13, GTIN-14 and ISBN-10/13 are normalized, so <code>012345678905</code> equals <code>0012345678905</code>. Falls back to <code>ean</code>, <code>upc</code>, <code>gtin13</code>, <code>isbn</code>, <code>barcode</code>.

## `skuField` (type: `string`):

Field with a manufacturer SKU / part number. Exact (normalized) SKU equality counts as a model-number match.

## `mpnField` (type: `string`):

Field with the manufacturer part number (MPN). Also matched against model numbers found in the other catalog's titles.

## `urlField` (type: `string`):

Field with the product page URL (copied to the output).

## `fieldMappingB` (type: `object`):

Optional: different field names for catalog B, e.g. <code>{"title": "name", "price": "offers.price", "gtin": "ean"}</code>. Keys: title, id, brand, price, gtin, sku, mpn, url.

## `minScore` (type: `number`):

Matches scoring below this (0-1) are reported as unmatched. 0.6 is balanced; raise to 0.75 for high precision, lower to 0.5 for more recall.

## `topK` (type: `integer`):

How many of the best B candidates to list in <code>candidates</code> for each A product.

## `oneToOne` (type: `boolean`):

Each B product can be matched to at most one A product (global assignment, highest scores first). Turn off to let several A products match the same B product.

## `currencyAware` (type: `boolean`):

Penalize matches whose prices differ by more than <b>Max price ratio</b> (catches accessories, bundles and refurbished items). Currencies detected in price text (€, $, £, EUR, USD…) must agree; mixed currencies are never compared.

## `maxPriceRatio` (type: `number`):

Used by the price sanity check: a pair whose higher price is more than this many times the lower price is penalized.

## `includeUnmatched` (type: `boolean`):

Also output A products without a match above the minimum score (with <code>matched: false</code>, best candidates and the reasons). When off, unmatched products are neither output nor billed.

## Actor input object example

```json
{
  "productsA": [
    {
      "id": "A1",
      "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones, Black",
      "brand": "Sony",
      "price": 349.99,
      "url": "https://shop-a.example/p/sony-wh1000xm5"
    },
    {
      "id": "A2",
      "title": "Apple iPhone 15 128GB Black",
      "brand": "Apple",
      "price": 799,
      "url": "https://shop-a.example/p/iphone-15-128-black"
    },
    {
      "id": "A3",
      "title": "Samsung Galaxy S24 Ultra 256GB Titanium Gray",
      "brand": "Samsung",
      "price": 1299.99,
      "url": "https://shop-a.example/p/s24-ultra-256"
    },
    {
      "id": "A4",
      "title": "Coca-Cola Original Taste 6 x 330ml cans",
      "brand": "Coca-Cola",
      "price": 4.99,
      "url": "https://shop-a.example/p/coke-6x330"
    },
    {
      "id": "A5",
      "title": "L'Oréal Paris Revitalift Laser X3 Day Cream 50ml",
      "brand": "L'Oréal Paris",
      "price": 24.9,
      "gtin": "3600523257461",
      "url": "https://shop-a.example/p/revitalift-laser"
    },
    {
      "id": "A6",
      "title": "Nike Air Force 1 '07 Men's Shoes White Size 42",
      "brand": "Nike",
      "price": 110,
      "url": "https://shop-a.example/p/af1-white-42"
    }
  ],
  "productsB": [
    {
      "id": "B1",
      "title": "SONY WH1000XM5 Noise-Cancelling Bluetooth Headphones (Black)",
      "price": 329,
      "url": "https://shop-b.example/item/1"
    },
    {
      "id": "B2",
      "title": "iPhone 15 256 GB - Black - Apple",
      "price": 899,
      "url": "https://shop-b.example/item/2"
    },
    {
      "id": "B3",
      "title": "Apple iPhone 15 (128 GB) – Black",
      "price": 779,
      "url": "https://shop-b.example/item/3"
    },
    {
      "id": "B4",
      "title": "Samsung Galaxy S24 Ultra 256 Go Gris Titane",
      "price": 1249,
      "url": "https://shop-b.example/item/4"
    },
    {
      "id": "B5",
      "title": "Coca-Cola Original 330 ml can",
      "price": 0.99,
      "url": "https://shop-b.example/item/5"
    },
    {
      "id": "B6",
      "title": "L'Oreal Revitalift Laser X3 Anti-Ageing Day Cream 50 ml",
      "price": 21.99,
      "gtin": "03600523257461",
      "url": "https://shop-b.example/item/6"
    }
  ],
  "titleField": "title",
  "idField": "id",
  "brandField": "brand",
  "priceField": "price",
  "gtinField": "gtin",
  "skuField": "sku",
  "mpnField": "mpn",
  "urlField": "url",
  "minScore": 0.6,
  "topK": 3,
  "oneToOne": false,
  "currencyAware": false,
  "maxPriceRatio": 2.5,
  "includeUnmatched": true
}
```

# Actor output Schema

## `matches` (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 = {
    "productsA": [
        {
            "id": "A1",
            "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones, Black",
            "brand": "Sony",
            "price": 349.99,
            "url": "https://shop-a.example/p/sony-wh1000xm5"
        },
        {
            "id": "A2",
            "title": "Apple iPhone 15 128GB Black",
            "brand": "Apple",
            "price": 799,
            "url": "https://shop-a.example/p/iphone-15-128-black"
        },
        {
            "id": "A3",
            "title": "Samsung Galaxy S24 Ultra 256GB Titanium Gray",
            "brand": "Samsung",
            "price": 1299.99,
            "url": "https://shop-a.example/p/s24-ultra-256"
        },
        {
            "id": "A4",
            "title": "Coca-Cola Original Taste 6 x 330ml cans",
            "brand": "Coca-Cola",
            "price": 4.99,
            "url": "https://shop-a.example/p/coke-6x330"
        },
        {
            "id": "A5",
            "title": "L'Oréal Paris Revitalift Laser X3 Day Cream 50ml",
            "brand": "L'Oréal Paris",
            "price": 24.9,
            "gtin": "3600523257461",
            "url": "https://shop-a.example/p/revitalift-laser"
        },
        {
            "id": "A6",
            "title": "Nike Air Force 1 '07 Men's Shoes White Size 42",
            "brand": "Nike",
            "price": 110,
            "url": "https://shop-a.example/p/af1-white-42"
        }
    ],
    "productsB": [
        {
            "id": "B1",
            "title": "SONY WH1000XM5 Noise-Cancelling Bluetooth Headphones (Black)",
            "price": 329,
            "url": "https://shop-b.example/item/1"
        },
        {
            "id": "B2",
            "title": "iPhone 15 256 GB - Black - Apple",
            "price": 899,
            "url": "https://shop-b.example/item/2"
        },
        {
            "id": "B3",
            "title": "Apple iPhone 15 (128 GB) – Black",
            "price": 779,
            "url": "https://shop-b.example/item/3"
        },
        {
            "id": "B4",
            "title": "Samsung Galaxy S24 Ultra 256 Go Gris Titane",
            "price": 1249,
            "url": "https://shop-b.example/item/4"
        },
        {
            "id": "B5",
            "title": "Coca-Cola Original 330 ml can",
            "price": 0.99,
            "url": "https://shop-b.example/item/5"
        },
        {
            "id": "B6",
            "title": "L'Oreal Revitalift Laser X3 Anti-Ageing Day Cream 50 ml",
            "price": 21.99,
            "gtin": "03600523257461",
            "url": "https://shop-b.example/item/6"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("freecamp008/product-matcher").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 = {
    "productsA": [
        {
            "id": "A1",
            "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones, Black",
            "brand": "Sony",
            "price": 349.99,
            "url": "https://shop-a.example/p/sony-wh1000xm5",
        },
        {
            "id": "A2",
            "title": "Apple iPhone 15 128GB Black",
            "brand": "Apple",
            "price": 799,
            "url": "https://shop-a.example/p/iphone-15-128-black",
        },
        {
            "id": "A3",
            "title": "Samsung Galaxy S24 Ultra 256GB Titanium Gray",
            "brand": "Samsung",
            "price": 1299.99,
            "url": "https://shop-a.example/p/s24-ultra-256",
        },
        {
            "id": "A4",
            "title": "Coca-Cola Original Taste 6 x 330ml cans",
            "brand": "Coca-Cola",
            "price": 4.99,
            "url": "https://shop-a.example/p/coke-6x330",
        },
        {
            "id": "A5",
            "title": "L'Oréal Paris Revitalift Laser X3 Day Cream 50ml",
            "brand": "L'Oréal Paris",
            "price": 24.9,
            "gtin": "3600523257461",
            "url": "https://shop-a.example/p/revitalift-laser",
        },
        {
            "id": "A6",
            "title": "Nike Air Force 1 '07 Men's Shoes White Size 42",
            "brand": "Nike",
            "price": 110,
            "url": "https://shop-a.example/p/af1-white-42",
        },
    ],
    "productsB": [
        {
            "id": "B1",
            "title": "SONY WH1000XM5 Noise-Cancelling Bluetooth Headphones (Black)",
            "price": 329,
            "url": "https://shop-b.example/item/1",
        },
        {
            "id": "B2",
            "title": "iPhone 15 256 GB - Black - Apple",
            "price": 899,
            "url": "https://shop-b.example/item/2",
        },
        {
            "id": "B3",
            "title": "Apple iPhone 15 (128 GB) – Black",
            "price": 779,
            "url": "https://shop-b.example/item/3",
        },
        {
            "id": "B4",
            "title": "Samsung Galaxy S24 Ultra 256 Go Gris Titane",
            "price": 1249,
            "url": "https://shop-b.example/item/4",
        },
        {
            "id": "B5",
            "title": "Coca-Cola Original 330 ml can",
            "price": 0.99,
            "url": "https://shop-b.example/item/5",
        },
        {
            "id": "B6",
            "title": "L'Oreal Revitalift Laser X3 Anti-Ageing Day Cream 50 ml",
            "price": 21.99,
            "gtin": "03600523257461",
            "url": "https://shop-b.example/item/6",
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("freecamp008/product-matcher").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 '{
  "productsA": [
    {
      "id": "A1",
      "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones, Black",
      "brand": "Sony",
      "price": 349.99,
      "url": "https://shop-a.example/p/sony-wh1000xm5"
    },
    {
      "id": "A2",
      "title": "Apple iPhone 15 128GB Black",
      "brand": "Apple",
      "price": 799,
      "url": "https://shop-a.example/p/iphone-15-128-black"
    },
    {
      "id": "A3",
      "title": "Samsung Galaxy S24 Ultra 256GB Titanium Gray",
      "brand": "Samsung",
      "price": 1299.99,
      "url": "https://shop-a.example/p/s24-ultra-256"
    },
    {
      "id": "A4",
      "title": "Coca-Cola Original Taste 6 x 330ml cans",
      "brand": "Coca-Cola",
      "price": 4.99,
      "url": "https://shop-a.example/p/coke-6x330"
    },
    {
      "id": "A5",
      "title": "L'\''Oréal Paris Revitalift Laser X3 Day Cream 50ml",
      "brand": "L'\''Oréal Paris",
      "price": 24.9,
      "gtin": "3600523257461",
      "url": "https://shop-a.example/p/revitalift-laser"
    },
    {
      "id": "A6",
      "title": "Nike Air Force 1 '\''07 Men'\''s Shoes White Size 42",
      "brand": "Nike",
      "price": 110,
      "url": "https://shop-a.example/p/af1-white-42"
    }
  ],
  "productsB": [
    {
      "id": "B1",
      "title": "SONY WH1000XM5 Noise-Cancelling Bluetooth Headphones (Black)",
      "price": 329,
      "url": "https://shop-b.example/item/1"
    },
    {
      "id": "B2",
      "title": "iPhone 15 256 GB - Black - Apple",
      "price": 899,
      "url": "https://shop-b.example/item/2"
    },
    {
      "id": "B3",
      "title": "Apple iPhone 15 (128 GB) – Black",
      "price": 779,
      "url": "https://shop-b.example/item/3"
    },
    {
      "id": "B4",
      "title": "Samsung Galaxy S24 Ultra 256 Go Gris Titane",
      "price": 1249,
      "url": "https://shop-b.example/item/4"
    },
    {
      "id": "B5",
      "title": "Coca-Cola Original 330 ml can",
      "price": 0.99,
      "url": "https://shop-b.example/item/5"
    },
    {
      "id": "B6",
      "title": "L'\''Oreal Revitalift Laser X3 Anti-Ageing Day Cream 50 ml",
      "price": 21.99,
      "gtin": "03600523257461",
      "url": "https://shop-b.example/item/6"
    }
  ]
}' |
apify call freecamp008/product-matcher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,freecamp008/product-matcher"
        }
    }
}
```

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/78XsZcDaZgQnQFklf/builds/hu3GG3K39eUZUnk7Q/openapi.json
