# John Lewis Products Listings Crawler (`alkausari_mujahid/john-lewis-products-listings-crawler`) Actor

Crawl any John Lewis listing page and extract every product and colour variant URL — ready to download as JSON or CSV.
Pairs perfectly with the John Lewis Product Details Crawler to build a complete product dataset.

No coding needed — integrate with Google Sheets or Make in one click.

- **URL**: https://apify.com/alkausari\_mujahid/john-lewis-products-listings-crawler.md
- **Developed by:** [Alkausari M](https://apify.com/alkausari_mujahid) (community)
- **Categories:** E-commerce, Automation, Integrations
- **Stats:** 3 total users, 3 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## John Lewis Products Listings Crawler/Scraper

Crawl any John Lewis listing or brand page and extract every product URL — including all colour and variant links — ready to feed into your workflow or pair with the **John Lewis Product Details Crawler** for complete product data.

---

### Who Is This For?

- **Retailers & resellers** who want to monitor John Lewis product ranges
- **Price comparison tools** that need a full catalogue of product URLs
- **E-commerce teams** building product feeds from John Lewis listings
- **Dropshippers** who want to keep their inventory in sync with stock and variants

No coding knowledge required. If you can paste a URL, you can run this Actor.

---

### What It Does

1. You paste one or more John Lewis **category, brand, or search listing URLs**
2. The Actor pages through the results up to your chosen page limit
3. Every product and **every colour/variant URL** is collected and saved
4. Results are delivered as a clean dataset — downloadable as **JSON or CSV**
5. Connect to **Google Sheets** or **Make (formerly Integromat)** to automate the next step

---

### Input

```json
{
  "startUrls": [
    { "url": "https://www.johnlewis.com/brand/flexlux/_/N-pze9" }
  ],
  "lastPageNum": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
````

| Field | Type | Required | Description |
|---|---|---|---|
| `startUrls` | Array | ✅ | One or more John Lewis listing, brand, or search page URLs |
| `lastPageNum` | Number | ✅ | How many pages to crawl per URL (e.g. `5` = first 5 pages) |
| `proxyConfiguration` | Object | ✅ | Proxy settings — Apify Residential proxy recommended for best results |

**Tip:** You can add multiple brand or category URLs to `startUrls` to crawl several ranges in a single run.

***

### Output

Each row in the dataset represents one product variant URL:

```json
[
  {
    "url": "https://www.johnlewis.com/flexlux-volden-relax-recliner-chair/copparo-sandy-biege/p113091750",
    "label": "product"
  },
  {
    "url": "https://www.johnlewis.com/flexlux-volden-relax-recliner-chair/copparo-deep-forest-grey/p113091750",
    "label": "product"
  },
  {
    "url": "https://www.johnlewis.com/flexlux-volden-relax-recliner-chair/dakota-modern-cognac-brown/p113091750",
    "label": "product"
  }
]
```

| Field | Description |
|---|---|
| `url` | Full product variant URL including colour/variant slug |
| `label` | Always `"product"` — useful for filtering in downstream tools |

Results can be downloaded as **JSON** or **CSV** directly from the Apify dataset viewer.

***

### Pair It With the John Lewis Product Details Crawler

This Actor is the **first step** in a two-Actor pipeline:

```
John Lewis Listings Crawler  ──►  John Lewis Product Details Crawler
  (collects all variant URLs)         (extracts full product data,
                                       sizes, prices & descriptions)
```

Feed the output URLs from this Actor directly into the **John Lewis Product Details Crawler** to get complete product information — titles, prices, size variants, descriptions, images, and more — for every URL collected.

***

### Integrations

Once your dataset is ready you can connect it to your existing tools without any coding:

- **Google Sheets** — use the Apify Google Sheets integration to send results directly to a spreadsheet for review or further processing
- **Make (Integromat)** — trigger automated workflows the moment a run finishes, such as updating a database, sending a Slack notification, or pushing data to an eBay listing tool
- **Zapier** — connect to thousands of apps using the Apify Zapier integration
- **Direct download** — export as JSON or CSV from the Apify dataset page at any time

***

### Notes

- Residential proxies are strongly recommended to avoid blocks on John Lewis pages
- Set `lastPageNum` carefully — large ranges with many variants can produce thousands of URLs per run
- This Actor collects URLs only; it does not extract product details — use the companion **John Lewis Product Details Crawler** for that

# Actor input Schema

## `startUrls` (type: `array`):

URLs to start with.

## `lastPageNum` (type: `integer`):

Last Page Number to Crawl

## `proxyConfiguration` (type: `object`):

Proxy settings to use during crawling.

## Actor input object example

```json
{
  "lastPageNum": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "proxyUrls": []
  }
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "proxyUrls": []
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alkausari_mujahid/john-lewis-products-listings-crawler").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 = { "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "proxyUrls": [],
    } }

# Run the Actor and wait for it to finish
run = client.actor("alkausari_mujahid/john-lewis-products-listings-crawler").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "proxyUrls": []
  }
}' |
apify call alkausari_mujahid/john-lewis-products-listings-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=alkausari_mujahid/john-lewis-products-listings-crawler",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "John Lewis Products Listings Crawler",
        "description": "Crawl any John Lewis listing page and extract every product and colour variant URL — ready to download as JSON or CSV.\nPairs perfectly with the John Lewis Product Details Crawler to build a complete product dataset.\n\nNo coding needed — integrate with Google Sheets or Make in one click.",
        "version": "0.0",
        "x-build-id": "KXzvLgTRvqqobPWJC"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/alkausari_mujahid~john-lewis-products-listings-crawler/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-alkausari_mujahid-john-lewis-products-listings-crawler",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/alkausari_mujahid~john-lewis-products-listings-crawler/runs": {
            "post": {
                "operationId": "runs-sync-alkausari_mujahid-john-lewis-products-listings-crawler",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/alkausari_mujahid~john-lewis-products-listings-crawler/run-sync": {
            "post": {
                "operationId": "run-sync-alkausari_mujahid-john-lewis-products-listings-crawler",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "URLs to start with.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "lastPageNum": {
                        "title": "Last Page Number to Crawl",
                        "type": "integer",
                        "description": "Last Page Number to Crawl",
                        "default": 1
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings to use during crawling.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "proxyUrls": []
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
