# John Lewis Product Scraper (`e-commerce/john-lewis-product-scraper`) Actor

Scrape John Lewis product data: name, brand, price, currency, rating, images, and stock. Provide product URLs, a search-results URL, or a search keyword. Export to JSON, CSV, or Excel, run via API, or integrate with other tools.

- **URL**: https://apify.com/e-commerce/john-lewis-product-scraper.md
- **Developed by:** [E Commerce](https://apify.com/e-commerce) (Apify)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 product details

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/platform/actors/running/actors-in-store#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

**Powered by [E-commerce Scraping Tool](https://apify.com/apify/e-commerce-scraping-tool).** Need data from other stores too? The E-commerce Scraping Tool gets you data from John Lewis, Amazon, eBay, and any other e-commerce site.

## John Lewis Product Scraper

Extract John Lewis product data at scale: name, brand, price, currency, rating, review count, images, sizes, and stock, from any John Lewis product URL, search-results page, or search keyword. Built for fashion price monitoring, competitor research, and catalog enrichment.

John Lewis lists hundreds of thousands of clothing, footwear, and accessory products from its own labels and partner brands. This Actor turns any John Lewis product, search, or keyword into clean, structured data you can compare and track.

### What does John Lewis Product Scraper do?

John Lewis Product Scraper collects structured product data from John Lewis and returns it as JSON, CSV, or Excel. Give it product URLs, a search-results URL, or a search keyword, and it returns full product details for every item it finds.

- 🛍️ Scrape any John Lewis product page by URL
- 🔎 Expand a search-results page into every product it contains
- 🧭 Search John Lewis by keyword and scrape the matching products
- ⭐ Capture price, rating, review count, and stock for each product
- 📦 Export to JSON, CSV, Excel, XML, or HTML, or pull results via API

### What data can you extract from John Lewis?

The John Lewis Product Scraper returns the following fields for each product:

| Product data    | Commercial info    | Additional details             |
| --------------- | ------------------ | ------------------------------ |
| 📝 Product name | 💰 Price           | 🖼️ Images                      |
| 🔗 Product URL  | 🏷️ List price      | 🎨 Colour and variants (opt.)  |
| 🏢 Brand        | 💱 Currency        | 🧵 Materials and care (opt.)   |
| 📄 Description  | ⭐ Rating          | 📏 Size and fit (opt.)         |
| 🔖 SKU          | 🗳️ Review count    | 📦 In-stock status             |

Enable **Include additional properties** to capture extra John Lewis-specific attributes (such as colour, materials, size and fit, and variants) under `additionalProperties`.

### Can I scrape John Lewis products, search results, and keywords?

Yes. John Lewis Product Scraper accepts three kinds of input and resolves all of them to product pages:

- **Product URLs**: direct links to John Lewis product (`/p/`) pages.
- **Search-results / listing URLs**: any John Lewis `/search/` results page. The Actor collects the product links it finds and follows pagination.
- **Search keyword**: a search term run against John Lewis.

### How does John Lewis Product Scraper work?

1. You provide product URLs, search-results URLs, or a keyword.
2. The Actor expands search-results URLs and keyword searches into individual product URLs.
3. It requests each product page and extracts the structured data.
4. Each product is saved to your dataset as it completes, so first results appear within a minute.
5. Anything that cannot be scraped is written to a separate errors dataset with a clear reason.

### Why use John Lewis Product Scraper?

| Feature          | Manual / generic tools    | John Lewis Product Scraper           |
| ---------------- | ------------------------- | ------------------------------ |
| Setup            | Custom code and selectors | Just paste a URL or keyword    |
| Input types      | One URL at a time         | Product, search, and keyword   |
| Price and rating | Manual copy-paste         | Structured for every product   |
| Output           | Unstructured HTML         | Clean JSON, CSV, Excel         |
| Failures         | Silent, break the run     | Logged to an errors dataset    |
| Cost model       | Fixed subscriptions       | Pay only per product returned  |

### What can you do with John Lewis data after scraping?

- **Price monitoring**: track how a product's price and list price move over time and across markets.
- **Assortment research**: pull names, brands, images, and categories to map an John Lewis range or a competitor's catalog.
- **Rating analysis**: use rating and review count to spot best and worst performing products.
- **Catalog enrichment**: feed clean product data into a fashion catalog or an AI shopping tool.

### How to use John Lewis Product Scraper?

1. Create a free Apify account.
2. Open the John Lewis Product Scraper.
3. Paste John Lewis product URLs, a search-results URL, or type a keyword.
4. Set **Total maximum products** to cap the run (start with 50 to preview).
5. Click **Start**, then export your results or fetch them from the API.

### How much does John Lewis Product Scraper cost?

It uses a **pay-per-event** model: a tiny fee per run start, plus a fee per product returned, dropping on higher plans. You are never charged for failed pages, and search or keyword runs stay predictable because you control the product cap. See the Pricing tab for current rates.

### Input

Provide at least one of: product URLs, search-results URLs, or a keyword.

| Field                  | Type    | Description                                     |
| ---------------------- | ------- | ----------------------------------------------- |
| `detailsUrls`          | array   | Direct John Lewis product (`/p/`) URLs              |
| `listingUrls`          | array   | John Lewis search-results URLs                        |
| `keyword`              | string  | Search term run against John Lewis                    |
| `additionalProperties` | boolean | Include colour, materials, size and fit, variants |
| `maxProductResults`    | integer | Total products to scrape across the run         |

Example input:

```json
{
  "detailsUrls": [{ "url": "https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643" }],
  "keyword": "midi dress",
  "additionalProperties": true,
  "maxProductResults": 50
}
```

### Output

Each product is saved as one dataset item. Failed inputs go to a separate errors dataset.

```json
{
  "url": "https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643",
  "name": "Bershka lace crinkle midi dress in ecru",
  "brand": { "slogan": "Bershka" },
  "price": 22.99,
  "listPrice": 22.99,
  "currency": "GBP",
  "rating": 5,
  "reviewCount": 17,
  "inStock": true,
  "image": "https://images.john-lewis-media.com/products/example/210754583-1",
  "inputUrl": "https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643"
}
```

### How to run John Lewis Product Scraper via the API

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~john-lewis-product-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "detailsUrls": [{ "url": "https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643" }], "maxProductResults": 10 }'
```

You can also run it via the Apify MCP server, schedule runs, or integrate the dataset with Make, Zapier, Google Sheets, and other tools.

### Troubleshooting

- **A run returns 0 products.** John Lewis occasionally blocks automated requests. Re-run in a few minutes; the Actor records each blocked URL in the errors dataset with the reason, so a zero-result run is never silent.
- **"Not a valid John Lewis product URL".** Product input must be an `john-lewis.com` product page (its path contains `/p/`). Put search pages in **Search-results / listing URLs** instead.
- **Keyword search returns too many products.** Set **Total maximum products** to cap the run.
- **Missing rating or reviews.** Some products have no reviews yet, so `rating` and `reviewCount` can be empty even on a successful scrape.

### FAQ

**Is it legal to scrape John Lewis?** Scraping publicly available product data is generally legal. You are responsible for how you use the data and for complying with John Lewis's terms and applicable laws. Do not collect personal data.

**Do I need an John Lewis account or API key?** No. You only need an Apify account and this Actor.

**Can I get the data via API or MCP?** Yes. Every run exposes its dataset through the Apify API, and the Actor works with the Apify MCP server for AI assistants.

**Does it capture sizes and variants?** Enable **Include additional properties** to capture colour, size and fit, and variant data under `additionalProperties`.

**How many products can it scrape?** As many as you want. Use **Total maximum products** to control run size and cost.

### Are there other tools in Apify Store?

Yes. If you need data from more than one store, use the [E-commerce Scraping Tool](https://apify.com/apify/e-commerce-scraping-tool) to scrape John Lewis, Amazon, eBay, and any other e-commerce site from a single Actor.

# Actor input Schema

## `detailsUrls` (type: `array`):

Direct URLs to individual John Lewis product pages. The John Lewis Product Scraper fetches each URL and returns that product's full data: name, brand, price, rating, images, and stock. Example: https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643. Accepts John Lewis product (/p/) URLs, with or without https://; put search-results URLs in the field below instead. Use this when you already know exactly which products you want, as it is the fastest and most reliable input.

## `listingUrls` (type: `array`):

URLs to John Lewis search-results pages that contain many products. The scraper opens each page, collects the product URLs it finds (following pagination), then scrapes each product's details. Example: https://www.johnlewis.com/search?search-term=headphones. Accepts John Lewis search-results URLs. Use this to scrape a whole search without listing every product URL yourself; pair it with 'Total maximum products' to cap the run.

## `keyword` (type: `string`):

A search term used to find John Lewis products. The scraper runs the search on John Lewis, collects the matching product URLs, then scrapes each product's details. Example: midi dress. Enter a single search phrase. Use 'Total maximum products' to limit how many results are scraped.

## `additionalProperties` (type: `boolean`):

Whether to include extra, source-specific product attributes in the output. When enabled, the scraper asks John Lewis for additional details (such as colour, materials, size and fit, and variants) and adds them under 'additionalProperties'. Example: enable this to capture size and fit information. This adds more data per product at a small extra time cost. Recommended: on for catalog enrichment, off for the fastest price-and-name-only runs.

## `maxProductResults` (type: `integer`):

The maximum total number of products to scrape in one run, across all URLs and keywords combined. The scraper stops once this many products have been saved, so search inputs never run away. Example: 100. Accepts any positive whole number. Lower values cost less and finish faster; leave empty to scrape everything found. Recommended: start with 50 to 100 to preview results before a full run.

## Actor input object example

```json
{
  "detailsUrls": [
    {
      "url": "https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643"
    }
  ],
  "listingUrls": [
    {
      "url": "https://www.johnlewis.com/search?search-term=headphones"
    }
  ],
  "keyword": "midi dress",
  "additionalProperties": true,
  "maxProductResults": 50
}
```

# Actor output Schema

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

Scraped John Lewis product details.

## `errors` (type: `string`):

URLs or keywords that could not be scraped, with an error code and 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 = {
    "detailsUrls": [
        {
            "url": "https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643"
        }
    ],
    "additionalProperties": true,
    "maxProductResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("e-commerce/john-lewis-product-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 = {
    "detailsUrls": [{ "url": "https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643" }],
    "additionalProperties": True,
    "maxProductResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("e-commerce/john-lewis-product-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 '{
  "detailsUrls": [
    {
      "url": "https://www.johnlewis.com/beats-solo-4-wireless-bluetooth-on-ear-headphones-with-mic-remote/matte-black/p111969643"
    }
  ],
  "additionalProperties": true,
  "maxProductResults": 50
}' |
apify call e-commerce/john-lewis-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,e-commerce/john-lewis-product-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/cDgv06vYRgSDbBA1P/builds/lPRkPb3rZ4juA1O2I/openapi.json
