# Tesco Scraper - Products, Prices, Clubcard, Nutrition & Reviews (`topapi/tesco-scraper`) Actor

Scrape Tesco grocery products by search, category, link, product id or barcode: price, unit price, Clubcard Price, promotions, ingredients, allergens, nutrition, reviews and availability. UK, Ireland, Czechia, Hungary, Slovakia. Price monitor mode. $1.00 per 1,000 products.

- **URL**: https://apify.com/topapi/tesco-scraper.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** E-commerce, Automation, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 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.

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

### What does Tesco Scraper do?

**Tesco Scraper** reads Tesco's online grocery store and turns search words, Tesco links, product ids, GTIN / EAN barcodes or whole categories into rows: one row per product with its ids and barcode, title, brand, price and unit price, **Clubcard Price**, every promotion, availability, category path, rating and review count, and (on by default) the full product page: ingredients, allergens, the nutrition table, front-of-pack traffic lights, storage, cooking, origin, recycling, manufacturer and return address and every image. Customer reviews are one switch away. It covers **Tesco UK, Tesco Ireland, Tesco Czechia, Tesco Hungary and Tesco Slovakia** in one actor. Built for price-comparison and retail-analytics teams, FMCG brands checking their shelf, nutrition and recipe apps, and anyone tracking UK grocery prices.

Tesco API - Tesco Product Scraper - Tesco Price Scraper - Tesco Clubcard Prices - Tesco Groceries Data

- **Every way in:** search words, product / search / category links (filters and sorting in a link are kept), Tesco product ids, base product ids (TPNB) and **GTIN / EAN barcodes**, or departments, aisles and shelves by name.
- **Prices the way Tesco shows them:** shelf price, unit price, Clubcard Price (and its unit price), every offer with its dates, "was" prices, Low Everyday Price and Aldi Price Match flags.
- **The whole product page in the same row:** ingredients with the allergens Tesco prints in bold, allergy advice, nutrition per 100 g / ml and per serving as numbers, GDA traffic lights (LOW / MEDIUM / HIGH), pack size, storage, cooking, origin, recycling, manufacturer address, all images, ratings distribution.
- **Five Tesco stores:** UK (GBP), Ireland (EUR), Czechia (CZK), Hungary (HUF), Slovakia (EUR), local language or English.
- **Tesco's own filters:** brand, dietary (Vegan, No gluten, Organic ...), special offers, new, Tesco or Marketplace sellers, sort by price; plus price range, in stock and Clubcard-only filters before anything is charged.
- **Price monitor:** scheduled runs return only new products and products whose price, Clubcard Price, offers or availability changed, with the previous price and the change in %.
- **No login, cookies or API key:** it reads the same product API Tesco's own website uses.
- **Pay only for delivered products:** $1.00 per 1,000 products, details and reviews included, no start fee.
- **Export anywhere, works with AI agents:** JSON, CSV, Excel; schedules, webhooks, Make, Zapier, n8n, Google Sheets; the Apify API and MCP server.

### What data can you get from Tesco?

<table>
<tr><td>🆔 Product id (TPNC), base id (TPNB), GTIN / EAN</td><td>🏷️ Title, brand, sub-brand, product link</td><td>🛒 Super-department, department, aisle, shelf</td></tr>
<tr><td>💷 Price, unit price, currency</td><td>💳 Clubcard Price and Clubcard unit price</td><td>🎁 Offers: text, type, start / end dates, was price</td></tr>
<tr><td>✅ Available, for sale, status, buy limit</td><td>⭐ Rating, review count, ratings distribution</td><td>🏪 Marketplace seller id and name</td></tr>
<tr><td>🥣 Ingredients, allergens in bold, allergy advice</td><td>📊 Nutrition table, per 100 g / per serving numbers</td><td>🚦 GDA traffic lights (LOW / MEDIUM / HIGH)</td></tr>
<tr><td>📦 Pack size, net contents, drained weight, servings</td><td>🧊 Storage, cooking instructions, origin, recycling</td><td>🏭 Manufacturer, distributor, importer, return address</td></tr>
<tr><td>🖼️ Main image and every product image</td><td>💬 Customer reviews (rating, title, text, date, verified buyer)</td><td>🔁 Monitor: previous price, price change, change type</td></tr>
</table>

Measured on a 1,200-product run of Tesco UK's Fresh Food department (2026-11-15, details on): GTIN, price, unit price, category path and images 100%, description 99%, pack size 99%, nutrition table 98% (per 100 g / ml numbers 98%, per serving 79%), storage 92%, rating and review count 88%, ingredients 83%, origin 76%, manufacturer address 76%, GDA traffic lights 74%, allergy advice 61%, an offer 39% (single-item Clubcard Price 13%), cooking instructions 26%, Aldi Price Match flag 10%. Every product had its details (0 failed).

### How to scrape Tesco with Tesco Scraper

1. Open the actor and type one or more **Search words** (e.g. `milk`), or paste **Tesco links**, **Product ids or barcodes**, or **Categories**.
2. Pick the **Tesco store** (UK by default) and a **Maximum products**.
3. Leave **Product details** on for ingredients and nutrition; switch on **Customer reviews** if you want them.
4. Click **Start**. Rows appear in the dataset as they are read; download them as JSON, CSV or Excel, or read them with the API.

### ⬇️ Input

| Field | What it does |
|---|---|
| `searchQueries` | Search words, one Tesco search each (up to 1,000 products per request). |
| `startUrls` | Product, search or category links from tesco.com, tesco.ie, nakup.itesco.cz, bevasarlas.tesco.hu, potravinydomov.itesco.sk. Filters and sorting in a link are kept; each link uses its own store. |
| `productIds` | Tesco product ids (254656543), TPNBs (54550994) or GTIN / EAN barcodes (5000436589457). Prefix `tpnc:`, `tpnb:` or `gtin:` to say which. |
| `categories` | Departments, aisles or shelves by name or link path: `Fresh Food`, `fresh-food/milk-butter-and-eggs/milk`, `Frozen Food`. |
| `region` | `UK` (default), `IE`, `CZ`, `HU`, `SK`. |
| `language` | Czechia, Hungary, Slovakia: `local` (default) or `english`. |
| `maxItems` | Most products in the run (default 100; 0 = no limit). |
| `maxItemsPerSource` | Most products per search word, link or category. |
| `startPage`, `maxPagesPerSource` | Tesco pages of 24 products: where to start, how many to read per source (0 = all). |
| `sortBy` | `relevance`, `price-ascending`, `price-descending`. |
| `brand`, `dietary` | Tesco's brand and dietary filters (`TESCO`, `Cadbury`; `Vegan`, `No gluten`, `Organic`). |
| `onOffer`, `newProducts` | Special offers only; new products only. |
| `productSource` | `all`, `tesco` (Tesco's own range) or `marketplace` (third-party sellers). |
| `minPrice`, `maxPrice` | Shelf price range in the store's currency. With `price-ascending`, the read stops at the first product above `maxPrice`. |
| `inStockOnly`, `clubcardOnly` | Only available products; only products with a Clubcard Price. |
| `includeProductDetails` | The product page data (default on, same price). |
| `includeReviews`, `maxReviewsPerProduct`, `reviewsPostedWithin` | Customer reviews, newest first (up to 500 per product; e.g. `3 months`). |
| `deduplicateProducts` | A product found by several sources is delivered once (default on). |
| `excludeEmptyFields` | Leave out fields that are empty for a product. |
| `monitorMode`, `monitorStoreName`, `resetMonitor` | Price monitor for scheduled runs (see below). |
| `proxyConfiguration` | Not needed; use only for your own network. |

#### Input JSON

```json
{
  "searchQueries": ["milk", "oat milk"],
  "region": "UK",
  "maxItems": 200,
  "includeProductDetails": true
}
```

#### Barcodes to Tesco prices

```json
{
  "productIds": ["5000436589457", "05060337220415", "tpnb:54550994"],
  "includeProductDetails": false
}
```

#### A whole aisle on offer, cheapest first

```json
{
  "categories": ["fresh-food/milk-butter-and-eggs"],
  "onOffer": true,
  "sortBy": "price-ascending",
  "maxItems": 0
}
```

#### Reviews of a search

```json
{
  "searchQueries": ["greek yogurt"],
  "maxItems": 50,
  "includeReviews": true,
  "maxReviewsPerProduct": 100,
  "reviewsPostedWithin": "1 year"
}
```

### ⬆️ Output

One row per product. A real row (shortened) from a run on 2026-11-15:

```json
{
  "productId": "304399143",
  "tpnb": "86002072",
  "gtin": "04025500250942",
  "title": "Muller Bliss Mascarpone Cherry Yogurts 4 x 110g",
  "brand": "Müller",
  "url": "https://www.tesco.com/groceries/en-GB/products/304399143",
  "region": "UK",
  "currency": "GBP",
  "price": 3.3,
  "unitPrice": 7.5,
  "unitOfMeasure": "kg",
  "unitPriceText": "£7.50/kg",
  "clubcardPrice": 2,
  "isClubcardPrice": true,
  "clubcardPromotion": "£2.00 Clubcard Price",
  "promotions": [
    {
      "id": "103053926",
      "description": "£2.00 Clubcard Price",
      "type": null,
      "attributes": [
        "CLUBCARD_PRICING"
      ],
      "isClubcard": true,
      "startDate": "2026-10-28T00:00:00Z",
      "endDate": "2026-12-09T00:00:00Z",
      "unitSellingInfo": "£4.55/kg",
      "priceBeforeDiscount": null,
      "priceAfterDiscount": 3.3
    }
  ],
  "isLowEverydayPricing": false,
  "priceMatchesCompetitor": null,
  "isAvailable": true,
  "status": "AvailableForSale",
  "isMarketplace": false,
  "categoryPath": "Groceries & Essentials > Fresh Food > Yogurts > Natural & Greek Style Yogurts",
  "imageUrl": "https://digitalcontent.api.tesco.com/v2/media/ghs/26703ae8-73d8-42d6-b844-5e1e2f38588b/c50d26ef-2853-4fbd-a64a-0ddd288860b1_457260479.jpeg",
  "averageRating": 4.7,
  "reviewCount": 181,
  "description": "Italian inspired mascarpone style yogurt with cream and a layer of cherry compote x4",
  "packSize": "440 G",
  "ingredients": "Yogurt (Milk), Water, Whipping Cream (Milk) (11%), Cherries (10%), Sugar, Modified Maize Starch, Lemon Juice from Concentrate, Emulsifier: E472b, Gelatine, Stabiliser: Pectins, Flavourings (contain Milk), Acidity Regulators: Citric Acid, Calcium Citrates, Colour: Carmine",
  "allergensHighlighted": [
    "Milk"
  ],
  "allergensText": "Other Allergen Info: See ingredients in bold.",
  "nutritionPer100": {
    "energyKj": 494,
    "energyKcal": 118,
    "fat": 4.7,
    "saturates": 3,
    "carbohydrate": 15,
    "sugars": 12.9,
    "protein": 3.3,
    "salt": 0.14
  },
  "energyKcalPer100": 118,
  "guidelineDailyAmounts": null,
  "storage": "Best before see top of pack. Keep refrigerated.",
  "originInformation": "Produce of: Made in the UK using British milk",
  "manufacturerAddress": "Müller, TF9 3SQ, UK. or, Müller Dairy Ireland Ltd, 8th Floor,",
  "position": 3,
  "sourceType": "category",
  "sourceInput": "Fresh Food",
  "detailsIncluded": true,
  "scrapedAt": "2026-11-15T07:16:36.490Z"
}
```

Full field list: the **Output** tab of the actor (106 fields, with views for products, ingredients and nutrition, offers, and price changes).

### How can I use Tesco data?

- **Price comparison and retail analytics:** shelf and Clubcard prices by GTIN, unit prices, offers and their end dates, across five countries.
- **Brand and category monitoring:** your products' price, availability, rating and position in Tesco search and categories, every day.
- **Nutrition, allergen and recipe apps:** ingredients, allergens in bold, nutrition per 100 g, traffic lights, storage and cooking.
- **Promotion tracking:** which products are on a Clubcard Price, a multi-buy or a "Save" offer, and when it ends.

### How much does it cost to scrape Tesco?

**$1.00 per 1,000 products** (pay per event: one `product` event per delivered row), with product details and reviews included at the same price. No start fee. Duplicates, filtered products and products an earlier monitor run already delivered unchanged are never charged.

What real runs cost on 2026-11-15 (price $1.00 per 1,000 products, details on):

| Run | Products | Run time | You pay |
|---|---|---|---|
| One product by id or barcode | 1 | 1-3 s | $0.001 |
| The example input (20 x "milk") | 20 | 4 s | $0.02 |
| 3 search words x 50 products | 150 | 30-60 s | $0.15 |
| 50 products with up to 150 reviews each | 50 | 15-27 s | $0.05 |
| Tesco UK's whole Frozen Food department | 1,160 | 2 min | $1.16 |
| 1,500 products of one search | 1,500 | 2.5 min | $1.50 |
| Monitor run with nothing new | 0 | 3 s | $0 |

Set a **maximum charge** on the run (Apify's "Max cost per run") to cap any run: the actor stops cleanly at the limit, and every delivered row is charged once.

### Run it on a schedule (price monitor)

Turn on **Monitor prices** and schedule the same input (daily, hourly). The first run delivers every product (`changeType: "new"`). Each later run delivers only:

- products not delivered before (`new`),
- products whose price changed (`priceChanged`, with `previousPrice`, `priceChange`, `priceChangePercent`),
- products whose Clubcard Price changed (`clubcardPriceChanged`, with `previousClubcardPrice`),
- products whose offers or availability changed (`offerOrAvailabilityChanged`),
- products delivered before without the details or reviews this run asks for (`details`, once).

A run with nothing new charges nothing. Runs with the same **Monitor name** and the same input share one memory; **Start the monitor over** forgets it.

### Integrations, API, scheduling & MCP

Tesco Scraper works with every Apify integration: schedules, webhooks, Make, Zapier, n8n, Google Sheets, Slack, Airbyte. Call it from your code with the Apify API (JavaScript or Python client) or let an AI agent run it through the Apify MCP server.

### Limits & empty runs

- One run can read any number of products; Tesco answers up to 1,000 per listing request and 10 product pages per request.
- Ids, barcodes and categories that Tesco does not have are listed in the run's status message and never charged.
- A search that matches nothing ends with a status that says so, and charges nothing.
- Product details come from Tesco's product API; a product whose details do not load is still delivered with its listing fields (`detailsIncluded: false`).
- Fields Tesco's API defines but leaves empty on its products (dosage, directions, safety warnings, health claims, box contents, freezing guidelines, age limits, hazard info, shelf life, deposit) are not columns.

### FAQ

#### How many products can Tesco Scraper collect in one run?

As many as your input matches: a whole department (5,000+ products) in one run. Set `maxItems` to 0 for no limit.

#### How much does Tesco Scraper cost?

$1.00 per 1,000 products, details and reviews included. A 20-product test run costs $0.02.

#### Can I look up products by barcode?

Yes: put GTIN / EAN barcodes in **Product ids or barcodes**. Each barcode Tesco sells becomes one row with its Tesco ids, price and details.

#### Does it return Clubcard Prices?

Yes: `clubcardPrice` (single-item Clubcard Prices), `clubcardUnitPriceText`, `clubcardPromotion` (also multi-buy texts like "Any 2 for £4 Clubcard Price") and `isClubcardPrice`.

#### Which countries are supported?

Tesco UK, Ireland, Czechia, Hungary and Slovakia. Links from any of those stores work; for search words, ids and categories pick the store in **Tesco store**.

#### Do I need a Tesco account, cookies or an API key?

No.

#### Can I use it with the Apify API or MCP?

Yes: start it with the Apify API (any language) or from an AI agent through the Apify MCP server; the output is the same rows.

#### Why did my run return no results?

The status message says why: no product matched the search, a category or id was not found, or your filters removed every product (the message lists how many each filter removed). Nothing is charged for those runs.

#### Your feedback

Found a field you need, or a Tesco page that does not work? Open an issue on the actor's **Issues** tab and we will look at it.

# Actor input Schema

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

Words to search Tesco with, one per line, the way a shopper types them: "milk", "oat milk", "nappies", "protein bars". Each word is one Tesco search, read up to 1,000 products per request.

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

Product, search or category links from tesco.com, tesco.ie, nakup.itesco.cz, bevasarlas.tesco.hu or potravinydomov.itesco.sk, e.g. https://www.tesco.com/groceries/en-GB/products/254656543, https://www.tesco.com/groceries/en-GB/search?query=milk\&brand=TESCO or https://www.tesco.com/groceries/en-GB/shop/fresh-food/milk-butter-and-eggs/milk/all. Filters and sorting in a link are kept; each link uses its own store.

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

Tesco product ids (the number in a product link, e.g. 254656543), base product ids (TPNB, e.g. 54550994) or GTIN / EAN barcodes (e.g. 5000436589457). Prefix one with tpnc:, tpnb: or gtin: to say which it is. Each id that exists becomes one row with full details.

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

Tesco departments, aisles or shelves by name or link path: "Fresh Food", "fresh-food/milk-butter-and-eggs", "fresh-food/milk-butter-and-eggs/milk", "Frozen Food", "Drinks", "Pet", "Health & Beauty". A department reads every product in it.

## `region` (type: `string`):

The store searched for your search words, product ids and categories. Links always use the store of their own website.

## `language` (type: `string`):

Titles and details in the store's own language or in English. The UK and Ireland are always English.

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

Most products to deliver across all searches, links, ids and categories. 0 = no limit (a whole department can be 5,000+ products).

## `maxItemsPerSource` (type: `integer`):

Most products from each search word, link or category. Empty = only the overall maximum applies.

## `startPage` (type: `integer`):

Tesco results page to start from on each search and category (Tesco shows 24 products per page), to resume a large read. A page= value in a pasted link wins.

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

Stop each search or category after this many Tesco pages of 24 products. 0 = no page limit.

## `sortBy` (type: `string`):

Order of search and category results, like the sort menu on Tesco.

## `brand` (type: `array`):

Only these brands, as Tesco writes them in its brand filter: "TESCO", "TESCO finest", "Cadbury", "alpro".

## `dietary` (type: `array`):

Tesco's dietary filter values: "Vegan", "Vegetarian", "No gluten", "Organic", "No milk", "Halal" ...

## `onOffer` (type: `boolean`):

Only products on a promotion or Clubcard Price (Tesco's own offers filter).

## `newProducts` (type: `boolean`):

Only products Tesco marks as new.

## `productSource` (type: `string`):

Tesco's own range, its Marketplace (third-party sellers, with seller name), or both.

## `minPrice` (type: `number`):

Only products at or above this shelf price, in the store's currency (GBP, EUR, CZK, HUF). Empty = no floor.

## `maxPrice` (type: `number`):

Only products at or below this shelf price, in the store's currency. Empty = no ceiling. With Price: low to high, the read stops at the first product above it.

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

Skip products Tesco shows as unavailable.

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

Only products with a Clubcard Price offer.

## `includeProductDetails` (type: `boolean`):

Adds the product page data to each row: description, pack size and net contents, ingredients, allergens, full nutrition table (per 100 g / ml and per serving), GDA traffic lights, storage, cooking and freezing instructions, origin, recycling, warnings, manufacturer and return address, all images, ratings distribution. Read 10 products per request; same price per product.

## `includeReviews` (type: `boolean`):

Adds the product's customer reviews (rating, title, text, date, verified buyer, syndication source), newest first. Same price per product.

## `maxReviewsPerProduct` (type: `integer`):

Most reviews added to each product when reviews are on (up to 500).

## `reviewsPostedWithin` (type: `string`):

Only reviews newer than this: "7 days", "3 months", "1 year" or a date like 2026-01-31. Empty = all.

## `deduplicateProducts` (type: `boolean`):

A product found by several searches, links or categories is delivered (and charged) once. Turn off to get one row per product per source.

## `excludeEmptyFields` (type: `boolean`):

Drop fields that are empty for a product (smaller rows). Off = every row has every field, empty ones as null.

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

For scheduled runs: each run delivers only products not delivered by an earlier run of the same input, plus products whose price, Clubcard price, offers or availability changed since (changeType, previousPrice, priceChange, priceChangePercent). A run with nothing new charges nothing.

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

Name of this watch. Runs with the same name and the same input share one memory.

## `resetMonitor` (type: `boolean`):

Forget what earlier runs delivered (the next run delivers everything again).

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

Not needed: Tesco's product API answers without a proxy, and the actor moves to Apify's datacenter and then residential proxy by itself if it is refused. Set one only to use your own network.

## Actor input object example

```json
{
  "searchQueries": [
    "milk"
  ],
  "region": "UK",
  "language": "local",
  "maxItems": 20,
  "startPage": 1,
  "maxPagesPerSource": 0,
  "sortBy": "relevance",
  "onOffer": false,
  "newProducts": false,
  "productSource": "all",
  "inStockOnly": false,
  "clubcardOnly": false,
  "includeProductDetails": true,
  "includeReviews": false,
  "maxReviewsPerProduct": 10,
  "deduplicateProducts": true,
  "excludeEmptyFields": false,
  "monitorMode": false,
  "monitorStoreName": "tesco-monitor",
  "resetMonitor": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One item per Tesco product: ids and barcode, title, brand, price and unit price, Clubcard Price, promotions, availability, category path, rating, and with details on: ingredients, allergens, nutrition, storage, origin, manufacturer, images and reviews.

## `summary` (type: `string`):

Per-source counts (matches, read, delivered), filters, details read, egress and requests (written for Console runs, large runs and runs with a problem).

# 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"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/tesco-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"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/tesco-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"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call topapi/tesco-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topapi/tesco-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/hMzsn1g5QlcHNgGJf/builds/h35HN4JKhctG9SZaH/openapi.json
