# John Lewis UK Scraper API: Product Prices and Ranges (`scraperseurope/john-lewis-uk`) Actor

Collect John Lewis UK products, current GBP price ranges, brands, source ordering flags and reviews. Paginated search, API and JSON, CSV or Excel exports for catalogue and price comparisons.

- **URL**: https://apify.com/scraperseurope/john-lewis-uk.md
- **Developed by:** [Scrapers Europe](https://apify.com/scraperseurope) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 product delivereds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## John Lewis UK Scraper API: Product Prices and Ranges

Collect genuine John Lewis UK products with current GBP prices and variant ranges, brands, source ordering flags, reviews, images and product links. Use the Apify API or export JSON, CSV and Excel for catalogue and price comparisons.

```json
{"term": "kettle", "maxItems": 3}
```

Each row is a primary product family, not every colour or size. `price` is the advertised minimum and `price_max` the maximum of the current variant range; `price_is_range` distinguishes a range from a single price. Displayed GBP amounts must agree with the structured current values. `price_unit` preserves the source unit label. Do not treat a default SKU as a complete variant export, or a range minimum as the price of every colour. Historical reduction messages, finance and delivery charges are not current product prices.

`out_of_stock` and `available_to_order` preserve general source flags, not stock by shop/postcode or a delivery promise. Unknown fields remain empty. Only the primary source product array is returned, not recommendation carousels. The source's own matching rules can include related words or corrected searches. Page/query echoes are verified; a confirmed zero count is not confused with a block or missing data.

`searchTerms` replaces `term`; `maxItems` and deduplication are shared, while `maxPages` applies per search. Without them there are no hidden fixed item/page caps. Default runtime budget 240 seconds, adjustable to 7200, with Apify spending limits respected. Progressive delivery and automatic proxies need no customer cookies or technical settings. Earlier results remain if a later page fails. See `RUN_SUMMARY` and `DIAGNOSTICS`.

USD 0.004 per genuine unique delivered result plus customer-paid Apify platform consumption. No charges for duplicates, errors or summaries. Private until explicit approval; commercial pricing is only activated and checked at publication. Independent tool, not affiliated with John Lewis. Respect source terms and applicable law.

# Actor input Schema

## `term` (type: `string`):

Product, brand, homeware or electronics search in the public UK John Lewis catalogue.

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

Replaces the single term; products are deduplicated together.

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

Global limit. Without a value, no hidden fixed result limit.

## `maxPages` (type: `integer`):

Per search. Without a value, continue to the source end or time and spending budget.

## `maxRuntimeSecs` (type: `integer`):

Earlier results remain available if a later page fails.

## `requestTimeoutSecs` (type: `integer`):

Maximum time to wait for a source request.

## Actor input object example

```json
{
  "term": "kettle",
  "maxRuntimeSecs": 240,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `products` (type: `string`):

No description

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

No description

## `diagnostics` (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 = {
    "term": "kettle"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperseurope/john-lewis-uk").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 = { "term": "kettle" }

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

```

## MCP server setup

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

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/YmourCk36M9sQNJgf/builds/OCcrIbmRuf3k13XT2/openapi.json
