# Unit Price Checker for Grocery & Retail Listings (`ultimatemc/unit-price-checker`) Actor

Check grocery and retail product data for unit price problems: parses sizes like 6 x 330 ml, 12 fl oz or 1.5 kg, recomputes the price per kg, litre or item, and flags missing or wrong unit prices, unit prices left on the old price, and Germany's per 1 kg / 1 l rule.

- **URL**: https://apify.com/ultimatemc/unit-price-checker.md
- **Developed by:** [Ultimate Foresight Inc](https://apify.com/ultimatemc) (community)
- **Categories:** E-commerce, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

Check **grocery and retail product data for unit price problems**. The **Unit Price Checker** parses pack sizes like **"6 x 330 ml"**, **"12 pack 12 fl oz"**, **"1.5kg"** or **"500 g (pack of 4)"**, recomputes the **price per kg, litre, 100 g or item**, and flags **missing unit prices**, **unit prices that don't match** the selling price, **unit prices still based on the old price** during a promotion, and **Germany's per 1 kg / 1 l rule** under PAngV §4. Works with **Tesco, Coles, Woolworths, Aldi, Lidl, Rewe, Carrefour, Walmart and Kroger** scraper output. Click **Start** with the prefilled example to see it work.

> This is an automated check of the price and size data you supply. Sizes are parsed from text and can be misread, and unit-pricing rules differ by country and US state. Findings are possible gaps, not a legal determination. Not legal advice; every row carries this disclaimer and a timestamp.

### What does the Unit Price Checker do?

- ✅ **Unit price mismatch**: the shown unit price differs from price divided by size by more than your tolerance (2% by default; high above 5%).
- ✅ **Unit price from the old price**: the unit price matches the regular or 'was' price instead of the current price.
- ✅ **Missing unit price**: medium in EU, UK and DE markets, where it's required for goods sold by weight or volume; low elsewhere.
- ✅ **Basis mismatch** (e.g. a per-kg unit price on a product sold by the litre) and **Germany's PAngV §4** rule that unit prices use 1 kg or 1 l (not 100 g) since May 28, 2022.
- ✅ **Size parsing** for metric and US units, multipacks and counts, with the parsed size in the output so you can spot misreads.
- ✅ Output per row: `price`, `sizeParsed`, `shownUnitPrice`, `computedUnitPrice`, `computedUnitPriceBasis`, `riskLevel`, `issueCount`, `categoriesFlagged`, `issues` (`ruleId`, `severity`, `message`, `quote`, `sourceUrl`, `fixHint`), `checkedAt` and a disclaimer.

### Who is it for?

- **Grocery and retail e-commerce teams** checking catalog feeds before they go live.
- **Price comparison and grocery data companies** cleaning scraped price data.
- **Consumer groups and journalists** looking for misleading unit prices and promotions.
- **Retail analysts** comparing value per kg or litre across stores.

### How to check unit prices in product data

1. Click **Start** with the prefilled example (a wrong per-kg price, a correct multipack, a German per-100 g price, a promo using the old price and a US pack with no unit price).
2. Replace **Products** with your own: `title`, `price`, optional `size`, `unitPrice` as shown, `regularPrice` and `market`.
3. Or enter a **Dataset ID** from a supermarket scraper; use **Field map** for fields like `CupString` or `PackageSize`.
4. Set **Default market** and **Mismatch tolerance** if needed, and turn on **Only save rows with findings** to pay only for problem rows.
5. Export results as CSV, Excel or JSON, or fetch them through the API.

### Input example

This is the prefilled input:

```json
{
  "products": [
    {
      "id": "EXAMPLE-RICE",
      "title": "Example basmati rice 1.5kg",
      "price": 4.5,
      "unitPrice": "£3.50/kg",
      "market": "UK"
    },
    {
      "id": "EXAMPLE-COLA",
      "title": "Example cola 6 x 330ml",
      "price": "€3.96",
      "unitPrice": "€2.00 / l",
      "market": "FR"
    },
    {
      "id": "EXAMPLE-COFFEE",
      "title": "Example ground coffee 500 g",
      "price": "5,99 €",
      "unitPrice": "1,20 € / 100 g",
      "market": "DE"
    },
    {
      "id": "EXAMPLE-CEREAL",
      "title": "Example corn flakes 500g",
      "price": 2.0,
      "regularPrice": 3.0,
      "unitPrice": "£6.00/kg",
      "market": "UK"
    },
    {
      "id": "EXAMPLE-WATER",
      "title": "Example sparkling water, 12 pack 12 fl oz cans",
      "price": 5.49,
      "market": "US"
    }
  ]
}
```

Dataset mode:

```json
{"datasetId": "YOUR_DATASET_ID", "fieldMap": {"unitPrice": "CupString", "size": "PackageSize", "title": "DisplayName"}, "market": "AU", "onlyFlagged": true}
```

### Output example

Real output from a run of the prefilled input on 2026-11-01 (long finding lists are shortened here; the run returns all of them):

```json
[
  {
    "itemNo": 1,
    "productId": "EXAMPLE-RICE",
    "title": "Example basmati rice 1.5kg",
    "price": 4.5,
    "sizeParsed": "1.5kg",
    "netQuantity": 1500,
    "baseUnit": "g",
    "shownUnitPrice": {
      "amount": 3.5,
      "basisQty": 1000,
      "base": "g",
      "label": "per kg"
    },
    "computedUnitPrice": 3,
    "computedUnitPriceBasis": "per kg",
    "market": "UK",
    "riskLevel": "high",
    "issueCount": 1,
    "categoriesFlagged": [
      "unit_price_mismatch"
    ],
    "issues": [
      {
        "ruleId": "unit_price_mismatch",
        "severity": "high",
        "message": "Shown unit price 3.50 per kg differs by +16.7% from price 4.5 / size 1.5kg = 3.00 per kg.",
        "sourceUrl": "https://www.legislation.gov.uk/uksi/2004/102/contents",
        "fixHint": "Check the net quantity and recompute the unit price."
      }
    ],
    "url": null,
    "checkedAt": "2026-11-01T19:35:04+00:00",
    "disclaimer": "Automated check of the price and size data supplied. Sizes are parsed from text and can..."
  },
  {
    "itemNo": 2,
    "productId": "EXAMPLE-COLA",
    "title": "Example cola 6 x 330ml",
    "price": 3.96,
    "sizeParsed": "6 x 330 ml",
    "netQuantity": 1980,
    "baseUnit": "ml",
    "shownUnitPrice": {
      "amount": 2,
      "basisQty": 1000,
      "base": "ml",
      "label": "per l"
    },
    "computedUnitPrice": 2,
    "computedUnitPriceBasis": "per l",
    "market": "FR",
    "riskLevel": "none found",
    "issueCount": 0,
    "categoriesFlagged": [],
    "issues": [],
    "url": null,
    "checkedAt": "2026-11-01T19:35:04+00:00",
    "disclaimer": "Automated check of the price and size data supplied. Sizes are parsed from text and can..."
  },
  {
    "itemNo": 3,
    "productId": "EXAMPLE-COFFEE",
    "title": "Example ground coffee 500 g",
    "price": 5.99,
    "sizeParsed": "500 g",
    "netQuantity": 500,
    "baseUnit": "g",
    "shownUnitPrice": {
      "amount": 1.2,
      "basisQty": 100,
      "base": "g",
      "label": "per 100 g"
    },
    "computedUnitPrice": 1.198,
    "computedUnitPriceBasis": "per 100 g",
    "market": "DE",
    "riskLevel": "medium",
    "issueCount": 1,
    "categoriesFlagged": [
      "unit_basis_not_allowed_de"
    ],
    "issues": [
      {
        "ruleId": "unit_basis_not_allowed_de",
        "severity": "medium",
        "message": "Unit price is given per 100 g. Since May 28, 2022 Germany's PAngV §4 requires the price per 1 kg or 1 l (per 100 g / 100 ml is no longer allowed).",
        "sourceUrl": "https://www.gesetze-im-internet.de/pangv_2022/__4.html",
        "fixHint": "Show the price per 1 kg."
      }
    ],
    "url": null,
    "checkedAt": "2026-11-01T19:35:04+00:00",
    "disclaimer": "Automated check of the price and size data supplied. Sizes are parsed from text and can..."
  },
  {
    "itemNo": 4,
    "productId": "EXAMPLE-CEREAL",
    "title": "Example corn flakes 500g",
    "price": 2,
    "sizeParsed": "500g",
    "netQuantity": 500,
    "baseUnit": "g",
    "shownUnitPrice": {
      "amount": 6,
      "basisQty": 1000,
      "base": "g",
      "label": "per kg"
    },
    "computedUnitPrice": 4,
    "computedUnitPriceBasis": "per kg",
    "market": "UK",
    "riskLevel": "high",
    "issueCount": 1,
    "categoriesFlagged": [
      "unit_price_from_old_price"
    ],
    "issues": [
      {
        "ruleId": "unit_price_from_old_price",
        "severity": "high",
        "message": "Shown unit price 6.00 per kg matches the regular price 3, not the current price 2 (expected about 4.00). The unit price should follow the selling price.",
        "sourceUrl": "https://www.legislation.gov.uk/uksi/2004/102/contents",
        "fixHint": "Update the unit price to 4.00 per kg."
      }
    ],
    "url": null,
    "checkedAt": "2026-11-01T19:35:04+00:00",
    "disclaimer": "Automated check of the price and size data supplied. Sizes are parsed from text and can..."
  },
  {
    "itemNo": 5,
    "productId": "EXAMPLE-WATER",
    "title": "Example sparkling water, 12 pack 12 fl oz cans",
    "price": 5.49,
    "sizeParsed": "12 x 12 fl oz",
    "netQuantity": 4258.5883,
    "baseUnit": "ml",
    "shownUnitPrice": null,
    "computedUnitPrice": 1.2892,
    "computedUnitPriceBasis": "per l",
    "market": "US",
    "riskLevel": "low",
    "issueCount": 1,
    "categoriesFlagged": [
      "unit_price_missing"
    ],
    "issues": [
      {
        "ruleId": "unit_price_missing",
        "severity": "low",
        "message": "No unit price shown. Many US states require or regulate unit pricing (NIST Handbook 130 Uniform Unit Pricing Regulation); it's also how shoppers compare sizes.",
        "sourceUrl": "https://www.nist.gov/pml/owm/nist-handbook-130-current-edition",
        "fixHint": "Show the unit price, e.g. 1.29 per l."
      }
    ],
    "url": null,
    "checkedAt": "2026-11-01T19:35:04+00:00",
    "disclaimer": "Automated check of the price and size data supplied. Sizes are parsed from text and can..."
  }
]
```

### How much does it cost to check unit prices?

This Actor uses pay-per-event pricing: **$0.001 per product saved** plus a **$0.00005 start fee per run**, plus small platform usage paid by you (a few hundredths of a cent for small runs). That's about **$1.00 for 1,000 products** and **$10.00 for 10,000** plus usage. With **Only save rows with findings** on, rows without findings aren't saved or charged. You can set a maximum cost per run in the run options.

### Use it through the API, integrations or AI agents

- Run it and get results in one call: `https://api.apify.com/v2/acts/ultimatemc~unit-price-checker/run-sync-get-dataset-items`
- Use it from AI agents through the Apify MCP server: `https://mcp.apify.com?tools=ultimatemc/unit-price-checker`
- Schedule it after a daily scraper run, send flagged rows to Slack or email with webhooks, or connect it to Make, Zapier, n8n or Google Sheets.
- Chain it after a supermarket scraper by passing the scraper's dataset ID.

### How it works

Prices and sizes are parsed from numbers or text in any common format ("£1.20/kg", "2,49 €/1 kg", "$0.18/fl oz"), converted to a common unit, and compared. Rules were written from the EU Price Indication Directive, the UK Price Marking Order, Germany's PAngV §4 and NIST Handbook 130, checked on 2026-11-01. No AI and no external calls.

Sources:

- [EUR-Lex: Directive 98/6/EC on price indication](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:31998L0006)
- [legislation.gov.uk: The Price Marking Order 2004](https://www.legislation.gov.uk/uksi/2004/102/contents)
- [gesetze-im-internet.de: PAngV §4 Grundpreis](https://www.gesetze-im-internet.de/pangv_2022/__4.html)
- [NIST: Handbook 130, current edition](https://www.nist.gov/pml/owm/nist-handbook-130-current-edition)

### FAQ

#### Is unit pricing required in the US?

There's no federal rule; some states and cities require it and NIST Handbook 130 gives a model regulation. US rows missing a unit price get a low note.

#### Why is a German per-100 g price flagged?

Since May 28, 2022 PAngV §4 requires the unit price per 1 kg or 1 l in Germany (exceptions apply, for example for some small items).

#### What if the size isn't in my data?

The checker looks for it in the title too. If it can't find one, the row gets a 'size not found' note.

#### Can I loosen the comparison?

Yes. Set **Mismatch tolerance (%)** to allow for rounding.

#### Is it AI?

No. It's a fixed set of rules, so the same input always gives the same result.

### Limitations

- Sizes are parsed from text and can be misread on unusual formats; check `sizeParsed`.
- Drained weight, per-wash or per-sheet bases aren't computed.
- Country rules are simplified to the main cases.

### Other tools by Ultimate Foresight

- [Amazon Listing Policy Checker for Titles & Bullets](https://apify.com/ultimatemc/amazon-listing-policy-checker): flags pesticide, FDA and disease claims and Amazon title and bullet rule breaks in bulk, with policy links and fixes.
- [Fair Housing Listing Checker for Real Estate Ads](https://apify.com/ultimatemc/fair-housing-listing-checker): flags rental and sale listing wording that may raise Fair Housing Act issues, with HUD sources and rewrite tips (screening aid only).
- [Ad Copy Policy Checker for Meta, Google & TikTok](https://apify.com/ultimatemc/ad-copy-policy-checker): checks ad text against Facebook, Instagram, Google Ads and TikTok ad policies before you submit.
- [H-1B Visa Sponsor Checker & Score for Job Listings](https://apify.com/ultimatemc/h1b-visa-sponsor-score): adds Department of Labor H-1B sponsorship history and a 0-100 score to company names or job listings.
- [Chain vs Independent Labeler for Google Maps Leads](https://apify.com/ultimatemc/chain-vs-independent-labeler): labels local businesses as chain, franchise or independent.
- [YouTube Monetization Checker for Scripts & Titles](https://apify.com/ultimatemc/youtube-script-monetization-checker): pre-checks titles, descriptions and scripts for wording that leads to limited or no ads.
- [Etsy & eBay Listing Policy & Banned Item Checker](https://apify.com/ultimatemc/etsy-ebay-listing-policy-checker): pre-checks marketplace listings for prohibited items, counterfeit wording and off-platform contact.
- [Job Scam Detector & Trust Score for Job Postings](https://apify.com/ultimatemc/job-posting-trust-score): scores job postings 0-100 for scam and ghost-job signals.
- [SAM.gov Amendment & Opportunity Change Tracker](https://apify.com/ultimatemc/sam-gov-opportunity-change-detector): shows what changed between versions of a SAM.gov notice: deadlines, set-asides, NAICS and attachments.
- [Product Recall Checker for Brands, UPCs & Products](https://apify.com/ultimatemc/product-recall-matcher): matches your brands, products, UPCs or model numbers against CPSC, FDA and NHTSA recalls.
- [App Store & Google Play Listing Policy Checker](https://apify.com/ultimatemc/app-store-listing-policy-checker): pre-checks app names, subtitles and descriptions against Apple and Google Play metadata rules.
- [Company Name Normalizer & Deduplicator for CRM](https://apify.com/ultimatemc/company-name-canonicalizer): cleans company names (Inc, LLC, d/b/a, aliases) and groups duplicates in CRM, lead or vendor lists.
- [FCC Covered List & Section 889 Bulk Screener](https://apify.com/ultimatemc/fcc-covered-list-screener): screens FCC IDs and brand names against the public FCC Covered List, with sources and timestamps (screening aid only).
- [Green Claims Checker: EU Greenwashing Ban & FTC](https://apify.com/ultimatemc/green-claims-checker): flags risky eco-friendly, carbon neutral and recyclable wording under EU, FTC and UK CMA rules.
- [Influencer #ad Disclosure Checker: FTC & ASA](https://apify.com/ultimatemc/influencer-ad-disclosure-checker): flags influencer posts with missing or unclear #ad labels under FTC, ASA/CAP and CMA rules.
- [Job Title to SOC Code Mapper with O\*NET Data](https://apify.com/ultimatemc/job-title-soc-code-mapper): maps job titles to SOC and O\*NET-SOC codes in bulk, with seniority and tech skills found in the posting.
- [Shrinkflation Detector for Grocery Price Data](https://apify.com/ultimatemc/shrinkflation-detector): finds smaller packs at the same or higher price by comparing two runs of a grocery scraper, with unit price before and after.
- [Job Ad Discrimination Checker for Job Posts (US)](https://apify.com/ultimatemc/job-ad-discrimination-checker): flags age, sex, national origin, citizenship and other discriminatory wording in job posts, with EEOC and DOJ sources (screening aid only).
- [Walmart Listing Policy Checker for Titles & Copy](https://apify.com/ultimatemc/walmart-listing-policy-checker): flags promotional phrases, retailer names, URLs, long titles and pesticide or FDA claims in Walmart Marketplace listings, with policy links and fixes.
- [TikTok Shop Listing Policy Checker for Products](https://apify.com/ultimatemc/tiktok-shop-listing-policy-checker): flags off-platform links, dupe wording, weight-loss, disease and FDA claims and title rule breaks in TikTok Shop listings.
- [Supplement & Cosmetic Claims Checker: FDA & FTC](https://apify.com/ultimatemc/supplement-cosmetic-claims-checker): flags disease, drug and 'FDA approved' claims and missing supplement disclaimers in supplement and beauty product copy, with FDA and FTC sources (screening aid only).
- [Rental Listing Scam Checker for Craigslist & FB](https://apify.com/ultimatemc/rental-listing-scam-checker): scores rental listings 0-100 for FTC-listed scam signs like wire or gift card payment, deposit before viewing and rent far below similar listings.
- [GTIN, UPC & EAN Barcode Validator (Check Digit)](https://apify.com/ultimatemc/gtin-barcode-validator): checks UPC, EAN, GTIN-14 and ISBN codes for wrong check digits, lost leading zeros, scientific notation, restricted prefixes and duplicates before a feed upload.
- [Fake Review Checker: Incentivized & Duplicates](https://apify.com/ultimatemc/review-integrity-checker): screens scraped reviews for incentivized or insider wording, copied text, rating bursts and rating/text mismatches named in the FTC 2024 fake-review rule.
- [Facebook Marketplace Listing Policy Checker](https://apify.com/ultimatemc/facebook-marketplace-listing-policy-checker): flags Marketplace listings that may break Meta's Commerce Policies (weapons, vapes, Rx, animals, gift cards, services, counterfeits and more), with policy links.
- [Fake Discount Checker: EU 30-Day Prior Price](https://apify.com/ultimatemc/discount-claim-checker): checks 'was' and strikethrough prices against your own price history for 30-day prior-price, raise-then-discount and wrong-badge issues.
- [SMS Marketing Message Checker: STOP & 10DLC](https://apify.com/ultimatemc/sms-marketing-message-checker): pre-checks SMS marketing texts for segment count, STOP opt-out wording, URL shorteners, SHAFT content and quiet hours.
- [Hidden Fee Checker: Hotel, Rental & Ticket Prices](https://apify.com/ultimatemc/hidden-fee-price-checker): flags headline prices that leave out mandatory resort, service or booking fees under the FTC junk fees rule (16 CFR 464), with sources per finding.
- [EU GPSR Listing Checker for Amazon, eBay & Shops](https://apify.com/ultimatemc/gpsr-listing-checker): checks listings for the EU GPSR Article 19 online-sale details: manufacturer, EU responsible person, product identifier, picture and warnings.
- [Food Allergen Label Checker: US, EU & AU](https://apify.com/ultimatemc/food-allergen-label-checker): compares ingredient lists with the 'Contains' statement for US 9, EU/UK 14 and Australian PEAL allergens and flags gaps and conflicting free-from claims.
- [Toy Choking Hazard Warning Checker (CPSC)](https://apify.com/ultimatemc/toy-choking-warning-checker): flags toy listings missing the CPSC choking-hazard warnings for small parts, balloons, small balls and marbles, with age-grade checks.
- [Textile Fiber Label Checker: Bamboo & Origin](https://apify.com/ultimatemc/textile-fiber-label-checker): flags 'bamboo' claims that should say rayon, fiber percentages that don't add up, mismatched silk or cashmere titles and missing Made in USA/Imported.
- [Prop 65 Warning Checker for Product Listings](https://apify.com/ultimatemc/prop65-warning-checker): flags Prop 65 safe-harbor warnings missing 'WARNING', the P65Warnings.ca.gov link or a chemical name, old short forms, and listed chemicals mentioned with no warning.
- [Made in USA Claim Checker for Product Listings](https://apify.com/ultimatemc/made-in-usa-claim-checker): flags unqualified 'Made in USA' claims next to imported or foreign-origin details under the FTC rule (16 CFR 323), with sources per finding.
- [Subscription Auto-Renewal Disclosure Checker](https://apify.com/ultimatemc/auto-renewal-disclosure-checker): checks subscription and free-trial offer text for missing renewal, price, billing period and cancellation disclosures under California law and FTC ROSCA.
- [Email CAN-SPAM Checker & Unsubscribe Header Test](https://apify.com/ultimatemc/email-can-spam-checker): pre-checks marketing emails for missing unsubscribe links or postal address, misleading subjects and Google/Yahoo one-click unsubscribe headers.

Found a false positive? Open an issue on the **Issues** tab with the product data and what you expected, and we'll review the rule.

# Actor input Schema

## `products` (type: `array`):

Array of objects with "title" and "price", plus optional "size" (e.g. "500 g", "6 x 330 ml"), "unitPrice" as shown (e.g. "£1.20/kg", "2,49 €/1 kg", "$0.18/fl oz"), "regularPrice", "market" (e.g. DE, FR, UK, US), "id" and "url". The prefilled example shows common problems next to a correct listing; replace it with your own.

## `titles` (type: `array`):

One product title per entry (size parsing only; no price checks).

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

Two-letter country code used when a row has no market field (e.g. DE, FR, UK, US). EU/UK markets get stricter severities; DE adds the per 1 kg / 1 l check.

## `tolerancePct` (type: `number`):

How far the shown unit price may differ from the computed one before it's flagged (rounding).

## `datasetId` (type: `string`):

Apify dataset with products, for example the output of a Tesco, Coles, Woolworths, Aldi, Lidl, Rewe, Carrefour, Walmart or Kroger scraper. Common fields (price, wasPrice, unitPrice, CupString, packageSize) are detected automatically; override them with Field map.

## `fieldMap` (type: `object`):

Override field names; dotted paths work for nested fields. Example: {"unitPrice": "CupString", "size": "PackageSize", "title": "DisplayName"}.

## `onlyFlagged` (type: `boolean`):

Skip products with no findings (you are only charged for saved rows).

## `maxItems` (type: `integer`):

Maximum number of products to check in this run.

## Actor input object example

```json
{
  "products": [
    {
      "id": "EXAMPLE-RICE",
      "title": "Example basmati rice 1.5kg",
      "price": 4.5,
      "unitPrice": "£3.50/kg",
      "market": "UK"
    },
    {
      "id": "EXAMPLE-COLA",
      "title": "Example cola 6 x 330ml",
      "price": "€3.96",
      "unitPrice": "€2.00 / l",
      "market": "FR"
    },
    {
      "id": "EXAMPLE-COFFEE",
      "title": "Example ground coffee 500 g",
      "price": "5,99 €",
      "unitPrice": "1,20 € / 100 g",
      "market": "DE"
    },
    {
      "id": "EXAMPLE-CEREAL",
      "title": "Example corn flakes 500g",
      "price": 2,
      "regularPrice": 3,
      "unitPrice": "£6.00/kg",
      "market": "UK"
    },
    {
      "id": "EXAMPLE-WATER",
      "title": "Example sparkling water, 12 pack 12 fl oz cans",
      "price": 5.49,
      "market": "US"
    }
  ],
  "tolerancePct": 2,
  "onlyFlagged": false,
  "maxItems": 20000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "products": [
        {
            "id": "EXAMPLE-RICE",
            "title": "Example basmati rice 1.5kg",
            "price": 4.5,
            "unitPrice": "£3.50/kg",
            "market": "UK"
        },
        {
            "id": "EXAMPLE-COLA",
            "title": "Example cola 6 x 330ml",
            "price": "€3.96",
            "unitPrice": "€2.00 / l",
            "market": "FR"
        },
        {
            "id": "EXAMPLE-COFFEE",
            "title": "Example ground coffee 500 g",
            "price": "5,99 €",
            "unitPrice": "1,20 € / 100 g",
            "market": "DE"
        },
        {
            "id": "EXAMPLE-CEREAL",
            "title": "Example corn flakes 500g",
            "price": 2,
            "regularPrice": 3,
            "unitPrice": "£6.00/kg",
            "market": "UK"
        },
        {
            "id": "EXAMPLE-WATER",
            "title": "Example sparkling water, 12 pack 12 fl oz cans",
            "price": 5.49,
            "market": "US"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ultimatemc/unit-price-checker").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 = { "products": [
        {
            "id": "EXAMPLE-RICE",
            "title": "Example basmati rice 1.5kg",
            "price": 4.5,
            "unitPrice": "£3.50/kg",
            "market": "UK",
        },
        {
            "id": "EXAMPLE-COLA",
            "title": "Example cola 6 x 330ml",
            "price": "€3.96",
            "unitPrice": "€2.00 / l",
            "market": "FR",
        },
        {
            "id": "EXAMPLE-COFFEE",
            "title": "Example ground coffee 500 g",
            "price": "5,99 €",
            "unitPrice": "1,20 € / 100 g",
            "market": "DE",
        },
        {
            "id": "EXAMPLE-CEREAL",
            "title": "Example corn flakes 500g",
            "price": 2,
            "regularPrice": 3,
            "unitPrice": "£6.00/kg",
            "market": "UK",
        },
        {
            "id": "EXAMPLE-WATER",
            "title": "Example sparkling water, 12 pack 12 fl oz cans",
            "price": 5.49,
            "market": "US",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ultimatemc/unit-price-checker").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 '{
  "products": [
    {
      "id": "EXAMPLE-RICE",
      "title": "Example basmati rice 1.5kg",
      "price": 4.5,
      "unitPrice": "£3.50/kg",
      "market": "UK"
    },
    {
      "id": "EXAMPLE-COLA",
      "title": "Example cola 6 x 330ml",
      "price": "€3.96",
      "unitPrice": "€2.00 / l",
      "market": "FR"
    },
    {
      "id": "EXAMPLE-COFFEE",
      "title": "Example ground coffee 500 g",
      "price": "5,99 €",
      "unitPrice": "1,20 € / 100 g",
      "market": "DE"
    },
    {
      "id": "EXAMPLE-CEREAL",
      "title": "Example corn flakes 500g",
      "price": 2,
      "regularPrice": 3,
      "unitPrice": "£6.00/kg",
      "market": "UK"
    },
    {
      "id": "EXAMPLE-WATER",
      "title": "Example sparkling water, 12 pack 12 fl oz cans",
      "price": 5.49,
      "market": "US"
    }
  ]
}' |
apify call ultimatemc/unit-price-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ultimatemc/unit-price-checker"
        }
    }
}
```

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/6mAhYinsZoorV7r6Q/builds/7Ph0VWqJrvDKZAKUz/openapi.json
