# John Lewis Scraper - Products, Prices, Variants & Stock (UK) (`abotapi/johnlewis-com-scraper`) Actor

Scrape John Lewis (johnlewis.com) products: prices and price history, promotions, colour and size variants, stock, delivery options, specifications, EAN, images, categories and ratings. Search by keyword or paste search, category, brand, product and sitemap links, with price and rating filters.

- **URL**: https://apify.com/abotapi/johnlewis-com-scraper.md
- **Developed by:** [Abot API](https://apify.com/abotapi) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 product results

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/actors/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 Scraper: Products, Prices, Variants & Stock (UK)

John Lewis Scraper turns John Lewis (johnlewis.com), the UK department store, into structured product data. Search by keyword, or paste a search, category, brand, product or sitemap link, and get prices and price history, promotions, every colour and size variant with its own price and stock, EAN barcodes, full image galleries, specifications, delivery options, category paths and ratings. Export to JSON, CSV or Excel, or pull results straight into your app through the API.

### Why This Scraper?

- **Every way into the catalogue.** Keyword searches with brand, price, rating, offers-only and in-stock filters and seven sort orders, whole category listings, category pages, brand pages, single product pages (colour links too) and product sitemap files, each read to its natural end or to the cap you set.
- **Prices that tell the whole story.** The price range, the displayed price, the previous price, the price history, the discount percentage, every live promotion and message, finance offers and price per unit, all in pounds sterling.
- **Variants as first-class data.** Every colour and size option of a product with its own variant ID, SKU, display code, title, price, orderable flag, images and barcodes, plus the colour swatches and the energy label where the product has one.
- **Identifiers you can join on.** Product ID, default SKU and variant ID, EAN barcodes, brand, product type hierarchy and selling type.
- **Complete product pages.** Description as plain text, the full specification list, the category trail, delivery options with prices, videos and the page's search-engine title data.
- **Reviews, ratings and listing context.** The newest customer reviews of each product (20 by default, up to 1,000: text, stars, date, reviewer, verified-buyer flag, helpful votes, sub-ratings, photos, the seller's reply) with the star-by-star breakdown, plus the average rating, review count, result position, total number of results, page count and the filters the site offers for the search or category.
- **Monitoring built in.** Label every product NEW, UPDATED, REAPPEARED or EXPIRED across scheduled runs, track price and stock only, resume an interrupted crawl, get a chat alert when a run finishes, and export through MCP connectors.

### Use Cases

- **Price and promotion monitoring:** track prices, previous prices and promotion messages for electricals, home, fashion and beauty, and get alerted only to what actually changed.
- **Range and market analysis:** compare John Lewis ranges, price bands and brand coverage by category or by keyword.
- **Catalogue enrichment:** match your own product list to John Lewis by EAN and add descriptions, images, specifications and category paths.
- **Stock and delivery tracking:** follow the orderable flag per colour and size, the unavailable reason, pre-order dates and delivery options.
- **Assortment research:** map every size and colour of a line, its energy label and its finance offers.

### Data You Get

> Sample shape: values are illustrative placeholders, not from a live record.

| Field | Example |
| --- | --- |
| `productId` / `title` / `brand` | `"00000000"` / `"Sample Brand Laptop, 8GB RAM, Silver"` / `"Sample Brand"` |
| `url` / `canonicalURL` / `mainImageUrl` | the product page address / its canonical address / main image |
| `priceMin` / `priceMax` / `priceDisplay` / `currency` | `499.99` / `499.99` / `"£499.99"` / `"GBP"` |
| `previousPrice` / `discountPercent` / `reductionHistory` | `699` / `28.5` / `[{"chronology": 0, "min": 699, "max": 699, "display": "£699.00"}]` |
| `promotions` / `messaging` | live promotion messages and every product message: `[{"title": "Save £199.01", "type": "promotional", "group": "Save", "promotionType": "Save £"}]` |
| `averageRating` / `reviewCount` / `ratingPercentage` | `4.3` / `302` / `86` |
| `reviews` / `reviewsReturned` / `ratingBreakdown` / `subRatings` | the newest reviews (see below) / how many were returned / review counts per star `{"5": 1170, "4": 217, "3": 45, "2": 25, "1": 33}` / the product's average per review question `{"Quality": 4.3, "Value": 4.2}` |
| `imageUrls` / `defaultSkuId` / `defaultVariantId` | the full gallery / the SKU and variant shown first |
| `outOfStock` / `availableToOrder` / `unavailableReason` | `false` / `true` / `null` |
| `preOrder` / `futureAvailability` / `isInStoreOnly` / `isOutlet` / `isProductSet` / `ageRestriction` | pre-order and release-date details where the product has them / `false` / `false` / `false` / `0` |
| `description` / `productTypeHierarchy` / `sellingProductType` | the product copy as plain text / `"PRODUCT.Technology.Computers.Laptop"` / `"Laptops"` |
| `attributes` / `specifications` | the product's attributes (key, name, values) and the specification list with help texts |
| `breadcrumbs` / `categoryPath` | `[{"id": "0", "name": "Electricals", "url": "..."}]` / `"Electricals > Laptops"` |
| `fulfilmentOptions` / `deliveryInfo` | delivery and collection options with price, and a short read-out: standard delivery price, click and collect, option names |
| `seo` / `videos` / `unitOfMeasure` / `pricePerUnit` | page heading and title data / product videos with stream, poster and thumbnail addresses / `"EACH"` / the unit price for products sold by length or weight |
| `creditOffer` | the finance option shown for the product: type, rate, repayment, provider, term |
| `variantId` / `skuId` / `displayCode` / `variantTitle` | the default variant's identifiers and title |
| `colour` / `trueColour` / `size` / `variantPrice` / `variantPriceDisplay` / `variantImages` | `"Silver"` / `"Silver"` / `"M"` / the default variant's price, shown price and images |
| `consumerBarcodes` / `energyRating` | `{"ean13": ["0000000000000"], "upc12": [], "ean8": []}` / `{"rating": "E", "labelUrl": "...", "informationSheetUrl": "..."}` |
| `colourSwatches` | one entry per colour: variant ID, SKU, colour, link, image and swatch image |
| `variants` | every colour and size option with `variantId`, `skuId`, `displayCode`, `variantTitle`, `colour`, `trueColour`, `size`, `variantPrice`, `variantPriceDisplay`, `previousPrice`, `reductionHistory`, `availableToOrder`, `unavailableReason`, `variantImages`, `consumerBarcodes` and `energyRating` |
| `position` / `page` / `totalResults` / `pagesAvailable` / `facets` | where the row sits in its listing, the number of results and pages, and the filters the listing offers (top values with counts) |
| `searchTerm` / `sortBy` / `sourceUrl` / `scrapedAt` | which keyword or pasted link found the row, the sort, and when it was read |
| `changeType` / `changedFields` / `firstSeenAt` / `lastSeenAt` | incremental mode only: `"NEW"`, `"UPDATED"`, `"UNCHANGED"`, `"REAPPEARED"` or `"EXPIRED"`, the fields that changed, and when the product was first and last seen |

The description, specifications, breadcrumbs, delivery options, variants, barcodes, videos and energy label come from each product's own page: on keyword, category and brand runs they need **Fetch product details**; rows from pasted product links and sitemap files always carry them. Fields a product does not have (a rating without reviews, a size on an electrical item, an energy label on a sofa) are empty. `discountPercent` is filled only when the product has one price: when the colours or sizes are priced differently (a price range), the site's was-price applies per option, so the row leaves `discountPercent` empty and each entry of `variants` carries its own `variantPrice` and `previousPrice`. Furniture products come from an older page layout that carries no category trail, barcodes, videos or energy label, so those fields are empty for them. John Lewis does not publish a stock count, so there is no availability quantity field; the orderable flags say whether a product can be bought online.

Each entry of `reviews` carries `reviewId`, `rating`, `ratingLabel`, `headline`, `text`, `date`, `reviewerName`, `reviewerLocation`, `verifiedBuyer`, `incentivised`, `syndicated` (a review shared from the brand's own site), `sourceSite`, `helpfulCount`, `notHelpfulCount`, `subRatings`, `images` and `reply`. Reviews need **Fetch product details** on and **Max reviews** above 0; a product with no reviews returns an empty list.

**Output views.** The dataset has five views in the Console: **Products**, **Product details**, **Variants** (one row per colour and size option), **Reviews** (one row per review) and **Changes (incremental)**. Each run also stores a run summary under the `OUTPUT` key of its default key-value store.

### How to Use

1. Keep the default **search** mode and add one or more keywords, or switch to **url** mode and paste search, category, brand, product or sitemap links.
2. Narrow with brands, a price range, a minimum rating, offers only or in stock only, and choose a sort order.
3. Keep **Fetch product details** on for the richest rows (it also adds customer reviews, 20 per product by default; set **Max reviews** to 0 to skip them), or turn it off for a cheaper listing-level pull.
4. Set **Max items** to control run size and cost, then click **Start**.

**Quick keyword search:**

```json
{
  "mode": "search",
  "searchTerms": ["laptop"],
  "maxItems": 20
}
```

**Reduced products from one brand, cheapest first:**

```json
{
  "mode": "search",
  "searchTerms": ["headphones"],
  "brands": ["Sony", "Bose"],
  "onlyOffers": true,
  "sortBy": "price_low",
  "maxItems": 50
}
```

**Several links, a few products from each:**

```json
{
  "mode": "url",
  "urls": [
    "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f",
    "https://www.johnlewis.com/brand/acer/_/N-1z13rbe",
    "https://www.johnlewis.com/whistles-camilla-wide-leg-trousers/black/p5966220"
  ],
  "maxItemsPerSearch": 10,
  "maxItems": 30
}
```

#### Run it from your code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("abotapi/johnlewis-com-scraper").call(run_input={"mode": "search", "searchTerms": ["laptop"], "maxItems": 20})
for product in client.dataset(run.default_dataset_id).iterate_items():
    print(product.get("title"), product.get("priceMin"), product.get("currency"))
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('abotapi/johnlewis-com-scraper').call({ mode: 'search', searchTerms: ['laptop'], maxItems: 20 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Or connect it to Make, Zapier, n8n, Google Sheets or webhooks from the **Integrations** tab.

#### Pasted links

- **Search pages** such as `/search?search-term=laptop`, also `&page=2` (starts at that page) and `&sortBy=priceLow` (keeps that sort). Tracking parameters such as `utm_source` or `gclid` are ignored, and the `m.johnlewis.com` host is read like the main one.
- **Category listings** such as `/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f`, also with `?page=2` or a price filter query.
- **Category pages** such as `/electricals/laptops-macbooks/c60000876` list no products themselves: the first product listing below the page is read, so this is a selection, never a complete list.
- **Brand pages** such as `/brand/acer/_/N-1z13rbe` read the brand's own listing. A brand page without its listing id (`/brand/acer`) is not a listing and is skipped.
- **Product pages** such as `/acer-chromebook-314-laptop-.../p115465229`, or a colour link such as `/whistles-camilla-wide-leg-trousers/black/p5966220`, return one complete row with all its variants.
- **Product sitemap files** such as `/sitemap/products/products-00.xml.gz` read products in file order, each from its own page, up to Max items. A file holds about 5,000 products, so a sitemap file is a selection of the catalogue, never a complete list.
- The sitemap index (`/siteindex.xml`), `robots.txt` and app or image addresses are not product listings: they are skipped with a note in the log, and a run given only such links fails at once, before any request.
- Some keywords, such as "sofa", open a furniture range page or a department page on the site instead of a product list. Those searches return nothing, say so in the log and in the run status, and the status names the way out: paste a category listing link instead (a `/browse/.../_/N-...` address from the site's menu) to read such products.

#### Caps and pagination

**Max items** stops the whole run once that many products have been returned (`0` = no cap). **Max items per keyword or link** caps each one on its own, so one large category cannot use up the whole run. **Max pages** limits how many result pages each keyword or link walks; it does not cap the run by itself. Without a cap, each keyword or category is walked to its last page (72 products per page). A pasted link at `page=N` with N above 1 starts at that page and never triggers EXPIRED detection. A run that nears its time limit (the Timeout in the run options) stops starting new pages and product details about 20 seconds before it, returns every row already read, ends with a "Partial results: stopped before the platform timeout" status, marks nothing EXPIRED and never claims it reached the end of the results; give the run more time to collect everything. Set `JOHNLEWIS_COM_STOP_BEFORE_TIMEOUT=0` in the run's environment variables to turn this off.

#### Resume and recurring updates

- **Resume** (`resumeFromRunId`) skips products already collected by an earlier run: paste its run or dataset ID and those products are neither returned nor charged again.
- **Incremental mode** (`incrementalMode`) is for scheduled runs over the same search, link or brand. Each product is classified `NEW`, `UPDATED` (with `changedFields`), `UNCHANGED` (left out and not billed unless `emitUnchanged` is on), `REAPPEARED`, or `EXPIRED` (only with `emitExpired` on, and only after a complete scan: every walk started at page 1 and read as many distinct products as the site's result total, on one listing, with product details on and every wanted product page read; never after a capped, page-limited, cost-limited or resumed run, a pasted later page, a category-page or sitemap link, or a run where any page or product could not be read). Two more checks make a false EXPIRED impossible from John Lewis's own search behaviour: the site can answer the same keyword with two slightly different result sets in turns (measured: "teapot" 62 or 65 products, "laptop" 397 or 446), so a run with `emitExpired` on reads the first results page of every search or link a second time and treats the scan as complete only when both reads show the same total and the same products, and on a keyword search a product missing from the results is marked EXPIRED only when its own product page says it is gone (not found); a product that is still on sale stays tracked, is not returned and is not charged. These checks cost one extra page read per search or link and one product page per missing product, only on runs with `emitExpired` on. The result position and page, the sort, the scrape time, the keyword or link a product was found through, the listing's filter counts, result total and page count, the delivery cut-off and collection times, the main picture gallery (`mainImageUrl`, `imageUrls`, `variantImages`) and the order of the colour swatches, and the promotion category and description text never count as a change: the site swaps these between two reads of an unchanged product. Each variant's own pictures, every price and stock field and the promotion titles are still compared. `ignoreFieldsForChanges` defaults to the average rating (`averageRating`), the review count (`reviewCount`) and the rating percentage (`ratingPercentage`), which drift with every new review; remove names to be told about them, or add more. `changeScope: "priceAndStock"` compares only the price range, the previous price, the out-of-stock and orderable flags and each variant's price and orderable flag; `compactUpdates` returns slim rows with just what moved. If a product's page cannot be read during an incremental run, that product is held back (not returned, not charged, its saved state untouched) and the next run that can read it reports it. `stateKey` names or shares the stored state; leave it empty and the actor derives one from the run's keyword, link, sort and filter setup and the **Fetch product details** setting. Turning **Fetch product details** on or off therefore starts a new campaign: the next run reports every product as NEW again (and bills it as a returned row). To keep one campaign across that change, set the same `stateKey` on both runs. A run that reads a product without its product page (product details off on a shared `stateKey`) compares it only on the listing fields, so missing page fields never make a row UPDATED. At the default memory (256 MB) one state key tracks up to 800 products or 7 MB of saved state, whichever comes first: about 290 products with product details (their rows carry every variant, specification and delivery option) or 800 listing-only products. Each extra 256 MB of run memory adds the same again (1 GB tracks about 1,160 detailed or 3,200 listing-only products): past that, the run still returns the extra products as NEW, says so once in the log, and leaves the saved state unchanged; a saved state over the limit is not loaded and the run starts fresh. Split very large campaigns across several state keys.

#### Alerts

Fill in a Slack incoming webhook, a Discord channel webhook or a chat-bot token with a chat ID, and the actor posts one short summary when the run finishes: the number of rows (and, in incremental mode, how many are new, updated, reappeared or expired) followed by up to **Rows listed per alert** products. With **Alert on changes only** on and Incremental changes on, nothing is sent when nothing changed. Alerts add no charge and never change the run's result; leave every field empty to skip them.

### Send results into your apps (MCP connectors)

Optionally pipe the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. This is an extra delivery step **after** the scrape: the Apify dataset is never changed.

**What gets written to the connector:** a condensed, human-readable **summary** of each record, not the full JSON. Each item becomes one entry with a **title** and its key fields flattened to plain text. The **complete record always stays in the Apify dataset**.

1. Authorize a connector once under **Apify, Settings, Integrations** (Notion, Linear, Airtable, or Apify).
2. Select it in the **"Pipe results into your apps"** input field (`mcpConnectors`). (If the picker is empty, you haven't authorized a connector yet.)
3. For **Notion**, also set `notionParentPageUrl` to the page where items should be created.
4. Optionally set `maxNotifyListings` to cap how many items are written to each connector per run (default 50).

The connection is mediated by Apify's MCP proxy, so this actor never sees your third-party credentials. Leave the field empty to skip.

### Input Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `search` | `search` (keywords) or `url` (pasted links). |
| `searchTerms` | array | `laptop` | Search mode: keywords to search, each read separately. |
| `sortBy` | string | `relevance` | `relevance`, `price_low`, `price_high`, `top_rated` (customer rating), `popularity`, `discount` or `newest`. |
| `brands` | array | (none) | Keep only these brands, spelled as the store spells them; several are combined as "any of these". |
| `minPrice` | integer | (none) | Lowest price kept, in pounds sterling. |
| `maxPrice` | integer | (none) | Highest price kept, in pounds sterling. |
| `minRating` | number | (none) | Only products rated at least this many stars; unrated products are left out. |
| `onlyOffers` | boolean | `false` | Only products that show a reduced price (a previous price in their price history). |
| `inStockOnly` | boolean | `false` | Leave out products the site shows as out of stock. |
| `urls` | array | one link of each shape | URL mode: search, category, brand, product and sitemap links on johnlewis.com, see Pasted links above. Home pages and other site pages are skipped. |
| `fetchDetails` | boolean | `true` | Add description, specifications, variants, barcodes, delivery options, category trail, videos, energy label and reviews to keyword, category, brand and pasted-product rows (charged per enriched row, plus one review unit per row that carries reviews). |
| `maxReviews` | integer | `20` | Newest reviews added to each product row, `0` skips them (needs Fetch product details). A row that carries at least one review is one review unit, however many it holds. |
| `maxPages` | integer | (none) | Optional page limit per keyword or link; does not cap the run, Max items does. |
| `maxItems` | integer | `20` | Cap on the whole run; `0` = no cap. |
| `maxItemsPerSearch` | integer | `0` | Cap per keyword or pasted link; `0` = no per-keyword cap. |
| `proxy` | object | Residential, United Kingdom | Apify Proxy settings, or your own proxy URLs. |
| `resumeFromRunId` | string | (none) | Run or dataset ID whose products are skipped. |
| `incrementalMode` | boolean | `false` | Return only new, changed and reappeared products on repeat runs. |
| `stateKey` | string | (auto) | Name or share the incremental state. |
| `changeScope` | string | `all` | `all` or `priceAndStock`. |
| `compactUpdates` | boolean | `false` | Slim UPDATED rows with only what moved. |
| `expireAfterMissedScans` | integer | `1` | Complete scans a product must be missing before EXPIRED. |
| `emitUnchanged` | boolean | `false` | Also return UNCHANGED rows (billed as rows). |
| `emitExpired` | boolean | `false` | Also return EXPIRED rows after a complete scan (billed as rows). |
| `ignoreFieldsForChanges` | array | rating, review count, rating percentage | Fields that never count as a change; remove names to be told about them. |
| `mcpConnectors` | array | (none) | Optional MCP connectors to send results into, see above. |
| `notionParentPageUrl` | string | (none) | Notion page that receives the items (Notion connector only). |
| `maxNotifyListings` | integer | `50` | Cap on items written to each connector per run. |
| `notifyOnlyChanges` | boolean | `false` | Send the alert only when something changed (needs Incremental changes). |
| `notificationLimit` | integer | `5` | Product rows listed in an alert. |
| `slackWebhookUrl` | string | (none) | Optional Slack incoming webhook for the run summary. |
| `discordWebhookUrl` | string | (none) | Optional Discord channel webhook for the run summary. |
| `chatBotToken` | string | (none) | Optional chat-bot token for the run summary. |
| `chatBotChatId` | string | (none) | Chat ID that receives the summary. |

### Output Example

> Sample shape: values are illustrative placeholders, not from a live record.

```json
{
  "kind": "product",
  "productId": "00000000",
  "title": "Sample Brand Laptop, 8GB RAM, Silver",
  "brand": "Sample Brand",
  "url": "https://www.johnlewis.com/sample-brand-laptop-silver/p00000000",
  "canonicalURL": "https://www.johnlewis.com/sample-brand-laptop-silver/p00000000",
  "description": "Sample product copy as plain text.",
  "productTypeHierarchy": "PRODUCT.Technology.Computers.Laptop",
  "sellingProductType": "Laptops",
  "averageRating": 4.3,
  "reviewCount": 302,
  "ratingPercentage": 86,
  "reviewsReturned": 1,
  "ratingBreakdown": {"5": 200, "4": 60, "3": 20, "2": 10, "1": 12},
  "subRatings": {"Quality": 4.3, "Value": 4.2},
  "reviews": [{"reviewId": "000000001", "rating": 5, "ratingLabel": "Excellent", "headline": "Sample headline", "text": "Sample review text.", "date": "2026-01-01T00:00:00Z", "reviewerName": "Sample", "reviewerLocation": null, "verifiedBuyer": true, "incentivised": false, "syndicated": false, "sourceSite": null, "helpfulCount": 2, "notHelpfulCount": 0, "subRatings": {"Quality": 5, "Value": 4}, "images": null, "reply": {"text": "Sample reply.", "date": "2026-01-02T00:00:00Z", "author": "merchant"}}],
  "mainImageUrl": "https://media.example.com/sample-1",
  "imageUrls": ["https://media.example.com/sample-1", "https://media.example.com/sample-1alt1"],
  "defaultSkuId": "000000000",
  "defaultVariantId": "00000000-0000-0000-0000-000000000000",
  "currency": "GBP",
  "priceMin": 499.99,
  "priceMax": 499.99,
  "priceDisplay": "£499.99",
  "previousPrice": 699,
  "discountPercent": 28.5,
  "reductionHistory": [{"chronology": 0, "min": 699, "max": 699, "display": "£699.00"}],
  "promotions": [{"title": "Save £199.01", "type": "promotional", "description": null, "group": "Save", "category": null, "promotionType": "Save £"}],
  "outOfStock": false,
  "availableToOrder": true,
  "isInStoreOnly": false,
  "isOutlet": false,
  "isProductSet": false,
  "ageRestriction": 0,
  "attributes": [{"key": "memoryram", "name": "Memory (RAM)", "values": ["8GB"], "helpText": null, "heroRanking": 2}],
  "specifications": [{"name": "Memory (RAM)", "values": ["8GB"], "helpText": "Sample help text"}],
  "breadcrumbs": [{"id": "0", "name": "Electricals", "url": "https://www.johnlewis.com/electricals/c0"}],
  "categoryPath": "Electricals > Laptops",
  "fulfilmentOptions": [{"id": "1", "group": "UK", "headline": "Standard Delivery", "shortDescription": "Standard UK delivery", "description": "Sample delivery text.", "price": 0, "priceDisplay": "£0.00"}],
  "deliveryInfo": {"standardDeliveryPrice": 0, "standardDelivery": "Standard UK delivery", "cheapestOptionPrice": 0, "clickAndCollect": true, "options": ["Standard Delivery", "Click & Collect"]},
  "unitOfMeasure": "EACH",
  "variantId": "00000000-0000-0000-0000-000000000000",
  "skuId": "000000000",
  "displayCode": "00000000",
  "variantTitle": "Sample Brand Laptop, 8GB RAM, Silver",
  "colour": "Silver",
  "trueColour": "Silver",
  "variantPrice": 499.99,
  "consumerBarcodes": {"ean13": ["0000000000000"], "upc12": [], "ean8": []},
  "colourSwatches": [{"variantId": "00000000-0000-0000-0000-000000000000", "skuId": "000000000", "colour": "Silver", "url": "https://www.johnlewis.com/sample-brand-laptop-silver/p00000000", "isDefault": true, "available": true}],
  "variants": [{"variantId": "00000000-0000-0000-0000-000000000000", "skuId": "000000000", "colour": "Silver", "size": null, "variantPrice": 499.99, "availableToOrder": true}],
  "position": 1,
  "searchTerm": "laptop",
  "page": 1,
  "totalResults": 400,
  "pagesAvailable": 6,
  "scrapedAt": "2026-01-20T08:00:00+00:00"
}
```

### Plan Requirement

Pay per event: one unit per returned product row, plus an actor start event, plus a detail-enrichment unit for each product row actually enriched with its product page (keyword, category and brand rows, pasted product links and sitemap products, with **Fetch product details** on), plus one review unit for each such row that carries at least one customer review (up to **Max reviews** reviews per row, 20 by default; one unit however many the row holds). Each unit is charged per row, as the row is delivered, never as a single total at the end. A row whose product page could not be read still ships, without the detail unit and without reviews, a row whose reviews could not be read ships without them and without review units, a product with no reviews is not charged for reviews, and an unchanged product left out in incremental mode is neither returned nor charged. With **Fetch product details** off, a pasted product link still returns its full page fields as one row, with no detail unit and no reviews. This actor needs a residential proxy connection: John Lewis refuses or resets part of the requests from datacenter addresses, so the default is the Residential group with the United Kingdom, billed to your own Apify plan, or you can supply your own proxy URLs.

### FAQ

#### How much does it cost?

You pay per product row returned, plus one detail-enrichment unit per product row enriched with its product page and one review unit per row that carries customer reviews (both on by default: 20 reviews per product, set `maxReviews` to 0 to skip them, turn `fetchDetails` off for listing-only rows). The **Pricing** tab shows the current rates. Use **Max items** to cap the cost of any run.

#### Is it legal to scrape johnlewis.com?

This actor collects only publicly available product data that John Lewis shows on its own pages. You are responsible for how you use it: follow John Lewis's terms and the laws that apply to you, and get legal advice if you plan commercial redistribution. Prices and specifications are generally facts, but images and description text may be subject to third-party rights, so handle them in line with the rules that apply to you.

#### Can I get only new or changed products on a schedule?

Yes. Schedule the actor from the **Schedules** tab and turn on **Incremental mode**. Each run then returns only new, updated and reappeared products; unchanged ones are not billed unless you turn `emitUnchanged` on. Use `changeScope: "priceAndStock"` to be told only about price and stock moves.

#### Why does a keyword return fewer products than the site shows?

The site groups the colour and size options of one product into a single entry. Filters you set (brands, price, rating, offers only, in stock only) narrow the same result the site would show, and rows without a rating are dropped when you set a minimum rating. The site's result total also moves a little between reads.

#### Why is there no stock quantity?

John Lewis does not publish stock counts on its pages. Each row instead carries the orderable flags (`outOfStock`, `availableToOrder`, `unavailableReason`) per product and per variant, plus pre-order and release details where they apply.

#### Which proxy should I use?

The default (Residential, United Kingdom) is the setting measured to serve every page this actor reads; datacenter addresses are refused or reset on part of the requests, so a residential connection is required for reliable runs. If the connection you selected is unavailable or keeps getting refused, the run automatically continues on a backup connection (the other Apify proxy tier, then a backup gateway) rather than stopping; that escalation is disclosed in the run log the first time it happens, and any residential traffic it uses is billed to your own Apify plan. Set `JOHNLEWIS_COM_ALTERNATE_CONNECTION=0` in the run's environment variables to disable the backup connection entirely. If you enter your own proxy URLs, they are used as-is with no backup connection; if your proxy re-signs HTTPS traffic, the run says so once in the log ("The custom proxy re-signs HTTPS traffic; retrying without certificate verification for it.") and continues on it.

#### Why did my run fail instead of returning an empty dataset?

If every search or link could not be read, the run stops with a clear message so "no products matched" is never confused with "nothing could be read". Run it again in a few minutes. The messages you may see in the run log:

- When the selected connection is unavailable to your account, the log says: "The selected connection is unavailable to this run. Apify free plans do not include residential proxies. Continuing on a backup connection; some pages may still be unavailable. For residential access, upgrade at https://apify.com/pricing or supply your own proxy URLs."
- When pages are then read over the backup connection: "Served over the backup connection (the default connection was unavailable)." Set `JOHNLEWIS_COM_ALTERNATE_CONNECTION=0` in the run's environment variables to disable the backup connection.
- If the proxy connection is refused for the account and no page could be read: "The proxy connection was refused for this account, so no page could be read. Your Apify plan does not include proxy access; a paid plan is required: https://apify.com/pricing. If you entered your own proxy URLs, check that their credentials are valid."
- If the run reaches the maximum cost per run you set, it stops and its status says: "Stopped early: the run reached the maximum cost per run you set, after N row(s). Nothing more was read, delivered or charged. Raise the maximum cost per run to collect more."
- If the run has no residential access and the backup connection still could not load a usable page: "No results: residential proxies are unavailable on this run (Apify free plans do not include them), and the backup connection could not load the requested pages. Upgrade at https://apify.com/pricing or supply your own proxy URLs, then try again."
- If every request failed for another reason: "Could not load any results page (the requests failed), so nothing was collected. This is a connection problem, not an empty search. Please try again later."

Each of these failure messages ends with how many of your searches or links could not be read (or, in incremental mode, how many products were held back because their page could not be read). A run with no keywords or no supported links fails at once with "Nothing to scrape: add search keywords in Search mode, or paste valid johnlewis.com search, category, brand, product or product sitemap links in URL mode." If only some keywords or links could be read, you still get what was found, and the run's status message says how many could not be read.

#### Why does a row have no description, specifications or variants?

Those fields, and the reviews, come from the product's own page and need **Fetch product details** on keyword, category and brand runs. If a product page could not be read during the run, the row still ships with everything else and is not charged for the missing part.

#### Can I use it with AI agents or MCP?

Yes. Call it from any Apify integration or MCP client, and use the connector field to push results into Notion, Linear or Airtable.

### 🔗 Want more e-commerce data?

Pair this actor with these related scrapers from the same team:

<table>
<tr><td>🛒 <a href="https://apify.com/abotapi/cdon-scraper"><b>CDON Scraper</b></a><br>Scrape CDON (cdon.se, cdon.no, cdon.dk, cdon.fi) marketplace products in Sweden, Norway...</td><td>🛒 <a href="https://apify.com/abotapi/wayfair-scraper"><b>Wayfair Scraper</b></a><br>Scrape Wayfair.com furniture and home products by keyword or URL, including product...</td></tr>
<tr><td>🥦 <a href="https://apify.com/abotapi/leclerc-fr-scraper"><b>E.Leclerc Scraper</b></a><br>Scrape E.Leclerc France (e.leclerc) grocery and retail products. Search by keyword or...</td><td>👗 <a href="https://apify.com/abotapi/otto-de-scraper"><b>OTTO.de Scraper</b></a><br>Scrape OTTO.de products by search or URL. Extract prices, discounts, variants...</td></tr>
<tr><td>🛒 <a href="https://apify.com/abotapi/samsclub-scraper"><b>Sam's Club Scraper</b></a><br>Scrape Sam's Club (samsclub.com) products by keyword, catalogue, category or URL. Extract...</td><td>👗 <a href="https://apify.com/abotapi/yesstyle-com-scraper"><b>YesStyle Scraper</b></a><br>Scrape YesStyle products by keyword or URL. Extract prices, discounts, ratings, stock...</td></tr>
</table>

👉 [Browse all abotapi scrapers](https://apify.com/abotapi)

### 💬 Support

- 🐞 **Found a bug or a missing field?** Open a ticket on the [Issues tab](https://apify.com/abotapi/johnlewis-com-scraper/issues/open). We usually reply within hours.
- 🛠️ **Need another site, extra fields or a private build?** Email <contact@abotapi.com>.
- ⭐ **Enjoying it?** A quick review on the actor page helps other users find it.

# Actor input Schema

## `mode` (type: `string`):

Choose 'search' to run keyword searches or 'url' to paste search, category, brand, product or sitemap links.

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

One or more keywords to search on John Lewis, for example 'laptop', 'sofa bed' or a brand and model. Each keyword is searched separately.

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

Order of the results. A pasted link that carries its own sort keeps it.

## `brands` (type: `array`):

Only return products of these brands, written the way John Lewis shows them (for example 'Sony', 'John Lewis'). Leave empty for all brands.

## `minPrice` (type: `integer`):

Lowest price in pounds sterling (GBP). Leave empty for no lower bound.

## `maxPrice` (type: `integer`):

Highest price in pounds sterling (GBP). Leave empty for no upper bound.

## `minRating` (type: `number`):

Only products rated at least this many stars (1 to 5). Products with no rating are left out. Leave empty for all.

## `onlyOffers` (type: `boolean`):

Only return products that currently show a reduced price (a was-price in the product's price history).

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

Leave out products the site shows as out of stock. Products that can be ordered for later delivery or pre-order stay in.

## `urls` (type: `array`):

Paste John Lewis links: a search page (/search?search-term=laptop, also its \&page=2 and \&sortBy=priceLow forms; tracking parameters are ignored), a category listing (/browse/.../*/N-a8f, also with ?page=2), a category page (/electricals/laptops-macbooks/c60000876, which reads the first product listing below it), a brand page (/brand/acer/*/N-1z13rbe), a product page (/slug/p115465229, also a colour link such as /slug/black/p5966220) or a product sitemap file (/sitemap/products/products-00.xml.gz, read in file order up to Max items). A link with ?page=N starts at that page. Home pages, the sitemap index, a brand page without its listing id and other site pages are skipped.

## `fetchDetails` (type: `boolean`):

Read each keyword, category or brand row's product page, and each pasted product link, to add the description, full specifications, every colour and size variant with its own price, stock and barcodes, delivery options, category trail, videos and energy rating, and (with Max reviews above 0) the customer reviews. Charged once per row enriched with a product page, plus one review unit per row that carries at least one review. Turn off for a cheaper listing-level pull.

## `maxReviews` (type: `integer`):

How many of the newest customer reviews to add to each product row (text, rating, date, reviewer, verified-buyer flag, helpful votes, seller reply, photos), together with the rating breakdown. Default 20; 0 skips reviews. Needs Fetch product details on. A row that carries at least one review is charged one review unit, however many reviews it holds; products without reviews are not charged.

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

Optional. Limits how many result pages each keyword or link walks. Empty or 0 (default) means no page limit; it does NOT cap the run and defers to Max items below, which is the only default cap (20).

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

THE cap on this run: the maximum number of product rows returned across the whole run. Defaults to 20 so a first run is quick and cheap. Use 0 for unlimited (a whole category or search).

## `maxItemsPerSearch` (type: `integer`):

Optional. Caps how many products each keyword or pasted link may return, so one large category cannot use up the whole run. 0 (default) = no per-keyword cap; Max items still caps the run.

## `proxy` (type: `object`):

Leave this on the default (Residential, United Kingdom) for the most reliable results. It is billed to your own Apify plan. You can also paste your own proxy URL.

## `resumeFromRunId` (type: `string`):

Paste a previous run ID or dataset ID to continue a large crawl without returning or charging for products already collected there. For recurring monitoring of the same search, use Incremental mode below instead.

## `incrementalMode` (type: `boolean`):

Turn this on for daily or recurring monitoring. The first run returns every matching product as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED products. A product counts as UPDATED when any of its fields changed, except the result position and page, the sort, the scrape time, the keyword or link it was found through, the listing's filter counts, result total and page count, the delivery cut-off and collection times, the main picture gallery and the order of the colour swatches, the promotion category and description text, and by default its average rating, review count and rating percentage (see Ignore fields below); with 'Price and stock only' just the price range, previous price, out-of-stock and orderable flags and each variant's price and orderable flag are compared. State is kept separately for each keyword, link, sort, filter and detail setup; use State key to name or deliberately share a monitoring campaign.

## `stateKey` (type: `string`):

Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to derive a key automatically from this run's search and filter setup. One state key tracks up to 800 products or 7 MB of saved state at the default 256 MB memory (about 290 products with product details); more memory tracks proportionally more.

## `changeScope` (type: `string`):

'Price and stock only' compares just the price range, the previous price, the out-of-stock and orderable flags and each variant's price and orderable flag; a description, image or promotion text change is treated as UNCHANGED and is never returned or billed as UPDATED. 'All fields' compares the whole record (minus the fields listed under Incremental changes).

## `compactUpdates` (type: `boolean`):

When on, an UPDATED row carries only identifiers plus the price and stock fields that actually moved (priceChanges, variantChanges), instead of the full record. Off by default.

## `expireAfterMissedScans` (type: `integer`):

A tracked product absent from this many consecutive complete scans in a row is marked EXPIRED; fewer misses are held over without being reported. 1 (default) expires on the first miss, matching this actor's previous behaviour.

## `emitUnchanged` (type: `boolean`):

Off by default. Turn on to also return products that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have.

## `emitExpired` (type: `boolean`):

Off by default. Turn on to also return products that were present in a previous run but are no longer found, marked EXPIRED. Only produced after a complete scan: every walk started at page 1 and read as many distinct products as the site's result total, with product details on and every wanted product page read. Before claiming a complete scan the run reads the first results page a second time and needs the same total and the same products (John Lewis can answer one keyword with two slightly different result sets in turns). On a keyword search a missing product is marked EXPIRED only when its own product page says it is gone; a product still on sale stays tracked. Never when Max items, Max pages or the maximum cost per run stopped it, when a pasted link started past page 1, for category-page or sitemap links, when any page or product could not be read, or when Resume was used. This returns, and bills, extra synthetic rows, and costs one extra page read per search or link plus one product page per missing product.

## `ignoreFieldsForChanges` (type: `array`):

Field names that must NOT count as a change in incremental mode. The default list leaves out the average rating (averageRating), the review count (reviewCount) and the rating percentage (ratingPercentage), which drift with every new review; remove names from the list to be told about them. A product whose only differences are in these fields is treated as UNCHANGED, so it is not returned or billed as UPDATED. Names match at any nesting depth. The fields still appear in the output of rows that are returned.

## `mcpConnectors` (type: `array`):

Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; this never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com).

## `notionParentPageUrl` (type: `string`):

URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors.

## `maxNotifyListings` (type: `integer`):

Cap on items written to each connector per run. Does not affect the dataset.

## `notifyOnlyChanges` (type: `boolean`):

Only send the alert when Incremental changes is on and at least one product is NEW, UPDATED, REAPPEARED or EXPIRED. Without Incremental changes every finished run sends its summary.

## `notificationLimit` (type: `integer`):

How many product rows the alert message lists (the run's totals are always in the first line).

## `slackWebhookUrl` (type: `string`):

Optional Slack incoming-webhook URL to post the summary to.

## `discordWebhookUrl` (type: `string`):

Optional Discord channel webhook URL to post the summary to.

## `chatBotToken` (type: `string`):

Optional Chat bot token to post the summary with (needs the chat ID below).

## `chatBotChatId` (type: `string`):

Optional Chat bot chat ID that receives the summary (needs the bot token above).

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "laptop"
  ],
  "sortBy": "relevance",
  "onlyOffers": false,
  "inStockOnly": false,
  "urls": [
    "https://www.johnlewis.com/search?search-term=laptop",
    "https://www.johnlewis.com/search?search-term=laptop&page=2",
    "https://www.johnlewis.com/search?search-term=laptop&sortBy=priceLow",
    "https://www.johnlewis.com/search?search-term=laptop&utm_source=x&gclid=1",
    "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f",
    "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f?page=2",
    "https://www.johnlewis.com/electricals/laptops-macbooks/c60000876",
    "https://www.johnlewis.com/brand/acer/_/N-1z13rbe",
    "https://www.johnlewis.com/acer-chromebook-314-laptop-mediatek-processor-4gb-ram-64gb-emmc-14-inch-wuxga-blue/p115465229",
    "https://www.johnlewis.com/whistles-camilla-wide-leg-trousers/black/p5966220",
    "https://m.johnlewis.com/search?search-term=laptop",
    "https://www.johnlewis.com/sitemap/products/products-00.xml.gz"
  ],
  "fetchDetails": true,
  "maxReviews": 20,
  "maxItems": 20,
  "maxItemsPerSearch": 0,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  },
  "incrementalMode": false,
  "changeScope": "all",
  "compactUpdates": false,
  "expireAfterMissedScans": 1,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "averageRating",
    "reviewCount",
    "ratingPercentage"
  ],
  "maxNotifyListings": 50,
  "notifyOnlyChanges": false,
  "notificationLimit": 5
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `detail` (type: `string`):

No description

## `variants` (type: `string`):

No description

## `reviews` (type: `string`):

No description

## `changes` (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 = {
    "mode": "search",
    "searchTerms": [
        "laptop"
    ],
    "sortBy": "relevance",
    "onlyOffers": false,
    "inStockOnly": false,
    "urls": [
        "https://www.johnlewis.com/search?search-term=laptop",
        "https://www.johnlewis.com/search?search-term=laptop&page=2",
        "https://www.johnlewis.com/search?search-term=laptop&sortBy=priceLow",
        "https://www.johnlewis.com/search?search-term=laptop&utm_source=x&gclid=1",
        "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f",
        "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f?page=2",
        "https://www.johnlewis.com/electricals/laptops-macbooks/c60000876",
        "https://www.johnlewis.com/brand/acer/_/N-1z13rbe",
        "https://www.johnlewis.com/acer-chromebook-314-laptop-mediatek-processor-4gb-ram-64gb-emmc-14-inch-wuxga-blue/p115465229",
        "https://www.johnlewis.com/whistles-camilla-wide-leg-trousers/black/p5966220",
        "https://m.johnlewis.com/search?search-term=laptop",
        "https://www.johnlewis.com/sitemap/products/products-00.xml.gz"
    ],
    "fetchDetails": true,
    "maxReviews": 20,
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "GB"
    },
    "incrementalMode": false,
    "compactUpdates": false,
    "emitUnchanged": false,
    "emitExpired": false,
    "ignoreFieldsForChanges": [
        "averageRating",
        "reviewCount",
        "ratingPercentage"
    ],
    "notifyOnlyChanges": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("abotapi/johnlewis-com-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 = {
    "mode": "search",
    "searchTerms": ["laptop"],
    "sortBy": "relevance",
    "onlyOffers": False,
    "inStockOnly": False,
    "urls": [
        "https://www.johnlewis.com/search?search-term=laptop",
        "https://www.johnlewis.com/search?search-term=laptop&page=2",
        "https://www.johnlewis.com/search?search-term=laptop&sortBy=priceLow",
        "https://www.johnlewis.com/search?search-term=laptop&utm_source=x&gclid=1",
        "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f",
        "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f?page=2",
        "https://www.johnlewis.com/electricals/laptops-macbooks/c60000876",
        "https://www.johnlewis.com/brand/acer/_/N-1z13rbe",
        "https://www.johnlewis.com/acer-chromebook-314-laptop-mediatek-processor-4gb-ram-64gb-emmc-14-inch-wuxga-blue/p115465229",
        "https://www.johnlewis.com/whistles-camilla-wide-leg-trousers/black/p5966220",
        "https://m.johnlewis.com/search?search-term=laptop",
        "https://www.johnlewis.com/sitemap/products/products-00.xml.gz",
    ],
    "fetchDetails": True,
    "maxReviews": 20,
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "GB",
    },
    "incrementalMode": False,
    "compactUpdates": False,
    "emitUnchanged": False,
    "emitExpired": False,
    "ignoreFieldsForChanges": [
        "averageRating",
        "reviewCount",
        "ratingPercentage",
    ],
    "notifyOnlyChanges": False,
}

# Run the Actor and wait for it to finish
run = client.actor("abotapi/johnlewis-com-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 '{
  "mode": "search",
  "searchTerms": [
    "laptop"
  ],
  "sortBy": "relevance",
  "onlyOffers": false,
  "inStockOnly": false,
  "urls": [
    "https://www.johnlewis.com/search?search-term=laptop",
    "https://www.johnlewis.com/search?search-term=laptop&page=2",
    "https://www.johnlewis.com/search?search-term=laptop&sortBy=priceLow",
    "https://www.johnlewis.com/search?search-term=laptop&utm_source=x&gclid=1",
    "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f",
    "https://www.johnlewis.com/browse/electricals/laptops-macbooks/view-all-laptops-macbooks/_/N-a8f?page=2",
    "https://www.johnlewis.com/electricals/laptops-macbooks/c60000876",
    "https://www.johnlewis.com/brand/acer/_/N-1z13rbe",
    "https://www.johnlewis.com/acer-chromebook-314-laptop-mediatek-processor-4gb-ram-64gb-emmc-14-inch-wuxga-blue/p115465229",
    "https://www.johnlewis.com/whistles-camilla-wide-leg-trousers/black/p5966220",
    "https://m.johnlewis.com/search?search-term=laptop",
    "https://www.johnlewis.com/sitemap/products/products-00.xml.gz"
  ],
  "fetchDetails": true,
  "maxReviews": 20,
  "maxItems": 20,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  },
  "incrementalMode": false,
  "compactUpdates": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "averageRating",
    "reviewCount",
    "ratingPercentage"
  ],
  "notifyOnlyChanges": false
}' |
apify call abotapi/johnlewis-com-scraper --silent --output-dataset

```

## MCP server setup

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