# Comparable Product Offers — Pack Sizes & Unit Prices (`gregory-brydon/comparable-product-offers`) Actor

Turn product URLs and messy offer records into pack quantities, comparable unit prices and whole-pack purchase totals, with source evidence. Flags ambiguous offers for review.

- **URL**: https://apify.com/gregory-brydon/comparable-product-offers.md
- **Developed by:** [Gregory Brydon](https://apify.com/gregory-brydon) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 normalized offers

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

## Comparable Offers: UK cleaning supplier comparisons

Give a purchasing agent exact product codes and required quantities. Receive freshly retrieved supplier offers, pack sizes, unit prices and whole-pack basket plans, with source evidence and explicit tax treatment.

This is a bounded catalogue focused on UK cleaning consumables. Search before comparing: catalogue membership and supplier counts are discovery hints, not promises of current stock. It is not a substitute-product recommendation engine or a purchasing service.

### Agent workflow

1. Run `{"operation":"search","query":"Jangro BB004-5"}` to find indexed identities.
2. Submit a basket using exact brand/manufacturer codes and requested quantities.
3. Read every line's status, diagnostics and tax basis. Use only returned complete plans.
4. Confirm delivery eligibility and checkout totals with the suppliers before buying.

```json
{
  "operation": "basket",
  "lines": [
    {"brand":"Jangro","manufacturerCode":"BB004-5","quantity":{"amount":"15","unit":"L"}},
    {"brand":"Jangro","manufacturerCode":"BK104-5","quantity":{"amount":"10","unit":"L"}}
  ],
  "maxOffersPerLine": 5,
  "maxSuppliers": 2,
  "postcode": "SW1A 1AA"
}
```

The postcode above is an example. Use your actual delivery postcode. Without a postcode, plans contain merchandise subtotals. With a postcode, supported delivery policies add clearly labelled estimates; unknown fees stay unknown. Published policies can expire or conflict, and special-item surcharges may apply. `deliveredTotal` remains null because checkout is not verified. Optional caller shipping quotes must match supplier, subtotal, postcode and tax basis and include validity dates and a source URL; they are labelled as unverified caller evidence.

### Outputs and charging

Retrieve the run's `OUTPUT` key-value record for the full response and diagnostics. Delivered normalized offers are also written to the default dataset. Basket lines without eligible offers remain visible. A spending cap can stop delivery and remove plans that depend on undelivered results.

The launch price is USD 0.02 per delivered eligible offer, with no paid search or review event and no start/default-dataset event fee. There is no additional platform-usage charge to customers. Consult the Actor’s current pricing before running. The prefilled example retrieves one live supplier page and can incur one offer event. Local SDK billing tests simulate charges; owner test runs do not establish customer revenue.

You can also submit `urls` or explicit `offers` for pack normalization. Supplied offer records are caller assertions. A normalized result validates the supported arithmetic and evidence rules; it does not certify product equivalence or checkout availability.

### Limits

- Up to 20 distinct basket lines, five supplier candidates per line and eight suppliers per plan.
- GBP basket comparisons, separated by tax basis; no currency or tax conversion.
- Exact manufacturer-code matching; unresolved identities require review.
- Public HTML only. No account pricing, browser rendering or CAPTCHA bypass.
- Shipping assignment search is bounded at 5,000 combinations and is not a global cheapest-order guarantee.
- Source timestamps and evidence are returned. Supplier website changes can reduce coverage.
- No order is placed. Marketplace demand and revenue are not yet validated.

# Actor input Schema

## `urls` (type: `array`):

Public HTML product pages with one Product and exact Offer. Up to 50 combined inputs.

## `offers` (type: `array`):

JSON array: title, price, currency; optional packText, pack={count,size,unit}, minimumOrderPacks, priceTiers. See README.

## `targetQuantity` (type: `object`):

Optional {amount,unit}, e.g. {"amount":"15","unit":"L"}. Calculates whole packs, minimum order and quantity tiers.

## `operation` (type: `string`):

Normalize URLs, search the product index, or compare an exact-product basket.

## `lines` (type: `array`):

Used by the basket operation. Missing offers and delivery uncertainty remain explicit.

## `maxOffersPerLine` (type: `integer`):

Used by the basket operation. Missing offers and delivery uncertainty remain explicit.

## `maxSuppliers` (type: `integer`):

Used by the basket operation. Missing offers and delivery uncertainty remain explicit.

## `postcode` (type: `string`):

Used by the basket operation. Missing offers and delivery uncertainty remain explicit.

## `supplierIds` (type: `array`):

Used by the basket operation. Missing offers and delivery uncertainty remain explicit.

## `shippingQuotes` (type: `array`):

Used by the basket operation. Missing offers and delivery uncertainty remain explicit.

## `query` (type: `string`):

Brand, manufacturer code or product title; search operation only.

## `limit` (type: `integer`):

Maximum catalogue search results.

## Actor input object example

```json
{
  "urls": [
    "https://shop.calabashmint.co.uk/product/jangro-cream-cleaner-500ml/"
  ],
  "offers": [],
  "operation": "normalize"
}
```

# Actor output Schema

## `offers` (type: `string`):

Complete results. Matching unit/currency does not prove product equivalence.

## `diagnostics` (type: `string`):

Search or basket result, budget status and uncharged diagnostics. Basket merchandise plans exclude unknown shipping and delivery eligibility.

# 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 = {
    "urls": [
        "https://shop.calabashmint.co.uk/product/jangro-cream-cleaner-500ml/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gregory-brydon/comparable-product-offers").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 = { "urls": ["https://shop.calabashmint.co.uk/product/jangro-cream-cleaner-500ml/"] }

# Run the Actor and wait for it to finish
run = client.actor("gregory-brydon/comparable-product-offers").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 '{
  "urls": [
    "https://shop.calabashmint.co.uk/product/jangro-cream-cleaner-500ml/"
  ]
}' |
apify call gregory-brydon/comparable-product-offers --silent --output-dataset

```

## MCP server setup

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

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/9kMCVnWbwTAO3X1VF/builds/YikHvosEDFOkciCG7/openapi.json
