# Tesco Scraper (`happyendpoint/tesco-scraper`) Actor

Tesco scraper & API: extract real-time Tesco UK and Ireland grocery data: product prices, product details, keyword search results, category pages and the full category tree. Grocery price tracking and supermarket analytics. No proxies needed. Export to JSON, CSV, Excel. Sainsbury's alternative.

- **URL**: https://apify.com/happyendpoint/tesco-scraper.md
- **Developed by:** [Happy Endpoint](https://apify.com/happyendpoint) (community)
- **Categories:** E-commerce, Other, Integrations
- **Features:** Limited permissions
- **Stats:** 42 total users, 6 monthly users, 97.2% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.00 / 1,000 results

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

## 🛒 Tesco Data Scraper (UK & Ireland)

## **⚡ NO PROXIES NEEDED ⚡**

This Actor provides **real-time, unlimited access** to grocery data from [Tesco UK](https://www.tesco.com) and [Tesco Ireland](https://www.tesco.ie). It handles all headers, secrets, and proxy rotation internally, so you get clean JSON data instantly.

***

### 🚀 Why use this Actor?

- **Real-Time Data:** Direct connection to Tesco; no stale databases.
- **Zero Configuration:** No proxy setup or browser fingerprinting required.
- **Smart Flattening:** Automatically extracts product lists into clean rows for Excel/CSV export.
- **Dual Region:** Full support for both UK 🇬🇧 and Ireland 🇮🇪 stores.

***

### 📋 Input Parameters Cheat Sheet

| Parameter | Required For | Description |
|-----------|--------------|-------------|
| **Endpoint** | **All** | Select the operation (Search, Details, Category, etc.) |
| `query` | Search | Keywords like "milk", "iphone", "bread". |
| `productId` | Product Details | The numeric Product ID (e.g., `330659955`). |
| `categoryId` | Category Pages | The encoded Category ID (e.g., `b;RnJlc2...`). |
| `maxItems` | Category Pages | Maximum products to save (Default: `100`). Pages of 24 are fetched automatically until this number or the last product. |
| `pageNo` | Category Pages | Start Page: the page to start from (Default: `1`). |

***

### 💻 Quick Start: JSON Examples

Copy and paste these JSON objects into the **Input** tab on Apify to test different endpoints.

#### Status Check

Check status of the actor.

```json
{
  "endpoint": "/health"
}
```

#### 🇬🇧 Tesco UK Endpoints

##### 1. Search Products (UK)

Finds products based on keywords.

```json
{
  "endpoint": "/product-search-by-keyword",
  "query": "bread"
}
```

##### 2. Get Product Details (UK)

Extracts deep details (nutrition, exact price, description) for a specific item.

```json
{
  "endpoint": "/product-details",
  "productId": "330659955"
}
```

##### 3. Scrape Category Page (UK)

Gets a list of products from a specific aisle/shelf.

```json
{
  "endpoint": "/category-page",
  "categoryId": "b;RnJlc2glMjBGb29k",
  "maxItems": 200
}
```

##### 4. Get All UK Category IDs (Taxonomy)

**Use this first!** This returns the list of all valid `categoryId`s to use in the step above.

```json
{
  "endpoint": "/get-category-ids-for-uk"
}
```

***

#### 🇮🇪 Tesco Ireland Endpoints

##### 5. Get Product Details (Ireland)

```json
{
  "endpoint": "/ireland-product-details",
  "productId": "266719388"
}
```

##### 6. Scrape Category Page (Ireland)

```json
{
  "endpoint": "/ireland-category-page",
  "categoryId": "b;RnJlc2glMjBGb29kJTdDQ2hlZXNlJTdDQ2hlZGRhciUyMENoZWVzZQ==",
  "maxItems": 200
}
```

##### 7. Get All Ireland Category IDs (Taxonomy)

Returns every Tesco Ireland category ID, one row per category, with its full path.

```json
{
  "endpoint": "/get-category-ids-for-ireland"
}
```

***

### 📊 Output Format

This actor uses **Smart Flattening** to ensure you get clean data tables:

- **Search & Categories:** Returns a flat list of products (one product per row).
- **Details:** Returns a single detailed object.
- **Taxonomy:** One row per category: `category_id`, `name`, `path`, `super_department`, `department`, `country`. Copy a `category_id` into a Category Page run.

### 🔗 Useful Links

- **Our Official Website:** [Happy Endpoint](https://happyendpoint.com)
- **Main API Provider:** [Tesco Data API on RapidAPI](https://rapidapi.com/happyendpoint/api/tesco-data-api)
- **Tesco UK:** [www.tesco.com](https://www.tesco.com)
- **Tesco Ireland:** [www.tesco.ie](https://www.tesco.ie)

### Our Other Scraper

- [Sephora Scraper](https://apify.com/happyendpoint/sephora-scrapper)
- [Ikea Scraper](https://apify.com/happyendpoint/ikea-scraper)
- [Ikea Product Scraper By Category](https://apify.com/happyendpoint/ikea-products-bycategory)
- [Idealista](https://apify.com/happyendpoint/idealista-scraper-by-url)
- [Idealista Scraper](https://apify.com/happyendpoint/idealista-scraper)

***

#### 🔑 SEO & Related Keywords

Tesco API, Tesco Scraper, Grocery API, Supermarket Data, Price Comparison API, Retail Analytics, eCommerce Scraping, Tesco UK Data, Tesco Ireland Data, Food Price Tracker, SKU Lookup, Barcode Lookup, HappyEndpoint. Grocery Price Tracker

#### Other Products

- [UAE Bayut Data API](https://bayutapi.dev)
- [Propertyfinder UAE Data API](https://uaepropertyapi.com)

# Actor input Schema

## `endpoint` (type: `string`):

Choose which Tesco data operation you want to perform.

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

Required for 'Search Products'. E.g., 'milk', 'bread'.

## `productId` (type: `string`):

Required for 'Product Details'. E.g., '330659955'.

## `categoryId` (type: `string`):

Required for 'Category Page'. E.g., 'b;RnJlc2glMjBGb29k'.

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

For 'Category Page'. Maximum number of products to save. Pages (24 products each) are fetched automatically until this number or the last product is reached.

## `pageNo` (type: `integer`):

For 'Category Page'. Page to start from (24 products per page). Leave at 1 to start from the first product.

## Actor input object example

```json
{
  "endpoint": "/health",
  "query": "bread",
  "maxItems": 100,
  "pageNo": 1
}
```

# 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 = {
    "query": "bread"
};

// Run the Actor and wait for it to finish
const run = await client.actor("happyendpoint/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 = { "query": "bread" }

# Run the Actor and wait for it to finish
run = client.actor("happyendpoint/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 '{
  "query": "bread"
}' |
apify call happyendpoint/tesco-scraper --silent --output-dataset

```

## MCP server setup

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