# GTIN Price & Availability Comparison (`afkdigital/gtin-price-availability-comparison`) Actor

Compare GTIN/EAN/UPC offers from two authorized customer files. Preserve pack, shipping, tax, currency and dated availability evidence. No retailer scraping.

- **URL**: https://apify.com/afkdigital/gtin-price-availability-comparison.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 product 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

## GTIN Price & Availability Comparison

Compare observed offers by GTIN, EAN or UPC in **up to two customer-authorized JSON or CSV offer files**. Designed for supplier-export checks and n8n/Make workflows. V1 does not scrape retailers, query barcode registries, fetch URLs, or bypass access controls.

### What this Actor does

- Validates GTIN-8, GTIN-12/UPC-A, GTIN-13/EAN-13 and GTIN-14 formats and check digits.
- Preserves the original string and normalizes valid identifiers to 14 digits with leading zeros.
- Checks brand, model, pack quantity, variant, condition and unit/quantity conflicts.
- Emits one row per matching offer, including exclusions; invalid inputs and unmatched products receive diagnostic rows.
- Reports observed availability with the supplied observation time.
- Compares tax-inclusive item-plus-shipping totals only when evidence is complete.
- Supports direct, dated customer-supplied FX rates with provenance.
- Provides an optional title-candidate mode for manual review. Similar titles never establish product identity.

A valid check digit proves syntax, **not GS1 registration, ownership, authenticity or correct assignment**. The Actor does not infer pack quantities or variants from titles.

### Scope and permission

V1 contains **zero built-in external data providers**. It processes one or two files supplied in the input. It makes no outbound retailer requests; sourceUrl is a reference and is never fetched.

Before using an offer file, confirm:

1. You own the export, have the supplier's contractual permission, or hold a license that covers access and commercial processing in this workflow.
2. You may send it to Apify for processing and may use/export the resulting data.
3. Any contractual restrictions, personal-data obligations and downstream redistribution limits are satisfied.

Each offer file requires rightsConfirmed: true and a non-empty rightsBasis describing that basis. This is a **customer attestation**, not an independent license audit. A publicly reachable page or robots.txt allowance alone is not a commercial license. Files without the required attestation are not processed; the source error is reported. The included demo is self-authored synthetic data owned by AFK Digital and permitted for commercial testing; it is not a retailer snapshot. No contractual rights are asserted for any retailer.

permittedSources is reserved and must be empty. Remote file URLs, account passwords, cookies, proxies, live-feed adapters and paid external APIs are not supported.

### Quick start

Run the prefilled input to inspect the synthetic examples. An empty input also runs that demo, clearly identified by synthetic product names and example.invalid reference URLs.

For your own data, use gtins OR productsFile and replace offersFiles. Do not leave the demo product file when supplying gtins.

```json
{
  "gtins": ["036000291452"],
  "offersFiles": [{
    "name": "supplier-export.json",
    "format": "json",
    "rightsConfirmed": true,
    "rightsBasis": "Our supplier agreement permits commercial processing of this export through Apify.",
    "content": [{
      "gtin": "036000291452",
      "productTitle": "Customer supplied product title",
      "brand": "Customer supplied brand",
      "model": "Customer supplied model",
      "packQuantity": 1,
      "variant": "standard",
      "condition": "new",
      "unit": "each",
      "unitQuantity": 1,
      "seller": "Authorized supplier",
      "sourceUrl": "https://example.invalid/customer-reference",
      "itemPrice": "12.50",
      "shippingPrice": "2.00",
      "taxStatus": "included",
      "currency": "USD",
      "market": "US",
      "availability": "in_stock",
      "observedAt": "2026-11-19T12:00:00Z"
    }]
  }],
  "market": "US",
  "comparisonCurrency": "USD",
  "includeShipping": true,
  "matchMode": "gtin",
  "maxProducts": 100
}
```

This barcode is illustrative; the customer remains responsible for its real-world product assignment.

### Files and identity fields

File format: {name, format, content}. JSON content can be an array of row objects or a JSON-encoded array. CSV content is UTF-8 text with a header row. No URL download or local filesystem path is accepted.

Product rows use gtin and optional productTitle, brand, model, packQuantity, variant, condition, unit and unitQuantity. Supply these attributes to verify offers against an expected product definition. Alternatively gtins is an array of digit strings.

Offer rows use the fields in the example above. Additional sourceError and shippingCurrency fields are supported. Use numeric prices or plain decimal strings (no currency symbols or thousands separators). CSV barcode columns remain strings. Numeric GTIN values in JSON are rejected; a lost leading zero cannot be reconstructed safely.

- packQuantity: positive integer; no automatic pack-to-unit price division.
- variant: explicit value, e.g. red-medium or standard; never inferred from a title.
- condition: new, used or refurbished.
- unit and unitQuantity: explicit measured basis, e.g. each/1 or ml/500. Units must match as supplied; no automatic unit conversions.
- Missing pack, variant, condition or measurement fields prevent a complete total.
- When input identity fields are absent, conflicting values among exact-GTIN offers exclude the affected offers. attributeVerification discloses when input attributes are incomplete.

With matchMode=title_candidates, a title similarity threshold of 0.80 can produce candidates only when an offer has no GTIN. Candidate confidence is capped at 0.50. A populated different or invalid GTIN is never overridden with a title match. Candidate rows always require manual verification and have comparableTotal=null.

### Prices, shipping, taxes and FX

comparableTotal is itemPrice plus shippingPrice in comparisonCurrency, only for exact matches with complete identity/cost/availability evidence.

taxStatus must be included or not_applicable. Excluded or unknown tax prevents a definitive total. Unknown shipping is never treated as zero. includeShipping=false returns itemSubtotal and a shipping-excluded scope label; comparableTotal stays null. Shipping must use the item's currency.

The original currency and prices remain unchanged. For cross-currency comparison, provide a direct positive rate with an explicit timestamp and source:

```json
{"optionalExchangeRates":[{"from":"EUR","to":"USD","rate":1.08,"asOf":"2026-11-19T00:00:00Z","source":"Customer treasury table"}]}
```

No live rates are fetched; undated/future rates are rejected. The latest valid direct rate is used, without inversion or triangulation. Old rates remain dated and visible; users decide whether their age is suitable. Rate provenance supplied by a customer is not independently verified. If comparisonCurrency is omitted, native-currency totals remain separate; mixed currencies never form a complete comparison.

No profit, arbitrage guarantee or net margin is calculated. Marketplace commissions, delivery timing, returns, duties and other unprovided expenses are not inferred. A lower observed offer is not a guaranteed executable purchase.

### Availability and errors

Supported observations: in_stock, out_of_stock, preorder, unknown, unavailable. A valid timezone-aware observedAt is required. Old observations retain their original dates; they are not described as live stock. Missing/invalid dates yield unknown availability. sourceError forces unknown availability; a failed observation is never interpreted as out_of_stock.

The default Dataset contains the requested identity, seller, source URL, prices, taxes, currency, total, availability, observation, match and exclusion fields. Additional identity and FX fields support auditing.

The run's key-value store SUMMARY includes source scope, per-file errors, invalid offer barcodes, truncation, product counts, bounds and zero live retailer requests. productComparisonStatus is complete only when at least two fully comparable offers exist in one currency, with no file errors or truncation. Otherwise it is partial_or_not_comparable. Per-row exclusions can include packQuantity_mismatch, unknown_shipping, no_dated_exchange_rate and title_candidate_requires_manual_verification. Unmatched products are no_matching_offer, not out of stock.

### Limits and billing

- Up to 500 input products per run, bounded by maxProducts (default 100).
- Up to two offer files, 2 MB JSON-encoded content and 10,000 rows each.
- At most 100 matching offer rows from each file per product: **200 offer rows per comparison**. Overflow is reported and comparison status becomes partial.
- Timeout: 240 seconds; default memory: 256 MB. The default demo needs no paid external service.

Pay-Per-Event event: **product-comparison**, one unique product with at least one matched offer, including any excluded matched offers. Up to two files / 200 offer rows are included. Title candidates are explicitly labeled. Invalid barcodes, unmatched products, file failures without matched offers, diagnostic Dataset rows and retries do not create additional charge events. Duplicate GTINs are charged at most once per run. A separately started new run is a new comparison, not a retry of the prior run.

Charging occurs after results are saved. A persisted charge-attempt marker and an idempotency key prevent charging the same product again after a retry or resurrection. In an ambiguous crash, the Actor favors a missed charge over a duplicate charge. It stops after reaching the configured spending limit. Automatic Dataset-item and Actor-start charge events must be disabled for this single-event pricing definition.

**Price: USD 0.005 per product-comparison event (USD 5 per 1,000 comparisons).** Platform usage is included, with no separate startup or Dataset-row event. Public availability follows the actual Store listing status.

### n8n example

The repository includes examples/n8n-workflow.json (importable starter). Replace ACTOR_ID in its HTTP Request URL. Attach an HTTP Header Auth credential containing Authorization: Bearer YOUR_APIFY_TOKEN. The request sends inline JSON files; use a prior file-read/conversion node to replace demo content with authorized exports. Do not hardcode a token in a shared workflow.

It uses the synchronous Dataset endpoint for short runs. For production batches, use POST /v2/acts/ACTOR_ID/runs, poll GET /v2/actor-runs/RUN_ID until SUCCEEDED, then GET /v2/datasets/DEFAULT_DATASET_ID/items. Fail/timeout branches must inspect status and logs. SUMMARY is available at /v2/key-value-stores/DEFAULT_KEY_VALUE_STORE_ID/records/SUMMARY.

### Make example

See examples/make-example.json for exact module mappings:

1. Read your authorized CSV/JSON from your storage.
2. HTTP > Make a request: POST https://api.apify.com/v2/acts/ACTOR_ID/runs with Authorization header, application/json body and the Actor input.
3. Poll GET https://api.apify.com/v2/actor-runs/RUN_ID. Continue only after SUCCEEDED; handle FAILED/TIMED-OUT/ABORTED explicitly.
4. Fetch defaultDatasetId items and route exclusionReason != null to a review sheet. Read SUMMARY for source errors.

The Make file is a configuration recipe, not a claimed account-specific importable scenario.

### Development and validation

Python 3.13, Apify SDK 4.3.0. Dockerfile and schemas are included. The comparison engine is network-free and uses Decimal for arithmetic. Run: python -m unittest -v test_comparison test_billing test_default_input.

Tests cover malformed identifiers, leading zeros, invalid check digits, packs, variants, conditions, units, unknown shipping/taxes, currency conversion evidence, title candidates, source failures, dated availability, permission assertions, file/offer limits and retry billing. Cloud run evidence and measured cost are saved separately for the release decision.

# Actor input Schema

## `gtins` (type: `array`):

GTIN-8, UPC-A/GTIN-12, EAN-13 or GTIN-14; preserve leading zeros. Use instead of productsFile.

## `productsFile` (type: `object`):

Inline file: {name, format: json|csv, content: row array or UTF-8 text}. Product rows: gtin (string), productTitle and optional identity attributes. Use instead of gtins.

## `offersFiles` (type: `array`):

Each file: {name, format: json|csv, content, rightsConfirmed: true, rightsBasis}. Max 2 MB and 10,000 rows each. See README for columns and permission requirements.

## `permittedSources` (type: `array`):

Must be empty in v1. No verified live adapters are shipped.

## `market` (type: `string`):

Destination-market code. Offers without the same market are excluded.

## `comparisonCurrency` (type: `string`):

ISO-style uppercase 3-letter code. Different currencies require dated direct rates; no automatic FX download.

## `optionalExchangeRates` (type: `array`):

\[{from:"EUR",to:"USD",rate:1.08,asOf:"2026-11-19T00:00:00Z",source:"Customer treasury table"}]. Supplied provenance is reported, not independently verified.

## `includeShipping` (type: `boolean`):

True requires known shipping for comparableTotal. False emits itemSubtotal only and leaves comparableTotal null.

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

Hard cap 500. At most 100 offer rows per file per product (200 total).

## `matchMode` (type: `string`):

Title candidates have confidence 0.5 and never receive a comparableTotal. Different/invalid populated GTINs are never title-matched.

## Actor input object example

```json
{
  "productsFile": {
    "name": "products.json",
    "format": "json",
    "content": [
      {
        "gtin": "1234567000015",
        "productTitle": "Synthetic demo product 1",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000022",
        "productTitle": "Synthetic demo product 2",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000039",
        "productTitle": "Synthetic demo product 3",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000046",
        "productTitle": "Synthetic demo product 4",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000053",
        "productTitle": "Synthetic demo product 5",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000060",
        "productTitle": "Synthetic demo product 6",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "productTitle": "Synthetic candidate product",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "5901234123458",
        "productTitle": "Invalid check digit"
      }
    ]
  },
  "offersFiles": [
    {
      "name": "authorized-demo-a.json",
      "format": "json",
      "content": [
        {
          "gtin": "1234567000015",
          "productTitle": "Synthetic demo product 1",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 10,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000022",
          "productTitle": "Synthetic demo product 2",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 11,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000039",
          "productTitle": "Synthetic demo product 3",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 12,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000046",
          "productTitle": "Synthetic demo product 4",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 13,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000053",
          "productTitle": "Synthetic demo product 5",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 14,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000060",
          "productTitle": "Synthetic demo product 6",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 15,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "productTitle": "Synthetic candidate product",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 16,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        }
      ],
      "rightsConfirmed": true,
      "rightsBasis": "Self-authored synthetic fixtures owned by AFK Digital; commercial processing and redistribution permitted."
    },
    {
      "name": "authorized-demo-b.json",
      "format": "json",
      "content": [
        {
          "gtin": "1234567000015",
          "productTitle": "Synthetic demo product 1",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 9,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000022",
          "productTitle": "Synthetic demo product 2",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 6,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 10,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000039",
          "productTitle": "Synthetic demo product 3",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 11,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000046",
          "productTitle": "Synthetic demo product 4",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 12,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "EUR",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000053",
          "productTitle": "Synthetic demo product 5",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 13,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "unavailable",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US",
          "sourceError": "Customer reported a failed observation; no live request was made"
        },
        {
          "gtin": "1234567000060",
          "productTitle": "Synthetic demo product 6",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 14,
          "shippingPrice": 1,
          "taxStatus": "unknown",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "productTitle": "Synthetic candidate product extra",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 15,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        }
      ],
      "rightsConfirmed": true,
      "rightsBasis": "Self-authored synthetic fixtures owned by AFK Digital; commercial processing and redistribution permitted."
    }
  ],
  "permittedSources": [],
  "market": "US",
  "comparisonCurrency": "USD",
  "optionalExchangeRates": [],
  "includeShipping": true,
  "maxProducts": 100,
  "matchMode": "title_candidates"
}
```

# Actor output Schema

## `offers` (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 = {
    "productsFile": {
        "name": "products.json",
        "format": "json",
        "content": [
            {
                "gtin": "1234567000015",
                "productTitle": "Synthetic demo product 1",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1
            },
            {
                "gtin": "1234567000022",
                "productTitle": "Synthetic demo product 2",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1
            },
            {
                "gtin": "1234567000039",
                "productTitle": "Synthetic demo product 3",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1
            },
            {
                "gtin": "1234567000046",
                "productTitle": "Synthetic demo product 4",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1
            },
            {
                "gtin": "1234567000053",
                "productTitle": "Synthetic demo product 5",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1
            },
            {
                "gtin": "1234567000060",
                "productTitle": "Synthetic demo product 6",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1
            },
            {
                "productTitle": "Synthetic candidate product",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1
            },
            {
                "gtin": "5901234123458",
                "productTitle": "Invalid check digit"
            }
        ]
    },
    "offersFiles": [
        {
            "name": "authorized-demo-a.json",
            "format": "json",
            "content": [
                {
                    "gtin": "1234567000015",
                    "productTitle": "Synthetic demo product 1",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 10,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000022",
                    "productTitle": "Synthetic demo product 2",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 11,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000039",
                    "productTitle": "Synthetic demo product 3",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 12,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000046",
                    "productTitle": "Synthetic demo product 4",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 13,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000053",
                    "productTitle": "Synthetic demo product 5",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 14,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000060",
                    "productTitle": "Synthetic demo product 6",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 15,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "productTitle": "Synthetic candidate product",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 16,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                }
            ],
            "rightsConfirmed": true,
            "rightsBasis": "Self-authored synthetic fixtures owned by AFK Digital; commercial processing and redistribution permitted."
        },
        {
            "name": "authorized-demo-b.json",
            "format": "json",
            "content": [
                {
                    "gtin": "1234567000015",
                    "productTitle": "Synthetic demo product 1",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 9,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000022",
                    "productTitle": "Synthetic demo product 2",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 6,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 10,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000039",
                    "productTitle": "Synthetic demo product 3",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 11,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000046",
                    "productTitle": "Synthetic demo product 4",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 12,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "EUR",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "gtin": "1234567000053",
                    "productTitle": "Synthetic demo product 5",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 13,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "unavailable",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                    "sourceError": "Customer reported a failed observation; no live request was made"
                },
                {
                    "gtin": "1234567000060",
                    "productTitle": "Synthetic demo product 6",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 14,
                    "shippingPrice": 1,
                    "taxStatus": "unknown",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                },
                {
                    "productTitle": "Synthetic candidate product extra",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 15,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US"
                }
            ],
            "rightsConfirmed": true,
            "rightsBasis": "Self-authored synthetic fixtures owned by AFK Digital; commercial processing and redistribution permitted."
        }
    ],
    "market": "US",
    "comparisonCurrency": "USD",
    "matchMode": "title_candidates"
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/gtin-price-availability-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 = {
    "productsFile": {
        "name": "products.json",
        "format": "json",
        "content": [
            {
                "gtin": "1234567000015",
                "productTitle": "Synthetic demo product 1",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1,
            },
            {
                "gtin": "1234567000022",
                "productTitle": "Synthetic demo product 2",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1,
            },
            {
                "gtin": "1234567000039",
                "productTitle": "Synthetic demo product 3",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1,
            },
            {
                "gtin": "1234567000046",
                "productTitle": "Synthetic demo product 4",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1,
            },
            {
                "gtin": "1234567000053",
                "productTitle": "Synthetic demo product 5",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1,
            },
            {
                "gtin": "1234567000060",
                "productTitle": "Synthetic demo product 6",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1,
            },
            {
                "productTitle": "Synthetic candidate product",
                "brand": "Synthetic Demo",
                "model": "D1",
                "packQuantity": 1,
                "variant": "standard",
                "condition": "new",
                "unit": "each",
                "unitQuantity": 1,
            },
            {
                "gtin": "5901234123458",
                "productTitle": "Invalid check digit",
            },
        ],
    },
    "offersFiles": [
        {
            "name": "authorized-demo-a.json",
            "format": "json",
            "content": [
                {
                    "gtin": "1234567000015",
                    "productTitle": "Synthetic demo product 1",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 10,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000022",
                    "productTitle": "Synthetic demo product 2",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 11,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000039",
                    "productTitle": "Synthetic demo product 3",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 12,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000046",
                    "productTitle": "Synthetic demo product 4",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 13,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000053",
                    "productTitle": "Synthetic demo product 5",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 14,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000060",
                    "productTitle": "Synthetic demo product 6",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 15,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "productTitle": "Synthetic candidate product",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller A",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 16,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
            ],
            "rightsConfirmed": True,
            "rightsBasis": "Self-authored synthetic fixtures owned by AFK Digital; commercial processing and redistribution permitted.",
        },
        {
            "name": "authorized-demo-b.json",
            "format": "json",
            "content": [
                {
                    "gtin": "1234567000015",
                    "productTitle": "Synthetic demo product 1",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 9,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000022",
                    "productTitle": "Synthetic demo product 2",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 6,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 10,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000039",
                    "productTitle": "Synthetic demo product 3",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 11,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000046",
                    "productTitle": "Synthetic demo product 4",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 12,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "EUR",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "gtin": "1234567000053",
                    "productTitle": "Synthetic demo product 5",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 13,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "unavailable",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                    "sourceError": "Customer reported a failed observation; no live request was made",
                },
                {
                    "gtin": "1234567000060",
                    "productTitle": "Synthetic demo product 6",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 14,
                    "shippingPrice": 1,
                    "taxStatus": "unknown",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
                {
                    "productTitle": "Synthetic candidate product extra",
                    "brand": "Synthetic Demo",
                    "model": "D1",
                    "packQuantity": 1,
                    "variant": "standard",
                    "condition": "new",
                    "unit": "each",
                    "unitQuantity": 1,
                    "seller": "Demo seller B",
                    "sourceUrl": "https://example.invalid/self-authored-demo",
                    "itemPrice": 15,
                    "shippingPrice": 1,
                    "taxStatus": "included",
                    "currency": "USD",
                    "availability": "in_stock",
                    "observedAt": "2026-11-19T12:00:00Z",
                    "market": "US",
                },
            ],
            "rightsConfirmed": True,
            "rightsBasis": "Self-authored synthetic fixtures owned by AFK Digital; commercial processing and redistribution permitted.",
        },
    ],
    "market": "US",
    "comparisonCurrency": "USD",
    "matchMode": "title_candidates",
}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/gtin-price-availability-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 '{
  "productsFile": {
    "name": "products.json",
    "format": "json",
    "content": [
      {
        "gtin": "1234567000015",
        "productTitle": "Synthetic demo product 1",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000022",
        "productTitle": "Synthetic demo product 2",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000039",
        "productTitle": "Synthetic demo product 3",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000046",
        "productTitle": "Synthetic demo product 4",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000053",
        "productTitle": "Synthetic demo product 5",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "1234567000060",
        "productTitle": "Synthetic demo product 6",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "productTitle": "Synthetic candidate product",
        "brand": "Synthetic Demo",
        "model": "D1",
        "packQuantity": 1,
        "variant": "standard",
        "condition": "new",
        "unit": "each",
        "unitQuantity": 1
      },
      {
        "gtin": "5901234123458",
        "productTitle": "Invalid check digit"
      }
    ]
  },
  "offersFiles": [
    {
      "name": "authorized-demo-a.json",
      "format": "json",
      "content": [
        {
          "gtin": "1234567000015",
          "productTitle": "Synthetic demo product 1",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 10,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000022",
          "productTitle": "Synthetic demo product 2",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 11,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000039",
          "productTitle": "Synthetic demo product 3",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 12,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000046",
          "productTitle": "Synthetic demo product 4",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 13,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000053",
          "productTitle": "Synthetic demo product 5",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 14,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000060",
          "productTitle": "Synthetic demo product 6",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 15,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "productTitle": "Synthetic candidate product",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller A",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 16,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        }
      ],
      "rightsConfirmed": true,
      "rightsBasis": "Self-authored synthetic fixtures owned by AFK Digital; commercial processing and redistribution permitted."
    },
    {
      "name": "authorized-demo-b.json",
      "format": "json",
      "content": [
        {
          "gtin": "1234567000015",
          "productTitle": "Synthetic demo product 1",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 9,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000022",
          "productTitle": "Synthetic demo product 2",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 6,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 10,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000039",
          "productTitle": "Synthetic demo product 3",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 11,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000046",
          "productTitle": "Synthetic demo product 4",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 12,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "EUR",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "gtin": "1234567000053",
          "productTitle": "Synthetic demo product 5",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 13,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "unavailable",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US",
          "sourceError": "Customer reported a failed observation; no live request was made"
        },
        {
          "gtin": "1234567000060",
          "productTitle": "Synthetic demo product 6",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 14,
          "shippingPrice": 1,
          "taxStatus": "unknown",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        },
        {
          "productTitle": "Synthetic candidate product extra",
          "brand": "Synthetic Demo",
          "model": "D1",
          "packQuantity": 1,
          "variant": "standard",
          "condition": "new",
          "unit": "each",
          "unitQuantity": 1,
          "seller": "Demo seller B",
          "sourceUrl": "https://example.invalid/self-authored-demo",
          "itemPrice": 15,
          "shippingPrice": 1,
          "taxStatus": "included",
          "currency": "USD",
          "availability": "in_stock",
          "observedAt": "2026-11-19T12:00:00Z",
          "market": "US"
        }
      ],
      "rightsConfirmed": true,
      "rightsBasis": "Self-authored synthetic fixtures owned by AFK Digital; commercial processing and redistribution permitted."
    }
  ],
  "market": "US",
  "comparisonCurrency": "USD",
  "matchMode": "title_candidates"
}' |
apify call afkdigital/gtin-price-availability-comparison --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/gtin-price-availability-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/XMybvHa2X7D14l5pr/builds/kl29bjfYahwfb8Su0/openapi.json
