# Johnlewis Actor (`getdataforme/my-johnlewis-actor`) Actor

The Johnlewis Actor lets you scrape product data from John Lewis effortlessly. Extract product names, prices, images, descriptions, and SKUs from any product page. Perfect for e-commerce insights or price comparisons. Boost your data collection with this efficient and proxy-ready solution!

- **URL**: https://apify.com/getdataforme/my-johnlewis-actor.md
- **Developed by:** [GetDataForMe](https://apify.com/getdataforme) (community)
- **Categories:** E-commerce
- **Stats:** 14 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $9.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

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

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

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

# README

## Johnlewis Actor

#### Scrape Data from John Lewis Web Pages

The Johnlewis Actor allows you to extract product data effortlessly from the John Lewis website. This actor is ideal for collecting detailed information about products, including their names, prices, images, and descriptions.

***

### Input Configuration

The actor accepts a single input object:

```json
{
    "title": "Scrape Johnlewis data from web pages",
    "type": "object",
    "schemaVersion": 1,
    "properties": {
        "urls": {
            "title": "List of URLs of the Johnlewis pages",
            "type": "array",
            "description": "A list of URLs of the web pages you want to scrape data from.",
            "editor": "stringList",
            "prefill": [
                "https://www.johnlewis.com/oura-ring-4-health-fitness-tracker-smart-ring-silver/p112664239"
            ]
        }
    },
    "required": ["urls"]
}
```

- **`urls`** (required): An array of product page URLs from John Lewis that you wish to scrape.

Example:

```json
{
    "urls": [
        "https://www.johnlewis.com/oura-ring-4-health-fitness-tracker-smart-ring-silver/p112664239"
    ]
}
```

***

### Output Result

After successful execution, the actor returns a JSON array containing detailed product information for each URL provided. Below is an example of the output format:

```json
[
    {
        "product_name": "Oura Ring 4 Health & Fitness Tracker Smart Ring, Black",
        "product_price": "349.00",
        "product_image": "https://media.johnlewiscontent.com/i/JohnLewis/112562905",
        "product_url": "https://www.johnlewis.com/oura-ring-4-health-fitness-tracker-smart-ring-black/p112664179",
        "description": "Introducing Oura Ring 4: the latest evolution of the revolutionary smart ring. Oura Ring 4 brings you closer to what matters most — your health. The updated all-titanium design is powered by Smart Sensing, a new sensing platform that doesn’t just measure your biometrics, it adapts to you, providing insights into over 30 biometrics including sleep, readiness, activity, heart health, stress and women’s health. Oura Ring quietly and comfortably monitors your health, and with up to 8 days of battery life — you can forget it’s even on. Sleeker, smarter and more accurate than ever, Oura Ring 4 is made for you. ...",
        "sku": "112562899"
    },
    {
        "product_name": "Oura Ring 4 Health & Fitness Tracker Smart Ring, Silver",
        "product_price": "349.00",
        "product_image": "https://media.johnlewiscontent.com/i/JohnLewis/112562967",
        "product_url": "https://www.johnlewis.com/oura-ring-4-health-fitness-tracker-smart-ring-silver/p112664239",
        "description": "Introducing Oura Ring 4: the latest evolution of the revolutionary smart ring. Oura Ring 4 brings you closer to what matters most — your health. The updated all-titanium design is powered by Smart Sensing, a new sensing platform that doesn’t just measure your biometrics, it adapts to you, providing insights into over 30 biometrics including sleep, readiness, activity, heart health, stress and women’s health. Oura Ring quietly and comfortably monitors your health, and with up to 8 days of battery life — you can forget it’s even on. Sleeker, smarter and more accurate than ever, Oura Ring 4 is made for you. ...",
        "sku": "112562960"
    }
]
```

#### Output Fields

- **`product_name`**: The name of the product.
- **`product_price`**: The price of the product.
- **`product_image`**: URL of the product image.
- **`product_url`**: URL of the product page.
- **`description`**: A detailed description of the product.
- **`sku`**: Stock Keeping Unit, a unique identifier for the product.

***

### How the Johnlewis Actor Works

1. **Input the URLs**: Provide the URLs of the John Lewis product pages you want to scrape.
2. **Run the Actor**: The actor will navigate to each URL and extract product details.
3. **Receive the Output**: The extracted data will be returned in JSON format, as shown above.

***

### Notes

- **Proxy Requirement**: Activate a proxy to avoid potential blocks during scraping. Running without a proxy may result in restricted access or incomplete data extraction.
- **Size of Data**: Ensure the URLs provided are valid and lead to product pages for accurate data retrieval.

***

### Support

For customized output formats or to report any bugs, please contact our support team:

- Email: <support@getdataforme.com>
- Contact Form: <https://getdataforme.com/contact/>

Ensure to include a descriptive subject line in your email for faster resolution. Thank you!

# Actor input Schema

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

A list of URLs of the web pages you want to scrape data from.

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

Specifies proxy servers that will be used by the scraper in order to hide its origin.

## Actor input object example

```json
{
  "urls": [
    "https://www.johnlewis.com/oura-ring-4-health-fitness-tracker-smart-ring-silver/p112664239"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "urls": [
        "https://www.johnlewis.com/oura-ring-4-health-fitness-tracker-smart-ring-silver/p112664239"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforme/my-johnlewis-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": ["https://www.johnlewis.com/oura-ring-4-health-fitness-tracker-smart-ring-silver/p112664239"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("getdataforme/my-johnlewis-actor").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.johnlewis.com/oura-ring-4-health-fitness-tracker-smart-ring-silver/p112664239"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call getdataforme/my-johnlewis-actor --silent --output-dataset

```

## MCP server setup

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

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RNSke7RDFJVKKJvvu/builds/rwWIf34moVltXN3yB/openapi.json
