# UK Supermarket Prices Scraper — Tesco, Sainsbury's, ASDA, Aldi (`griffie/uk-supermarket-prices`) Actor

Compare UK grocery prices in one run across Tesco, Sainsbury's, ASDA, Aldi, Morrisons, Waitrose and Iceland: shelf price, Clubcard & Nectar prices, offers, unit price and a comparable £/kg or £/litre, plus a cheapest-chain ranking. Supermarket price tracker and API.

- **URL**: https://apify.com/griffie/uk-supermarket-prices.md
- **Developed by:** [Dustin Griffie](https://apify.com/griffie) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 4 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## UK Supermarket Prices Scraper: Tesco, Sainsbury's, ASDA, Aldi, Morrisons, Waitrose, Iceland

**Search once and get one clean, comparable price table for 7 UK supermarkets.** Type a product such as *milk*, *Heinz beans* or *nappies size 4* and you get every matching product from **Tesco, Sainsbury's, ASDA, Aldi UK, Morrisons, Waitrose and Iceland**. Each one comes with its shelf price, was-price, **Clubcard Price / Nectar Price / More Card price**, multi-buy deal, unit price and a **comparable £ per kg, £ per litre or £ per item**. You also get a summary of the **cheapest supermarket for every search**.

Use it for UK grocery price comparison, supermarket price tracking, food inflation research, competitor shelf-price monitoring, or just finding where your weekly shop is cheapest.

- 🛒 **7 UK supermarkets in one run.** Every chain uses the same output fields, so there's no stitching together seven single-store scrapers.
- 💳 **Loyalty prices kept separate from shelf prices.** Tesco Clubcard Prices, Sainsbury's Nectar Prices, Morrisons More Card and myWaitrose offers each get their own fields, alongside `bestPrice`.
- ⚖️ **Like-for-like unit prices.** "£1.15/LT", "52p per 100g", "£0.13/each" and "PER_LITRE" are all converted to `comparableUnitPrice` + `comparableUnit` (kg, litre, each…).
- 🏷️ **Offers decoded.** You get Rollbacks, was/now, "Save 85p", "Any 2 for £4" multi-buys (with the effective per-item price) and offer end dates where the retailer shows them.
- 🥇 **Cheapest-supermarket ranking.** One free `comparison` row per search shows the best-value product and the chains ranked by their best unit price.
- 🔔 **Price-change monitor.** Schedule it and get only the products whose price, member price, offer or availability changed.
- ⚡ **Fast and light.** Six chains use the retailers' own JSON search, and the default demo (36 products) finishes in a few seconds.

### What data do you get?

| Field | Example | Notes |
|---|---|---|
| `chainName` | `Tesco` | Tesco, Sainsbury's, ASDA, Aldi UK, Morrisons, Waitrose, Iceland |
| `productId`, `url`, `imageUrl` | `302529973` | Retailer's own product ID and product page |
| `name`, `brand`, `size` | `Biotiful Kefir 500ml`, `Biotiful`, `500ml` | Size is read from the retailer or, if missing, from the name (metric preferred over pints) |
| `price` | `2.60` | Shelf price in GBP that anyone pays |
| `wasPrice`, `savingsAmount` | `3.00`, `0.40` | Only when the retailer shows a real higher previous price |
| `loyaltyPrice`, `loyaltyScheme` | `2.00`, `Clubcard` | Clubcard / Nectar member price. `bestPrice` = lowest of shelf, member and multi-buy per-item price |
| `isOnOffer`, `promoType`, `promotion`, `promotionEnds` | `true`, `CLUBCARD_MULTIBUY`, `Any 2 for £4 Clubcard Price`, `2026-11-18` | Promotion text exactly as shown |
| `multibuy` | `{"quantity":2,"totalPrice":4,"unitPrice":2}` | Parsed from "2 for £4", "3 for 2" etc. |
| `unitPrice`, `unitOfMeasure`, `unitPriceText` | `5.20`, `litre`, `£5.20/litre` | The retailer's own unit price |
| `comparableUnitPrice`, `comparableUnit` | `5.20`, `litre` | Normalised to per kg / litre / each across all chains |
| `loyaltyUnitPrice` | `4.00` | Unit price at the member price (Nectar / Clubcard) when available |
| `available`, `rating`, `reviewCount` | `true`, `4.7`, `89` | Where the chain publishes them |
| `category`, `categoryPath`, `barcode` | `Milk`, `Fresh Food > Milk…`, `5060337220415` | Barcode (EAN) where the chain publishes it |
| `isSponsored`, `position`, `searchQuery` | `true`, `1`, `milk` | Search rank as the shopper sees it |
| `scrapedAt` | ISO timestamp | |

In monitor mode each changed product also has `changeType`, `previousPrice`, `previousLoyaltyPrice`, `priceChange` and `priceChangePct`.

#### Output example (one product)

```json
{
  "recordType": "product",
  "chain": "tesco",
  "chainName": "Tesco",
  "productId": "302529973",
  "name": "Biotiful Gut Health Kefir Milk Drink Original 500ml",
  "brand": "Biotiful",
  "size": "500ml",
  "price": 2.6,
  "currency": "GBP",
  "bestPrice": 2.0,
  "isOnOffer": true,
  "promoType": "CLUBCARD_MULTIBUY",
  "promotion": "Any 2 for £4 Clubcard Price - Selected Biotiful Gut Health",
  "promotionEnds": "2026-11-18",
  "multibuy": { "quantity": 2, "totalPrice": 4.0, "unitPrice": 2.0 },
  "unitPrice": 5.2,
  "unitPriceText": "£5.20/litre",
  "comparableUnitPrice": 5.2,
  "comparableUnit": "litre",
  "available": true,
  "rating": 4.7,
  "reviewCount": 89,
  "categoryPath": "Groceries & Essentials > Fresh Food > Milk, Butter & Eggs > Milk",
  "barcode": "5060337220415",
  "url": "https://www.tesco.com/groceries/en-GB/products/302529973",
  "searchQuery": "milk",
  "position": 1
}
```

#### Comparison row (free, one per search term)

```json
{
  "recordType": "comparison",
  "searchQuery": "milk",
  "chainsCompared": 7,
  "productsCompared": 140,
  "comparableUnit": "litre",
  "bestValueChain": "Aldi UK",
  "bestValueProduct": "Skimmed UHT Milk",
  "bestValueUnitPrice": 0.65,
  "chainRanking": [
    { "rank": 1, "chainName": "Aldi UK", "bestUnitPrice": 0.65 },
    { "rank": 2, "chainName": "Tesco", "bestUnitPrice": 0.65 },
    { "rank": 3, "chainName": "Morrisons", "bestUnitPrice": 0.7 }
  ],
  "byChain": [ { "chainName": "Aldi UK", "products": 20, "offers": 1, "lowestShelfPrice": 0.49 } ]
}
```

The values above come from a real test run. Prices change daily.

The Output tab has ready-made views: **Products**, **Offers & Clubcard / Nectar prices**, **Unit price comparison**, **Cheapest supermarket per search**, **Price changes** and **Run status**. You can export any of them to CSV, Excel, JSON or Google Sheets.

### How to use it

1. Enter one or more **search terms**, for example `milk`, `free range eggs` or `pg tips 240`.
2. Pick the **supermarkets** to compare. All 7 are selected by default.
3. Set **Max products per search per supermarket**. 10–30 is plenty for price comparison, and you can go into the thousands for a full category export.
4. Optional:
   - **Only products on offer** finds this week's deals.
   - **Price-change monitor** is for scheduled runs.
   - **Product or search URLs** lets you track a fixed basket.
5. Click **Start** and open the Output tab.

#### Input example

```json
{
  "searchTerms": ["milk", "bread", "eggs", "butter", "bananas"],
  "chains": ["tesco", "sainsburys", "asda", "aldi", "morrisons", "waitrose", "iceland"],
  "maxProductsPerChain": 20,
  "onlyOffers": false,
  "compareMode": true
}
```

This returns up to 700 products plus 5 comparison rows, and took about 10 seconds in testing.

#### Tracking specific products

Paste product links into **Product or search URLs**:

```json
{
  "productUrls": [
    "https://www.sainsburys.co.uk/gol-ui/product/sainsburys-british-semi-skimmed-milk-2-27l-4-pint",
    "https://www.asda.com/groceries/product/british-milk-semi-skimmed-2-pints/538241",
    "https://groceries.morrisons.com/products/morrisons-british-semi-skimmed-milk-4-pint/113240422"
  ],
  "monitorMode": true
}
```

Product links work for Sainsbury's, ASDA, Aldi UK, Morrisons, Waitrose and Iceland. Search-results links (e.g. `https://www.tesco.com/groceries/en-GB/search?query=bread`) work for every chain.

### Use cases

- **UK grocery price comparison.** Find the cheapest supermarket for a product or a full weekly basket, ranked by true unit price rather than pack price.
- **Clubcard and Nectar price analysis.** Measure the gap between loyalty prices and shelf prices, and see how many products are only cheap for members.
- **Supermarket price tracker / shelf price monitoring.** Schedule daily or weekly runs in monitor mode and get alerts (Slack, email, webhook) when prices or offers change.
- **Food inflation and cost-of-living research.** Build your own UK grocery price index from real shelf prices across seven chains.
- **Brand and category managers.** Track your SKUs and competitors' pack prices, promotions, Rollbacks and multi-buys at every major grocer.
- **Price-comparison apps, newsletters and deal sites.** Feed the clean JSON straight into your product, or post weekly "cheapest basket" content.
- **Retail analytics and dashboards.** Export to Google Sheets, BigQuery, Power BI or Looker Studio through Apify integrations.

### Pricing

This Actor is **pay per result**: you pay per product returned, and there is no monthly rental.

| Event | Price | Notes |
|---|---|---|
| Product (one row in the dataset) | **$0.001** (Silver plan and higher: **$0.0008**) | = $1 per 1,000 products |
| Comparison summary rows, status rows | free | |
| Unchanged products in monitor mode | free (not saved) | You pay only for changes |
| Actor start | $0.00005 | Once per run |

Proxy and compute are included, so there is nothing else to pay. **1,000 products cost $1** on the Free and Starter plans and $0.80 on Scale and higher.

**Example costs:**

| Run | Cost |
|---|---|
| Default demo run (36 products) | ≈ $0.04 |
| 10-item weekly basket at 7 supermarkets, 10 products each (≈ 700 products) | ≈ $0.70 |
| Weekly monitor of 20 products (only changes are charged) | a few cents a month |

Set **Max products in total** or a run's maximum cost to cap your spend. The Actor stops exactly at your limit and never charges beyond it.

**Try it free:** Apify's Free plan includes $5 of usage credit every month with no card required. That covers about 5,000 products, enough for a weekly 10-item basket across all seven supermarkets for a couple of months.

### Supported supermarkets and how each one is collected

| Supermarket | Search | Product URLs | Offers | Member price | Unit price |
|---|---|---|---|---|---|
| Tesco | ✅ | ➖ (search by name) | ✅ | Clubcard Price | ✅ |
| Sainsbury's | ✅ | ✅ | ✅ | Nectar Price | ✅ |
| ASDA | ✅ | ✅ | ✅ Rollback / dropped | Asda Rewards text | ✅ |
| Aldi UK | ✅ | ✅ | ✅ (few) | — | ✅ |
| Morrisons | ✅ (≤ 300 per search) | ✅ | ✅ | More Card | ✅ |
| Waitrose | ✅ | ✅ | ✅ | myWaitrose | ✅ |
| Iceland | ✅ | ✅ | ✅ | Bonus Card text | ✅ |

Results come back in each retailer's own relevance order, exactly as a shopper sees them. Sponsored placements are kept and flagged (`isSponsored`), or you can switch them off.

### Limitations

- **Tesco product pages** are protected against servers. Tesco is fully supported through search, so add the product name (or a search URL) instead of a Tesco product link.
- **Morrisons** returns at most 300 products per search term. Use more specific terms for bigger exports.
- **Aldi UK** prices are the online "in-store" prices. Aldi UK doesn't deliver groceries.
- **Ocado** (bot challenge) and **Lidl GB** (no online grocery shop) are not included.
- Prices can differ by store or region. The Actor returns the default national online price that each website shows to a visitor who isn't logged in. Personalised offers (e.g. Your Nectar Prices) are not included.
- Unit-price conversion relies on the retailer's unit text or the pack size. Products without either keep `comparableUnitPrice: null`.
- Retailers change their websites from time to time. If a chain stops returning results, the run records a free `status` row explaining why, and the other chains carry on.

### Reliability

- Every supermarket has its own rate limit and retry logic. A slow or blocked chain never holds up the others.
- Blocked requests are retried with a fresh connection and browser fingerprint. If a chain keeps getting blocked on the default proxy, it switches to a direct connection and then to UK residential proxies automatically.
- Each run saves `RUN_STATS`, which records the requests, data volume, time and proxy tier per supermarket. Any search that fails or finds nothing gets a free `status` row, so you always know what happened.
- Runs can be resumed after a migration without paying twice for the same product.

### Use it with Make, n8n, Zapier, Google Sheets or an AI agent

- **On a schedule:** in Apify Console open *Schedules → Create new*, add this Actor (or one of the example tasks) and choose hourly, daily, weekly or a cron expression.
- **Make, Zapier and n8n:** all three have an official Apify app or node. Use *Run Actor* (or *Run task*) with the same JSON input, then *Get dataset items* to send the products to Google Sheets, Airtable, Slack, email or a database.
- **Google Sheets, Slack and webhooks:** the Actor's *Integrations* tab can push results when a run finishes, with no code.
- **AI agents (MCP):** Apify's MCP server at `https://mcp.apify.com` exposes Store Actors as tools, so an MCP-compatible assistant or agent framework can call `griffie/uk-supermarket-prices` and read the products it returns.
- **From code:** use the official `apify-client` package for Python or JavaScript:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("griffie/uk-supermarket-prices").call(run_input={"searchTerms": ["milk"], "chains": ["sainsburys", "aldi", "asda"], "maxProductsPerChain": 12, "compareMode": True, "proxyConfiguration": {"useApifyProxy": True}})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### Is it legal to scrape UK supermarket prices?

This Actor collects **publicly visible product and price information**: the same data any visitor sees on each supermarket's website without logging in. It does not access accounts, baskets, personal data or anything behind a login. Price data like this is widely used for consumer comparison and research. You are responsible for how you use the data, including compliance with the websites' terms and applicable law (e.g. UK GDPR, copyright and database rights). If in doubt, get legal advice for your use case.

Tesco, Sainsbury's, ASDA, Aldi, Morrisons, Waitrose, Iceland, Clubcard, Nectar and other names are trademarks of their respective owners. This Actor is an independent tool and is **not affiliated with, endorsed by or sponsored by** any of these retailers.

### How it compares

Most UK grocery Actors on Apify cover a single store. This one is built for comparison:

- **7 chains, one schema.** The same fields come back for every supermarket, so results can be compared without post-processing.
- **True like-for-like value.** Every retailer's unit format is normalised to £/kg, £/litre or £/each, and the member-price unit price is kept too.
- **Loyalty prices, multi-buys and was-prices are separate fields**, not mixed into a single "price".
- **A built-in cheapest-supermarket summary and change-only monitoring** that cost nothing extra.
- **Low per-result price**, with exact cost caps.

### Examples (ready-made tasks)

| Task | What it does |
|---|---|
| **Milk prices across 7 UK supermarkets** | Milk at all 7 chains with price per litre and the cheapest supermarket |
| **Tesco Clubcard prices for coffee** | Tesco coffee on offer: Clubcard Prices, multi-buys, price per kg |
| **Sainsbury's Nectar offers on bread** | Every Sainsbury's bread product with a Nectar Price or offer |
| **Cheapest UK supermarket for a weekly basket** | 10 staples at 7 chains, ranked by best unit price |
| **UK baby formula price tracker** | Scheduled monitor of first infant milk and formula prices |
| **UK supermarket unit price comparison: butter** | Butter price per kg at all 7 chains |
| **Tesco & Sainsbury's price monitor: bananas** | Daily or weekly banana price changes |

### FAQ

**How do I find the cheapest supermarket for my shopping list?**
Put each item in **Search terms**, keep **Price comparison summary** on and open the **Cheapest supermarket per search** view. Using a specific term (e.g. `semi skimmed milk 4 pints`) gives a tighter comparison.

**Are Clubcard and Nectar prices included?**
Yes. They come back as `loyaltyPrice` with `loyaltyScheme`. The shelf `price` is always kept, and `bestPrice` shows the lowest price available to a member.

**Can I get notified when a price drops?**
Yes. Turn on **Price-change monitor**, save the input as a task, schedule it and add a Slack, email or webhook integration. Only changed products are returned and charged.

**Can I use it from my own code?**
Yes. Use the Apify API, or the Python / JavaScript clients, and run it with the same JSON input shown above.

**Something's wrong or a chain is missing?**
Open an issue on the Issues tab with your run link. Feedback and feature requests are welcome.

### More Actors from the same developer

- **[Coles, Woolworths & ALDI Scraper](https://apify.com/griffie/coles-woolworths-aldi-scraper)**: Australian supermarket prices, half-price specials and a price-change tracker.
- **[Google Trends Scraper & API](https://apify.com/griffie/google-trends-reliable-scraper)**: bulk interest over time, interest by region and related queries.
- **[Google Ads Transparency Scraper](https://apify.com/griffie/google-ads-transparency-scraper)**: every Google ad a competitor or website runs, including YouTube and political ads.
- **[Google Hotels Scraper](https://apify.com/griffie/google-hotels-prices-scraper)**: hotel prices for any city and dates, compared across booking sites.
- **[Google Flights Scraper](https://apify.com/griffie/google-flights-scraper)**: live fares for many routes and dates, plus cheapest-day calendars.
- **[Redfin Scraper](https://apify.com/griffie/redfin-scraper)**: homes for sale, 90-day sold comps and rentals by city or ZIP.
- **[Tennis Scraper & Odds API](https://apify.com/griffie/tennis-results-odds-scraper)**: ATP, WTA, Challenger and ITF results, live scores and bookmaker odds.
- **[Hiring Signals & New Jobs Tracker](https://apify.com/griffie/company-jobs-ats-api)**: job openings from 13 applicant tracking systems, with new-job alerts.

Found a bug or need a field that's missing? Open an issue on the Actor's *Issues* tab and it will be looked at quickly.

# Actor input Schema

## `searchTerms` (type: `array`):

Products to look up, e.g. "milk", "Heinz baked beans", "nappies size 4". Every term is searched at every selected supermarket, so 5 terms × 7 chains = 35 searches.

## `chains` (type: `array`):

Which UK supermarkets to search. Sainsbury's, Aldi, ASDA, Waitrose, Morrisons and Iceland use fast JSON search; Tesco loads full result pages (slower, heavier).

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

Paste product pages or search-results pages from any supported chain, e.g. https://www.sainsburys.co.uk/gol-ui/product/…, https://www.asda.com/groceries/product/…/538241, https://groceries.morrisons.com/products/…/113240422. Great for tracking a fixed basket. (Tesco single product pages are blocked for servers — add the product name as a search term instead.)

## `maxProductsPerChain` (type: `integer`):

Stop each search at each supermarket after this many products (results are in the retailer's relevance order). Morrisons returns at most 300 per search.

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

Stop the whole run after this many products (0 = no limit). You are never charged for more than this.

## `onlyOffers` (type: `boolean`):

Return only products with a deal: Clubcard / Nectar / More Card prices, Rollbacks, price drops, was/now, multi-buys (e.g. 2 for £4) and other promotions.

## `includeSponsored` (type: `boolean`):

Keep paid placements that retailers mix into search results (flagged with isSponsored = true).

## `compareMode` (type: `boolean`):

Add one free "comparison" row per search term: the best-value product (lowest £/kg, £/litre or £/each) and a ranking of the supermarkets. Also saved as the COMPARISON record.

## `monitorMode` (type: `boolean`):

Remember prices between runs and return only products whose price, member price, offer or availability changed (plus new products). Unchanged products are not saved and not charged. Schedule the same input daily or weekly.

## `monitorIncludeNew` (type: `boolean`):

In monitor mode, also return products the monitor has not seen before (the first run returns everything as a baseline).

## `monitorStoreName` (type: `string`):

Named key-value store that holds remembered prices. Use a different name for each watch-list.

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

Apify Proxy (datacenter) by default. If a supermarket keeps blocking it, the Actor switches that supermarket to a direct connection and then to UK residential proxies automatically (see Fallback proxies).

## `fallbackProxy` (type: `boolean`):

When a supermarket keeps returning bot-protection pages, retry it on a direct connection and then on Apify residential proxies (GB).

## `maxConcurrency` (type: `integer`):

How many searches run in parallel (each supermarket is also rate-limited separately).

## `maxRetries` (type: `integer`):

Retries with a fresh connection and browser fingerprint when a request is blocked or fails.

## `debugLog` (type: `boolean`):

Verbose logging.

## Actor input object example

```json
{
  "searchTerms": [
    "milk"
  ],
  "chains": [
    "sainsburys",
    "aldi",
    "asda"
  ],
  "maxProductsPerChain": 12,
  "maxItems": 0,
  "onlyOffers": false,
  "includeSponsored": true,
  "compareMode": true,
  "monitorMode": false,
  "monitorIncludeNew": true,
  "monitorStoreName": "uk-supermarket-price-monitor",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "fallbackProxy": true,
  "maxConcurrency": 4,
  "maxRetries": 5,
  "debugLog": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Every product: supermarket, name, brand, size, shelf price, was-price, Clubcard/Nectar price, unit price, comparable £/kg or £/litre, offer, link.

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

Savings, member prices (Clubcard, Nectar, More Card, myWaitrose), Rollbacks, multi-buys and offer end dates.

## `unitPrices` (type: `string`):

Like-for-like value: price per kg, litre or each, incl. member-price unit price.

## `comparison` (type: `string`):

One row per search term: best-value product and supermarkets ranked by cheapest comparable unit price.

## `changes` (type: `string`):

Monitor mode: what changed since the last run (price, member price, offer, availability).

## `statuses` (type: `string`):

Free status row for every input that was invalid, empty, not found or failed.

## `comparisonRecord` (type: `string`):

All comparison summaries in one JSON record.

## `runStats` (type: `string`):

Counts per status, charged products, requests, data volume and proxy tier per supermarket.

# 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 = {
    "searchTerms": [
        "milk"
    ],
    "chains": [
        "sainsburys",
        "aldi",
        "asda"
    ],
    "maxProductsPerChain": 12,
    "compareMode": true,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("griffie/uk-supermarket-prices").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 = {
    "searchTerms": ["milk"],
    "chains": [
        "sainsburys",
        "aldi",
        "asda",
    ],
    "maxProductsPerChain": 12,
    "compareMode": True,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("griffie/uk-supermarket-prices").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 '{
  "searchTerms": [
    "milk"
  ],
  "chains": [
    "sainsburys",
    "aldi",
    "asda"
  ],
  "maxProductsPerChain": 12,
  "compareMode": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call griffie/uk-supermarket-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,griffie/uk-supermarket-prices"
        }
    }
}
```

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/Ss06qfh6ZwVQyKXWf/builds/GwQv06Zj7bVmhl79c/openapi.json
