# MediaMarkt Spain Scraper — Electronics Prices & Data (`studio-amba/mediamarkt-es-scraper`) Actor

Scrape products from MediaMarkt.es, Spain's largest electronics retailer. Extract names, brands, prices, EAN codes, ratings, reviews, stock and images by keyword. No login, no cookies.

- **URL**: https://apify.com/studio-amba/mediamarkt-es-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 result scrapeds

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

## What's an Apify Actor?

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

## How to integrate an Actor?

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

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

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

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

# README

## MediaMarkt Spain Scraper

Scrape products from [MediaMarkt.es](https://www.mediamarkt.es), Spain's largest consumer-electronics retailer. Search by keyword and pull clean, structured product data: names, brands, prices, original prices, discounts, EAN barcodes, ratings, review counts, stock status, categories, and images.

No login. No cookies. No account required.

### What this scraper does

Give it a Spanish keyword ("lavadora", "portátil", "televisor", "auriculares", "iphone") and it returns matching MediaMarkt products as flat JSON rows. Each row is a real product with its current online price, brand, EAN barcode, rating, stock status, and image, ready to load into a spreadsheet, database, or price-monitoring pipeline.

MediaMarkt sits behind Cloudflare bot protection. This actor handles that for you and reads the product data straight from the storefront's own server-rendered state, so the output is clean and complete without any DOM guesswork.

### Why use this scraper?

- **Price monitoring** — Track MediaMarkt prices for laptops, phones, TVs, cameras, and appliances over time and catch discounts as they land.
- **Competitive analysis** — Compare MediaMarkt pricing against El Corte Inglés, PcComponentes, Amazon, and other Spanish electronics retailers on matching EAN codes.
- **Market research** — Analyse assortment, brand coverage, and pricing across every electronics category.
- **Retail intelligence** — Monitor online stock status and discount percentages across large product ranges.
- **Catalogue enrichment** — Match products by EAN to enrich your own catalogue with images, ratings, and category data.
- **Brand monitoring** — Track how your brand's products are priced, rated, and merchandised on MediaMarkt.
- **Data journalism & academia** — Build datasets on Spanish consumer-electronics pricing and consumer ratings.
- **Reselling & arbitrage** — Find discounted lines and price gaps against other Spanish and EU electronics retailers.

### How to scrape mediamarkt.es data

1. **Create an Apify account** — Sign up at [apify.com](https://apify.com) (free tier available).
2. **Open the MediaMarkt Spain Scraper** — Navigate to this actor's page in the Apify Store.
3. **Enter a search term** — Type a Spanish product keyword (e.g., "lavadora", "portátil", "televisor"). The scraper matches it against MediaMarkt's full catalogue.
4. **Refine (optional)** — Restrict to in-stock items, or raise the delay between requests for very large runs.
5. **Set a result limit** — Choose how many products you want (default: 100).
6. **Run the actor** — Click "Start".
7. **Download your data** — Export as JSON, CSV, or Excel from the Dataset tab, or pull it via the Apify API for automated workflows.

### Input

| Field | Type | Description |
|-------|------|-------------|
| `searchQuery` | string | Spanish keyword to search the catalogue (e.g. `lavadora`, `portátil`, `televisor`). Defaults to `lavadora`. |
| `maxResults` | integer | Maximum number of products to scrape. Default `100`. |
| `inStockOnly` | boolean | Only return products available and buyable online. Default `false`. |
| `requestDelaySecs` | integer | Minimum pause between page requests. Raise to `5`–`15` for large runs. Default `0` (adaptive backoff). |
| `proxyConfiguration` | object | Proxy settings. Left at the default (Spanish residential) for most use cases. |

An empty input `{}` runs a valid scrape (`lavadora`, up to 100 products), so the actor always returns data.

### Output

Each product is a flat JSON row:

| Field | Type | Example |
|-------|------|---------|
| `name` | string | `Lavadora carga frontal - ok. OWM 6143 D, 6 kg, 1000 rpm` |
| `brand` | string | `OK` |
| `price` | number | `339` |
| `originalPrice` | number | null | `399` |
| `currency` | string | `EUR` |
| `discountPercentage` | number | null | `15` |
| `ean` | string | `8435577363281` |
| `sku` | string | `169976364` |
| `inStock` | boolean | null | `true` |
| `onlineStatus` | string | `AVAILABLE` |
| `rating` | number | null | `4.5` |
| `reviewCount` | number | null | `12` |
| `energyClass` | string | `C` |
| `category` | string | `Electrodomésticos > Lavado y secado > Lavadoras` |
| `imageUrl` | string | `https://assets.mmsrg.com/isr/166325/c1/-/ASSET_MMS_...` |
| `url` | string | `https://www.mediamarkt.es/es/product/_...-169976364.html` |
| `scrapedAt` | string | `2026-07-07T09:54:46.107Z` |

#### Example output

```json
{
  "name": "Lavadora carga frontal - ok. OWM 6143 D, 6 kg, 1000 rpm, 15 Programas, Blanco",
  "brand": "OK",
  "price": 339,
  "originalPrice": 399,
  "currency": "EUR",
  "discountPercentage": 15,
  "ean": "8435577363281",
  "sku": "169976364",
  "inStock": true,
  "onlineStatus": "AVAILABLE",
  "rating": 4.5,
  "reviewCount": 12,
  "energyClass": "D",
  "category": "Electrodomésticos > Lavado y secado > Lavadoras",
  "imageUrl": "https://assets.mmsrg.com/isr/166325/c1/-/ASSET_MP_172720081",
  "url": "https://www.mediamarkt.es/es/product/_ok-...-169976364.html",
  "scrapedAt": "2026-07-07T09:54:46.107Z"
}
```

`energyClass` is populated for products that carry an EU energy label (appliances, TVs, monitors) and is empty for others (laptops, accessories). `originalPrice` and `discountPercentage` are set only when a product is on offer.

### How it works

MediaMarkt.es is a React/PWA storefront behind Cloudflare bot protection. This actor fetches each server-rendered listing page and reads MediaMarkt's own embedded product state directly (the same data the site uses to render), so the output is clean and structured — not scraped from fragile HTML markup. Search results are paginated automatically until your result limit is reached.

### Tips

- **Use Spanish keywords.** MediaMarkt is a Spanish storefront, so `auriculares` returns more than `headphones` and `lavadora` more than `washing machine`.
- **Broad category terms return the most.** Terms like `portátil`, `televisor`, `aspirador`, and `smartphone` map to full catalogue categories with thousands of products.
- **Large runs.** For tens of thousands of products, set `requestDelaySecs` to `5`–`10` to stay comfortably under rate limits.

### Limitations

- Search is keyword-driven; there is no full-catalogue crawl mode in this version.
- Physical in-store (per-branch) stock is not included — availability reflects the national online status.
- Marketplace (third-party) offers are included and flagged via `onlineStatus`.

### Related Scrapers

Building a cross-retailer electronics price dataset? Pair this with other Studio AMBA electronics scrapers:

- **MediaMarkt Germany** — same platform, German storefront.
- **Saturn** — MediaMarkt's sister chain, same platform.
- **PcComponentes** / **El Corte Inglés** — Spanish electronics retailers.
- **Back Market Scraper** — refurbished electronics.
- **Euronics Scraper** / **Elgiganten Scraper** — European electronics chains.

Match products across all of them by `ean` to compare prices on identical items.

# Actor input Schema

## `searchQuery` (type: `string`):

Spanish keyword to search the MediaMarkt catalogue (e.g. 'lavadora', 'portátil', 'televisor', 'auriculares', 'iphone'). Leave empty to use the default.

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

Maximum number of products to scrape.

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

Only return products currently available and buyable online.

## `requestDelaySecs` (type: `integer`):

Minimum pause between page requests. Raise this (5-15s) for large runs if you hit throttling. 0 = full speed with automatic adaptive backoff.

## `brightDataApiKey` (type: `string`):

Optional. Your own Bright Data Web Unlocker API key. Normally not needed — the actor ships with access. Only set this to route traffic through your own Bright Data account.

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

Proxy settings. MediaMarkt.es is fetched through the Bright Data Web Unlocker (Spain), so this can be left at its default.

## Actor input object example

```json
{
  "searchQuery": "lavadora",
  "maxResults": 20,
  "inStockOnly": false,
  "requestDelaySecs": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# 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 = {
    "searchQuery": "lavadora",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/mediamarkt-es-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 = {
    "searchQuery": "lavadora",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/mediamarkt-es-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 '{
  "searchQuery": "lavadora",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call studio-amba/mediamarkt-es-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=studio-amba/mediamarkt-es-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/6hCd8ybC1kPRPDcJ4/builds/ey5jZk1rAq8FVpnal/openapi.json
