# Tesco Groceries Scraper - Prices, Clubcard Offers, Nutrition (`deepurple/tesco-groceries-scraper`) Actor

Scrape Tesco UK groceries by keyword, category or URL: price, unit price, Clubcard Price with end date, promotions, stock, ratings, plus ingredients, allergens and nutrition per 100g. $2 per 1,000 products, no monthly fee.

- **URL**: https://apify.com/deepurple/tesco-groceries-scraper.md
- **Developed by:** [Misha Ershov](https://apify.com/deepurple) (community)
- **Categories:** E-commerce
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.30 / 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

## Tesco Groceries Scraper: Prices, Clubcard Offers, Nutrition and Ratings

Collect Tesco (UK) grocery products by search keyword, category or product link and get clean rows for a spreadsheet, a price tracker or a database. Each row has the shelf price, unit price, promotions, the **Clubcard price** with its saving and end date, stock status, brand, department path and, in full-detail mode, ingredients, allergens, nutrition per 100g and per portion, storage, origin, manufacturer and the rating breakdown.

You only need an Apify account. No API key, no login, no extra proxy subscription: UK residential proxies are built in and selected by default.

### What you can do with it

- **Grocery price monitoring.** Track prices and unit prices for a basket of keywords and see how they move between runs.
- **Promotion and Clubcard tracking.** Keep only products with an offer (`onOfferOnly`) or a Clubcard price (`clubcardOnly`) and read the offer text, saving and end date.
- **Nutrition and allergen datasets.** Per 100g and per portion tables plus ready-made numeric columns (`energyKcalPer100`, `proteinPer100`, `saltPer100` and more).
- **Competitor and range research.** Walk a whole category and group it by brand, aisle or price per kilo.

### Input

| Field | What it does |
|---|---|
| `searchQueries` | Keywords to search (default `milk`). |
| `categories` | Category names or paths, for example `Fresh Food / Milk, Butter & Eggs`. |
| `productIds` | Tesco product numbers (the digits at the end of a product link). |
| `startUrls` | tesco.com product, search or `/shop/` category links. |
| `includeDetails` | Full record with ingredients, nutrition and more (default on). Off gives a faster price-only list. |
| `reviewsPerProduct` | Attach up to 50 customer reviews per product (default 0). |
| `inStockOnly`, `onOfferOnly`, `clubcardOnly` | Row filters. |
| `maxResults` | Total products to return (default 50). You pay per returned product, so this is your budget cap. |
| `maxPagesPerSource` | Safety cap on listing pages read per keyword or category. |
| `proxyConfiguration` | Defaults to Apify Residential, UK. Leave it as is. |

#### Example input

```json
{
  "searchQueries": ["milk", "oat drink"],
  "includeDetails": true,
  "onOfferOnly": true,
  "maxResults": 100
}
```

A product found by several sources is returned once and billed once.

### Output

One row per product, camelCase fields, missing values are `null`.

| Group | Fields |
|---|---|
| Identity | `productId`, `baseProductId`, `tpnb`, `gtin`, `url`, `name`, `brand`, `description` |
| Category | `mainCategory`, `subCategory`, `productCategory`, `productType`, `categoryPath` |
| Price | `price`, `currency`, `unitPrice`, `unitOfMeasure`, `unitPriceText`, `unitQuantity`, `packSize`, `packSizeValue`, `packSizeUnit`, `isLowEverydayPricing`, `isLowPricePromise`, `priceMatchesCompetitor`, `competitors` |
| Promotions | `onPromotion`, `promotionText`, `multibuyOffer`, `promotionPrice`, `promotionStartDate`, `promotionEndDate`, `promotions` |
| Clubcard | `hasClubcardPrice`, `clubcardPrice`, `clubcardPriceText`, `clubcardUnitPrice`, `clubcardSavings`, `clubcardSavingsPercent`, `clubcardEndDate` |
| Availability | `inStock`, `maxQuantity`, `buyLimit`, `buyLimitMessage`, `isNew`, `saleType`, `averageWeight`, `foodIcons` |
| Label content (full details) | `ingredients`, `allergens`, `storageInstructions`, `preparationAndUsage`, `cookingInstructions`, `freezingInstructions`, `features`, `marketingText`, `originInformation`, `netContents`, `servings`, `manufacturer`, `recyclingInfo`, `warnings`, `otherInformation`, `nutritionalClaims`, `healthClaims`, `additives`, `productAttributes`, `guidelineDailyAmount` |
| Nutrition (full details) | `nutrition`, `nutritionPerServing`, `energyKcalPer100`, `energyKjPer100`, `fatPer100`, `saturatesPer100`, `carbohydratePer100`, `sugarsPer100`, `fibrePer100`, `proteinPer100`, `saltPer100` |
| Ratings | `ratingAverage`, `ratingCount`, `reviews` |
| Run info | `imageUrl`, `source`, `searchQuery`, `sourceCategory`, `listingPosition`, `detailLevel`, `scrapedAt` |

### Pricing

Pay per event: one `product` event for each product saved. Nothing is charged for products that are filtered out, duplicated or not found, and the run stops when your spending limit is reached.

### Notes

- Prices are those shown for the default UK store view and can change during the day.
- Fields Tesco does not publish for a product are `null`. Label content depends on the product (fresh produce has little).

# Actor input Schema

## `searchQueries` (type: `array`):

Words to search for on Tesco groceries, for example milk, oat drink or chicken thighs. Each keyword is searched separately; a product found twice is returned once.

## `categories` (type: `array`):

Category names or paths as shown on tesco.com, for example Fresh Food / Milk, Butter & Eggs. You can also paste a tesco.com/groceries/en-GB/shop/... link in Start URLs.

## `productIds` (type: `array`):

Tesco product numbers (the digits at the end of a product link, for example 325020595). Each one returns the full product record.

## `startUrls` (type: `array`):

tesco.com links to read: product pages, search results (?query=) or /shop/ category pages. Other links are skipped with a warning.

## `includeDetails` (type: `boolean`):

Add ingredients, allergens, nutrition, storage, cooking and origin information, manufacturer and rating breakdown for every product. Turn it off for a faster, lighter price-only list.

## `reviewsPerProduct` (type: `integer`):

How many customer reviews to attach to each product (0 for none). Needs full product details to be on.

## `inStockOnly` (type: `boolean`):

Skip products that are currently unavailable.

## `onOfferOnly` (type: `boolean`):

Keep only products with a promotion (multibuy, reduced price or Clubcard price).

## `clubcardOnly` (type: `boolean`):

Keep only products that carry a Clubcard price.

## `maxResults` (type: `integer`):

Total products to return across all sources. You pay per returned product, so this is your budget cap.

## `maxPagesPerSource` (type: `integer`):

Safety cap on listing pages read for each keyword or category (about 48 products per page).

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

UK residential proxies are used by default and recommended. Leave as is.

## Actor input object example

```json
{
  "searchQueries": [
    "milk"
  ],
  "includeDetails": true,
  "reviewsPerProduct": 0,
  "inStockOnly": false,
  "onOfferOnly": false,
  "clubcardOnly": false,
  "maxResults": 50,
  "maxPagesPerSource": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  }
}
```

# Actor output Schema

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

Dataset with the scraped grocery products.

# 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 = {
    "searchQueries": [
        "milk"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "GB"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepurple/tesco-groceries-scraper").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 = {
    "searchQueries": ["milk"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "GB",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("deepurple/tesco-groceries-scraper").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 '{
  "searchQueries": [
    "milk"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  }
}' |
apify call deepurple/tesco-groceries-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepurple/tesco-groceries-scraper"
        }
    }
}
```

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/cp2ZsyB0MT94Qji4h/builds/zXFXwN35ZrHazRF8a/openapi.json
