# Marks & Spencer Product Scraper (`sian.agency/marks-and-spencer-product-scraper`) Actor

Scrape Marks & Spencer products — fashion, home & beauty. Search or browse by department, get prices, was-prices, ratings, colour/size variants, images, material & care specs.

- **URL**: https://apify.com/sian.agency/marks-and-spencer-product-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** E-commerce, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 overview product extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are 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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Marks & Spencer Product Scraper — Prices, Variants, Ratings & Specs to JSON/CSV 🚀

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Nike Product Scraper](https://img.shields.io/badge/Store-Nike%20Product%20Scraper-111111)](https://apify.com/sian.agency/nike-product-scraper?fpr=sian) [![Currys Product Scraper](https://img.shields.io/badge/Store-Currys%20Product%20Scraper-6E2585)](https://apify.com/sian.agency/currys-product-scraper?fpr=sian) [![Tesco Product Scraper](https://img.shields.io/badge/Store-Tesco%20Product%20Scraper-00539F)](https://apify.com/sian.agency/tesco-product-scraper?fpr=sian)

#### 🎉 Turn any M&S search, category, or product page into a clean dataset — prices, was-prices, colour & size variants, ratings, images, and full material & care specs in a single run.
##### Perfect for fashion price analysts, retail buyers, comparison sites, and catalog teams who need reliable Marks & Spencer data without lifting a finger.

---

### 📋 Overview

**The Marks & Spencer Product Scraper turns marksandspencer.com into structured data in seconds.** Search by keyword, browse any department or category, apply M&S's own filters, or paste product and listing URLs — and get a clean JSON/CSV dataset with one row per product covering prices, was-prices, ratings, colour and size variants, images, availability, and full material and care specs.

No account, no API key, no setup. Just enter what you want, click Run, and download export-ready data for price and discount monitoring, competitor intelligence, and catalog enrichment across M&S fashion, home & beauty.

**Why professionals choose us:**
- ✅ **Zero Setup**: No M&S account or API key — enter keywords, a department, or URLs and go
- ⚡ **Fast Overview Mode**: Pull search and category results at scale (48 products per page) — id, brand, title, price, was-price, rating, variants, images, and stock
- 🏷️ **Discounts Built In**: Capture both the current price and the original was-price so you can measure real markdowns and track promotions
- 👗 **Deep Detail Mode**: Enrich every product with full description, material & composition, care specs, every colour & size, all images, and the complete ratings breakdown
- 💰 **Pay-Per-Result Pricing**: Only pay for the products you actually receive — plus a free tier to test risk-free
- 💎 **One Clean Record Per Product**: Overview and detail are merged into a single row — no stitching, no duplicates
- ✨ **NEW: Ratings Deep-Dive**: Get the full star distribution plus TrueToSize, Value, Style, and Material sub-scores for every product

---

### ✨ Features

- 🔍 **Keyword & Category Search**: Find products by free-text search or by browsing any M&S department and category
- 🗂️ **Department Browsing**: Target women, men, kids, lingerie, beauty, home-and-furniture, flowers-and-plants, or gifts
- 🎛️ **Native M&S Filters**: Apply M&S's own facet filters (colour, size, material, style — e.g. `blue`, `cotton`, `midi-dresses`)
- 🔗 **Paste M&S URLs**: Drop in any marksandspencer.com search or product-listing URL and scrape it directly
- ⚡ **Overview Mode**: Fast results extraction — product id, brand & sub-brand, title, product type, price, was-price, rating, review count, hero images, colour/size variants, stock, and labels
- 📝 **Detail Mode**: Full description, material & composition, care specs, every colour & size, the complete image gallery, availability, and the ratings breakdown
- 🏷️ **Price & Discount Capture**: Current price and original was-price in GBP (£) for true markdown tracking
- ⭐ **Ratings & Review Signals**: Average rating, review count, star distribution, and TrueToSize / Value / Style / Material sub-scores
- 📦 **Availability Intelligence**: In-stock status and stock indicator for stock and range checks
- 🎚️ **Sorting & Price Band**: Sort by relevance, new-in, best-selling, price low→high, price high→low, or rating — plus a min/max price band
- 💾 **Clean JSON & CSV**: Export-ready dataset with one row per product, priced in GBP (£)

---

### 🎬 Quick Start

Enter keywords, a department & category, native filters, or M&S URLs, pick a mode, and click Run. Results land in your dataset ready to export.

```bash
## Run via API - one line
curl -X POST https://api.apify.com/v2/acts/sian.agency~marks-and-spencer-product-scraper/runs?token=[YOUR_TOKEN] \
-d '{"queries": ["cashmere jumper"], "scrapeMode": "overview"}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Tell It What to Scrape

Enter search keywords (e.g. `cashmere jumper`, `midi dress`, `bath towels`), pick a department and category (e.g. `women` + `dresses`), add M\&S facet filters, or paste marksandspencer.com URLs. Mix and match as needed.

#### Step 2: Choose Mode & Filters

Pick **Overview** (fast search and category data) or **Detail** (enriched with description, material, care specs, and full ratings breakdown). Optionally set a sort order (relevance, new, best-selling, price low→high, price high→low, rating) and a min/max price band.

#### Step 3: Run & Download

Click Run and download clean, structured data as JSON, CSV, or Excel — ready for spreadsheets, databases, and analytics tools.

**That's it! In minutes, you'll have:**

- Live prices and original was-prices, so you can track discounts and markdowns
- Ratings, review counts, images, colour/size variants, and availability for every product
- Full descriptions, material & composition, care specs, and the ratings deep-dive (detail mode)
- Clean export-ready data priced in GBP (£), one row per product

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| queries | array | No | Free-text M\&S searches, one per line (e.g. `"cashmere jumper"`, `"midi dress"`) |
| scrapeMode | string | No | `overview` (fast) or `detail` (description, material, care specs, full ratings) |
| department | string | No | Top department to browse: `women`, `men`, `kids`, `lingerie`, `beauty`, `home-and-furniture`, `flowers-and-plants`, `gifts` |
| category | string | No | Category subpath under the department (e.g. `dresses`) |
| facets | array | No | M\&S fs5 filter slugs — colour / size / material / style (e.g. `blue`, `cotton`, `midi-dresses`) |
| urls | array | No | Paste M\&S product-listing or search URLs to scrape directly |
| sort | string | No | `relevance`, `new`, `best_selling`, `price_low`, `price_high`, `rating` |
| minPrice | number | No | Only return products at or above this price (GBP) |
| maxPrice | number | No | Only return products at or below this price (GBP) |
| maxResults | integer | No | Maximum number of products to return across all searches |

**Example — keyword search, detail mode:**

```json
{
  "queries": ["cashmere jumper"],
  "scrapeMode": "detail",
  "sort": "price_low",
  "minPrice": 20,
  "maxPrice": 120,
  "maxResults": 100
}
```

**Example — browse a department & category with M\&S filters:**

```json
{
  "department": "women",
  "category": "dresses",
  "facets": ["midi-dresses", "blue"],
  "scrapeMode": "overview",
  "sort": "best_selling"
}
```

**Example — scrape M\&S URLs directly:**

```json
{
  "urls": [
    "https://www.marksandspencer.com/l/women/dresses",
    "https://www.marksandspencer.com/search?q=cashmere+jumper"
  ],
  "scrapeMode": "detail"
}
```

***

### 📤 Output

Results are saved to the Apify dataset with **30+ fields per product**, one clean row each. In detail mode, the overview row is enriched in place with the description, material, care specs, every colour & size, the full image gallery, and the ratings breakdown — no separate records to merge.

| Field | Type | Description |
|-------|------|-------------|
| item\_id | string | M\&S product ID |
| productTitle | string | Full product name |
| url | string | Product page URL |
| brand | string | Brand name (e.g. Autograph, M\&S Collection) |
| sub\_brand | string | Sub-brand, when present |
| product\_type | string | Product type (e.g. Jumpers, Dresses) |
| department | string | Department the product sits in |
| price | number | Current price (GBP) |
| original\_price | number | Original was-price before markdown (GBP) |
| currency | string | Currency code (GBP) |
| rating | number | Average star rating |
| review\_count | number | Total number of reviews |
| in\_stock | boolean | Whether the product is currently in stock |
| stock\_indicator | string | Stock-level indicator |
| images | array | Full product image gallery |
| breadcrumbs | array | Category breadcrumb trail |
| labels | array | Product labels / badges (e.g. new-in, offer) |
| colours | array | Available colours |
| sizes | array | Available sizes |
| variant\_count | number | Number of colour/size variants |
| description | string | Full product description (detail) |
| material | string | Material / composition (detail) |
| specs | object | Care & product specs, e.g. machine washable, fit (detail) |
| rating\_distribution | object | Star distribution — count per 1–5 stars (detail) |
| secondary\_ratings | object | TrueToSize, Value, Style, Material sub-scores (detail) |
| metadata | object | Run metadata (mode, searches, sort, timestamp) |

**Full example (detail mode):**

```json
{
  "thumbnail": "https://assets.digitalcontent.marksandspencer.app/images/q_auto,f_auto/SD_03_T30_4141A_F3_X_EC_0/Pure-Cashmere-V-Neck-Jumper",
  "item_id": "60744578",
  "productTitle": "Pure Cashmere V-Neck Jumper",
  "url": "https://www.marksandspencer.com/pure-cashmere-v-neck-jumper/p/clp60744581?color=DARKNAVY",
  "source": "detail",
  "brand": "Autograph",
  "sub_brand": null,
  "product_type": "Jumpers",
  "department": "men",
  "external_id": "P60744581",
  "price": 99,
  "original_price": null,
  "currency": "GBP",
  "rating": 4.53,
  "review_count": 58,
  "images": [
    "https://assets.digitalcontent.marksandspencer.app/images/.../F3_X_EC_0/Pure-Cashmere-V-Neck-Jumper",
    "https://assets.digitalcontent.marksandspencer.app/images/.../F3_X_EC_90/Pure-Cashmere-V-Neck-Jumper",
    "https://assets.digitalcontent.marksandspencer.app/images/.../F3_X_EC_1/Pure-Cashmere-V-Neck-Jumper"
  ],
  "in_stock": true,
  "stock_indicator": "M",
  "breadcrumbs": ["Men", "Men's Knitwear", "Men's Jumpers"],
  "labels": [],
  "colours": ["Dark Navy", "Black", "Smokey Blue"],
  "sizes": ["S Regular", "M Regular", "L Regular", "XL Regular", "2XL Regular"],
  "variant_count": 3,
  "description": "Add a touch of luxury to your knitwear collection with this cashmere jumper from our Autograph collection. It's made from pure cashmere for a soft and comfortable feel. A v-neck and ribbed trims add classic finishing touches.",
  "material": "100% cashmere",
  "specs": {
    "Regular fit": "Yes",
    "Machine washable": "Yes",
    "Product type": "Jumpers"
  },
  "rating_distribution": { "1": 2, "2": 1, "3": 2, "4": 12, "5": 41 },
  "secondary_ratings": {
    "TrueToSize": 4.15,
    "Value": 4.64,
    "Style": 4.45,
    "Material": 4.45
  },
  "metadata": {
    "scrapeMode": "detail",
    "sort": "relevance",
    "scrapedAt": "2026-07-14T15:28:28.680Z"
  }
}
```

***

### 💼 Use Cases & Examples

#### 1. Fashion Price & Discount Monitoring

**Retail and pricing teams tracking M\&S prices, was-prices, and markdowns over time.**

**Input:** Keywords, or a department & category for your product lines
**Output:** Current price, original was-price, and labels for every product
**Use:** Detect price drops and seasonal markdowns the moment they go live and react faster.

#### 2. Competitor & Assortment Intelligence

**Category managers and buyers mapping what M\&S carries and how it's priced.**

**Input:** Department and category paths (e.g. `women` + `dresses`), overview mode
**Output:** Full product lists with brand, sub-brand, product type, price, rating, and breadcrumbs
**Use:** Understand range breadth, brand mix, colour/size depth, and price distribution at a glance.

#### 3. Product Feeds & Catalog Enrichment

**App, feed, and marketplace teams building rich M\&S product catalogs.**

**Input:** Keywords or URLs, detail mode
**Output:** Descriptions, material & composition, care specs, colours, sizes, and full image galleries
**Use:** Populate product feeds and catalogs with accurate, export-ready fashion and home data.

#### 4. In-Stock & Availability Tracking

**Resellers and analysts monitoring what's available at M\&S.**

**Input:** Keywords or URLs for the products you follow
**Output:** In-stock status and stock indicator for every product
**Use:** Track availability and sell-through and only surface what's actually in stock.

#### 5. Material & Care-Label Extraction

**Sustainability, sourcing, and quality teams needing composition and care data.**

**Input:** Product URLs or keywords, detail mode
**Output:** Material & composition (e.g. `100% cashmere`) and care specs (machine washable, fit, and more)
**Use:** Build fabric and care databases for sourcing, compliance, and product comparison.

#### 6. Ratings & Review-Signal Research

**Insight teams studying how M\&S products are received.**

**Input:** Keywords or a category, detail mode
**Output:** Average rating, review count, star distribution, and TrueToSize / Value / Style / Material sub-scores
**Use:** Benchmark product sentiment, fit accuracy, and perceived value across a range.

#### 7. Trend & New-In Tracking

**Trend forecasters and merchandisers watching what's launching at M\&S.**

**Input:** A department & category sorted by `new`, or keywords with the new-in labels
**Output:** Freshly listed products with brand, price, colours, images, and labels
**Use:** Spot new arrivals and emerging styles early to inform buying and content calendars.

***

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/marks-and-spencer-product-scraper').call({
  queries: ['cashmere jumper'],
  scrapeMode: 'detail',
  maxResults: 100
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/marks-and-spencer-product-scraper').call(
    run_input={'queries': ['cashmere jumper'], 'scrapeMode': 'detail'}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~marks-and-spencer-product-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"queries": ["cashmere jumper"], "scrapeMode": "detail"}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: Schedule or webhook
2. **HTTP Request**: Call the actor API
3. **Process**: Handle the JSON product results
4. **Action**: Save to a database, update a pricing sheet, or send an alert

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **Up to 25 products** per run — full feature access, same data quality
- No credit card required
- Perfect for testing keywords, departments, and detail mode

#### PAID Tier (Production Ready)

- **Unlimited** products per run
- Faster, at-scale extraction with no caps
- **Pay-per-result**: you're only charged for products that are successfully extracted

💰 **Fair, transparent pricing** — pay for the products you get, nothing more.

🔗 [View current pricing](https://apify.com/sian.agency/marks-and-spencer-product-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: How many products can I scrape?**
A: FREE tier: up to 25 products per run. PAID tier: unlimited.

**Q: Do I need a Marks & Spencer account or API key?**
A: No. There's nothing to sign up for or configure — just enter keywords, a department, facets, or URLs and run.

**Q: What's the difference between Overview and Detail mode?**
A: Overview is the fast path — search and category data like product id, brand, title, product type, price, was-price, rating, review count, hero images, colour/size variants, and stock. Detail enriches each product with the full description, material & composition, care specs, every colour & size, the complete image gallery, availability, and the ratings breakdown (star distribution plus TrueToSize, Value, Style, and Material sub-scores).

**Q: Does it capture discounts and was-prices?**
A: Yes — every product includes the current price and, where present, the original was-price in GBP (£), so you can measure real markdowns.

**Q: Can I filter and sort results?**
A: Yes — sort by relevance, new, best-selling, price low→high, price high→low, or rating, apply M\&S's own facet filters (colour, size, material, style), and set a min/max price band.

**Q: What output formats are available?**
A: JSON, CSV, and Excel — export directly from the Apify dataset.

**Q: Which region and currency does it cover?**
A: The UK storefront (marksandspencer.com), with prices in GBP (£).

**Q: Is this legal?**
A: Yes — the actor accesses only publicly available data. See the [legal section](#-is-it-legal-to-scrape-data) below.

***

### 🐛 Troubleshooting

**No results returned**

- Check keyword spelling and try broader terms (e.g. `jumper` instead of an exact product name)
- Remove or widen filters (facets, min/max price) and confirm the department/category path is valid
- Verify any M\&S URLs open correctly in a browser

**Description, material, or care specs are missing**

- Switch `scrapeMode` to `detail` — descriptions, material & composition, care specs, and the ratings breakdown are only extracted in detail mode

**Fewer products than expected**

- FREE tier is capped at 25 products per run — upgrade to PAID for unlimited results
- Some categories or filtered searches simply contain fewer products

**Prices look different from what I expect**

- Results reflect the UK storefront (marksandspencer.com) in GBP (£); promotions may change and online prices can differ from in-store

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what is publicly available. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data (for example, reviewer names). Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

**Trademark & affiliation disclaimer:** This actor and SIÁN Agency are independent and are **not affiliated with, endorsed by, or sponsored by Marks and Spencer plc** or "M\&S". "Marks & Spencer", "M\&S", and all related names, marks, and logos are trademarks of their respective owners. This actor is not an official Marks & Spencer product or service; it extracts only publicly available data for legitimate research purposes, and users are responsible for ensuring their use complies with all applicable laws and terms.

***

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue in the actor's repository
- Check the [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- ✉️ <apify@sian-agency.online>

**Enjoying the actor?** Please leave a ⭐⭐⭐⭐⭐ review on the actor page — it genuinely helps and lets us keep improving it.

**More UK-retail scrapers from SIÁN Agency:**

- [Nike Product Scraper](https://apify.com/sian.agency/nike-product-scraper?fpr=sian)
- [Currys Product Scraper](https://apify.com/sian.agency/currys-product-scraper?fpr=sian)
- [Tesco Product Scraper](https://apify.com/sian.agency/tesco-product-scraper?fpr=sian)
- [Browse all SIÁN Agency actors](https://apify.com/sian.agency?fpr=sian)

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `queries` (type: `array`):

🔍 **KEYWORD SEARCH:** Free-text Marks & Spencer searches — exactly what you'd type into the marksandspencer.com search bar.

📝 **EXAMPLES:** `cashmere jumper` · `midi dress` · `school shoes` · `bath towels` · `silk pillowcase`

💡 **TIP:** Add one search per line — each runs as its own search and all results land in the same dataset.

🖊️ **BULK EDIT:** Click "Bulk edit" to paste many searches at once (one per line).

✅ **IMPORTANT:** Provide searches, a department / category, OR M\&S URLs (at least one is needed to have something to scrape).

## `scrapeMode` (type: `string`):

⚙️ **SCRAPE DEPTH:** Choose how much data to pull per product.

⚡ **Overview (fast):** Search / category cards only — id, brand, title, product type, price & was-price, rating & review count, images, colour & size variants, stock and labels. 48 products per page — the fastest and cheapest path.

🔬 **Detail (description + material + care specs):** Everything in Overview PLUS the full product description, material / composition, care & attribute specs, every colour and size, the complete image gallery, availability and the ratings breakdown scraped from each product page — all merged into one record.

💡 **TIP:** Start with Overview to scope your catalog, then switch to Detail when you need descriptions, materials and care data.

## `department` (type: `string`):

🏬 **DEPARTMENT (optional):** Browse a whole top-level M\&S department instead of (or alongside) a keyword search.

📂 **SUPPORTED:** `women` · `men` · `kids` · `lingerie` · `beauty` · `home-and-furniture` · `flowers-and-plants` · `gifts`

💡 **TIP:** Combine with **Category** below to drill into a specific sub-section. Leave blank if you're only using searches or URLs.

## `category` (type: `string`):

🗂️ **CATEGORY (optional):** Category subpath under the chosen **Department** — mirrors the M\&S left-hand navigation.

📝 **EXAMPLES:** `dresses` · `dresses/midi-dresses` · `knitwear` · `bedding`

💡 **TIP:** Requires **Department** to be set. Use the tail of the M\&S category URL (e.g. for `/l/women/dresses/midi-dresses` enter `dresses/midi-dresses`).

## `facets` (type: `array`):

🎨 **FACET FILTERS (optional):** M\&S `fs5` facet slugs — colour, size, material or style — applied to your department / category browse, exactly like the site's own filters.

📝 **EXAMPLES:** `blue` · `cotton` · `midi-dresses` · `black` · `wool`

🖊️ **BULK EDIT:** Add one facet slug per line to stack multiple filters.

💡 **TIP:** Leave empty to include everything.

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

🔗 **PASTE M\&S URLs (optional):** Paste full Marks & Spencer product-list (PLP) or search URLs to scrape them verbatim — any filters and sorting already in the URL are preserved.

📝 **EXAMPLE:** `https://www.marksandspencer.com/l/women/dresses`

🖊️ **BULK EDIT:** Add one URL per line to sweep several pages in a single run.

## `sort` (type: `string`):

🔃 **RESULT ORDERING:** Order listings using Marks & Spencer's own native sort options — so you get the same ranking real shoppers see.

⭐ **Relevance** surfaces the best-matching products first · 🆕 **Newest** first · 🔥 **Best Selling** · 💲 **Price** low↔high · 🌟 **Top Rated** by customer rating.

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

💵 **MINIMUM PRICE:** Only return products at or above this price (GBP). Applied client-side after fetching. Leave blank for no lower bound.

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

💰 **MAXIMUM PRICE:** Only return products at or below this price (GBP). Applied client-side after fetching. Leave blank for no upper bound.

## `maxResults` (type: `integer`):

🔢 **RESULT CAP:** Maximum number of products to return across all searches, departments and URLs combined.

🎁 **TIER-BASED LIMITS:**

- **FREE users:** Up to 25 products per run
- **PAID users:** Unlimited — scrape entire catalogs in a single run

💡 **TIP:** Keep this low while you dial in your searches, then raise it once the output looks right.

## Actor input object example

```json
{
  "queries": [
    "cashmere jumper"
  ],
  "scrapeMode": "overview",
  "sort": "relevance",
  "maxResults": 100
}
```

# Actor output Schema

## `marksAndSpencerProducts` (type: `string`):

Scraped Marks & Spencer products with prices, was-prices, ratings, colour / size variants, images, material and care specs.

# 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 = {
    "queries": [
        "cashmere jumper"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/marks-and-spencer-product-scraper").call(input);

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = { "queries": ["cashmere jumper"] }

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/marks-and-spencer-product-scraper").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 '{
  "queries": [
    "cashmere jumper"
  ]
}' |
apify call sian.agency/marks-and-spencer-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sian.agency/marks-and-spencer-product-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Marks & Spencer Product Scraper",
        "description": "Scrape Marks & Spencer products — fashion, home & beauty. Search or browse by department, get prices, was-prices, ratings, colour/size variants, images, material & care specs.",
        "version": "1.0",
        "x-build-id": "zFPOR7TS6eG1ga4I9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~marks-and-spencer-product-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-marks-and-spencer-product-scraper",
                "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/sian.agency~marks-and-spencer-product-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-marks-and-spencer-product-scraper",
                "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/sian.agency~marks-and-spencer-product-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-marks-and-spencer-product-scraper",
                "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": {
                    "queries": {
                        "title": "🔍 Search Queries",
                        "type": "array",
                        "description": "🔍 **KEYWORD SEARCH:** Free-text Marks & Spencer searches — exactly what you'd type into the marksandspencer.com search bar.\n\n📝 **EXAMPLES:** `cashmere jumper` · `midi dress` · `school shoes` · `bath towels` · `silk pillowcase`\n\n💡 **TIP:** Add one search per line — each runs as its own search and all results land in the same dataset.\n\n🖊️ **BULK EDIT:** Click \"Bulk edit\" to paste many searches at once (one per line).\n\n✅ **IMPORTANT:** Provide searches, a department / category, OR M&S URLs (at least one is needed to have something to scrape).",
                        "default": [
                            "cashmere jumper"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "scrapeMode": {
                        "title": "⚙️ Scrape Mode",
                        "enum": [
                            "overview",
                            "detail"
                        ],
                        "type": "string",
                        "description": "⚙️ **SCRAPE DEPTH:** Choose how much data to pull per product.\n\n⚡ **Overview (fast):** Search / category cards only — id, brand, title, product type, price & was-price, rating & review count, images, colour & size variants, stock and labels. 48 products per page — the fastest and cheapest path.\n\n🔬 **Detail (description + material + care specs):** Everything in Overview PLUS the full product description, material / composition, care & attribute specs, every colour and size, the complete image gallery, availability and the ratings breakdown scraped from each product page — all merged into one record.\n\n💡 **TIP:** Start with Overview to scope your catalog, then switch to Detail when you need descriptions, materials and care data.",
                        "default": "overview"
                    },
                    "department": {
                        "title": "🏬 Department",
                        "type": "string",
                        "description": "🏬 **DEPARTMENT (optional):** Browse a whole top-level M&S department instead of (or alongside) a keyword search.\n\n📂 **SUPPORTED:** `women` · `men` · `kids` · `lingerie` · `beauty` · `home-and-furniture` · `flowers-and-plants` · `gifts`\n\n💡 **TIP:** Combine with **Category** below to drill into a specific sub-section. Leave blank if you're only using searches or URLs."
                    },
                    "category": {
                        "title": "🗂️ Category",
                        "type": "string",
                        "description": "🗂️ **CATEGORY (optional):** Category subpath under the chosen **Department** — mirrors the M&S left-hand navigation.\n\n📝 **EXAMPLES:** `dresses` · `dresses/midi-dresses` · `knitwear` · `bedding`\n\n💡 **TIP:** Requires **Department** to be set. Use the tail of the M&S category URL (e.g. for `/l/women/dresses/midi-dresses` enter `dresses/midi-dresses`)."
                    },
                    "facets": {
                        "title": "🎨 Facet Filters",
                        "type": "array",
                        "description": "🎨 **FACET FILTERS (optional):** M&S `fs5` facet slugs — colour, size, material or style — applied to your department / category browse, exactly like the site's own filters.\n\n📝 **EXAMPLES:** `blue` · `cotton` · `midi-dresses` · `black` · `wool`\n\n🖊️ **BULK EDIT:** Add one facet slug per line to stack multiple filters.\n\n💡 **TIP:** Leave empty to include everything.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "urls": {
                        "title": "🔗 M&S URLs",
                        "type": "array",
                        "description": "🔗 **PASTE M&S URLs (optional):** Paste full Marks & Spencer product-list (PLP) or search URLs to scrape them verbatim — any filters and sorting already in the URL are preserved.\n\n📝 **EXAMPLE:** `https://www.marksandspencer.com/l/women/dresses`\n\n🖊️ **BULK EDIT:** Add one URL per line to sweep several pages in a single run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sort": {
                        "title": "🔃 Sort Order",
                        "enum": [
                            "relevance",
                            "new",
                            "best_selling",
                            "price_low",
                            "price_high",
                            "rating"
                        ],
                        "type": "string",
                        "description": "🔃 **RESULT ORDERING:** Order listings using Marks & Spencer's own native sort options — so you get the same ranking real shoppers see.\n\n⭐ **Relevance** surfaces the best-matching products first · 🆕 **Newest** first · 🔥 **Best Selling** · 💲 **Price** low↔high · 🌟 **Top Rated** by customer rating.",
                        "default": "relevance"
                    },
                    "minPrice": {
                        "title": "💵 Min Price (GBP)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "💵 **MINIMUM PRICE:** Only return products at or above this price (GBP). Applied client-side after fetching. Leave blank for no lower bound."
                    },
                    "maxPrice": {
                        "title": "💰 Max Price (GBP)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "💰 **MAXIMUM PRICE:** Only return products at or below this price (GBP). Applied client-side after fetching. Leave blank for no upper bound."
                    },
                    "maxResults": {
                        "title": "🔢 Max Results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "🔢 **RESULT CAP:** Maximum number of products to return across all searches, departments and URLs combined.\n\n🎁 **TIER-BASED LIMITS:**\n- **FREE users:** Up to 25 products per run\n- **PAID users:** Unlimited — scrape entire catalogs in a single run\n\n💡 **TIP:** Keep this low while you dial in your searches, then raise it once the output looks right.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
