# Lidl UK Product, Price & Category Scraper (`dromb/lidl-uk-actor`) Actor

Extract Lidl UK product search, category listings, item details, prices, availability, barcodes, images, and category data for price monitoring and market research.

- **URL**: https://apify.com/dromb/lidl-uk-actor.md
- **Developed by:** [Dmitriy Gyrbu](https://apify.com/dromb) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 6 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 result items

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Lidl UK Product, Price & Category Scraper

Extract public Lidl UK product search results, category listings, prices, availability, barcodes, images, and detailed product pages. Use the data for price monitoring, catalogue research, product discovery, and retail market analysis.

This Actor is independently maintained and is not affiliated with or endorsed by Lidl.

### Supported operations

- `search` — search Lidl UK products by keyword.
- `category` — list products from a category ID, slug, or URL.
- `item` — extract one product using a product ID, barcode, slug, or URL.
- `categories` — discover live Lidl UK categories and category IDs.
- `search_filters` — inspect available search or category filters.
- `probe` — check source availability without writing product rows to the dataset.

### Common controls

- `page` is 1-based; default `1`.
- `limit` is bounded to `1–100`; default `24`.
- `sort` supports `relevance`, `price_asc`, `price_desc`, `title_asc`, and `title_desc`.
- `includeRaw=true` adds the source payload to `OUTPUT` for diagnostics; semantic Dataset rows remain normalized.

### Product search

```json
{
  "operation": "search",
  "query": "wine",
  "page": 1,
  "limit": 10
}
```

Search results may contain product ID, title, barcode, category breadcrumbs, price, currency, stock indicator, badges, images, and official product URL.

### Category products

First run `categories`, then pass a returned category ID:

```json
{
  "operation": "category",
  "category_id": "a10024029",
  "page": 1,
  "limit": 10
}
```

### Item details

```json
{
  "operation": "item",
  "url": "https://www.lidl.co.uk/p/cotes-de-provence-premium-wine/p10049229"
}
```

Product IDs returned by search/category can be resolved directly across independent runs. URL input remains the fastest explicit path. Only `lidl.co.uk` page URLs are accepted for fetch operations; external hosts are rejected.

The same item can be resolved from a search/category result without copying the full URL:

```json
{
  "operation": "item",
  "product_id": "10051842"
}
```

`barcode` is emitted only when Lidl exposes a barcode/IAN/GTIN. Lidl Article numbers are kept as product IDs and are never relabeled as barcodes.

### Category directory

```json
{
  "operation": "categories"
}
```

Category records include names, official URLs, category IDs, product counts, breadcrumbs, and sample product IDs when published by Lidl.

### Search filters

```json
{
  "operation": "search_filters",
  "query": "wine"
}
```

With no query/category context, `search_filters` uses the bounded `wine` starter and returns structured filter metadata only.

### Output

Product and category records are written to the default dataset and can be exported as JSON, CSV, Excel, XML, or through the dataset API. Every run also writes a structured `OUTPUT` record with operation status, counts, errors, proxy mode, and budget information.

The Actor includes a dataset table view for common fields such as product name, price, availability, barcode, category ID/breadcrumbs, filter metadata, and source URL.

### Access and cost

Normal bounded runs use direct HTTP and do not require a browser or paid proxy. The Actor keeps fallback transports available if Lidl changes its access rules. The default workflow is intentionally small and cost-conscious.

### Limitations

- Lidl does not publish an online price for every product or category record.
- Some products are marked as available in store only.
- Category contents, prices, badges, and availability can change by time and source publication.
- Always verify important purchasing information on the linked Lidl product page.

### AI / MCP / API contract

- Empty input, or `search` without a query, runs a bounded buyer-useful `wine` starter.
- Dataset contains semantic rows only: products, categories, or structured filter groups.
- Search relevance is accent-insensitive and token-aware (for example `rose` matches `Rosé`) while broad umbrella breadcrumbs are excluded from semantic matching.
- A true no-match search returns an exact empty Dataset (`[]`).
- `search_filters` can run without context and returns filter metadata only; it never publishes sample products as filter results.
- `OUTPUT` contains status, counts, supported operations, errors, budget metadata, and an `agent` provenance envelope.
- Product IDs from search/category can be passed to `item`; the Actor uses a bounded exact Lidl product route before any catalogue fallback.

# Actor input Schema

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

Actor operation. If omitted, the Actor runs a buyer-useful search starter.

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

Optional for search/probe/search\_filters. If search is selected without a query (including empty input after Apify applies defaults), the Actor uses the bounded starter query `wine`.

## `category_id` (type: `string`):

Optional for `category` and `search_filters`. Category id from categories operation.

## `slug` (type: `string`):

Optional for `category` and `item`. Lidl-relative category/product path or slug.

## `url` (type: `string`):

Optional for `category`, `item`, and `search_filters`. Full Lidl UK page URL on `lidl.co.uk`; external hosts are rejected.

## `product_id` (type: `string`):

Optional for `item`. Product id from search/category results; resolves across independent runs via a bounded fresh exact storefront lookup.

## `barcode` (type: `string`):

Optional for `item`. IAN / barcode from search/category results; resolves across independent runs via a bounded fresh exact storefront lookup.

## `page` (type: `integer`):

Optional for `search` and `category`. 1-based page number.

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

Optional for `search` and `category`. Maximum products per page (1-100).

## `sort` (type: `string`):

Optional for `search` and `category`. Sort order: relevance, price\_asc, price\_desc, title\_asc, title\_desc.

## `includeRaw` (type: `boolean`):

Optional. Include the unnormalized source payload in the OUTPUT summary.

## Actor input object example

```json
{
  "operation": "search",
  "page": 1,
  "limit": 24,
  "includeRaw": false
}
```

# Actor output Schema

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

Primary machine-readable Dataset: products, categories, or structured filter groups.

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

Run status, counts, errors, supported operations, budget metadata, and AI provenance under OUTPUT.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dromb/lidl-uk-actor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("dromb/lidl-uk-actor").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 '{}' |
apify call dromb/lidl-uk-actor --silent --output-dataset

```

## MCP server setup

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

```

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/sRj1M8mkEIQYFGS1q/builds/FAJqWqpsjR0PfAbl8/openapi.json
