# Mercadona Scraper - Spain Grocery Prices & Products (`alnitak/mercadona-scraper`) Actor

Scrape the Mercadona online supermarket: product names, prices, unit prices (€/kg, €/L), price drops, categories, images and optional EAN barcodes, brand, origin, ingredients and allergens. Prices by Spanish postal code. Whole shop in under a minute, no login or proxy needed.

- **URL**: https://apify.com/alnitak/mercadona-scraper.md
- **Developed by:** [Rocio F.Peral](https://apify.com/alnitak) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 products

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Mercadona Scraper - Spain Grocery Prices & Products

Extract the full **Mercadona online supermarket** catalogue (tienda.mercadona.es): product names, prices, unit prices (€/kg, €/L), price drops, categories, packaging, images and, optionally, **EAN barcodes**, brand, origin, ingredients and allergens.

Mercadona is Spain's largest supermarket chain. Prices and assortment change by region, so this Actor lets you choose the **postal code** and returns exactly what a shopper in that area sees.

- ⚡ Whole shop (about 4,300 products) in under a minute
- 📍 Prices by postal code (Madrid, Barcelona, Valencia, Sevilla... any served area)
- 🏷️ Price drops with previous price and % discount
- 🔎 Filter by search terms or categories, no URLs needed
- 🧾 Optional product details: EAN, brand, origin, ingredients, allergens, supplier, all photos
- 🌍 Names in Spanish, English, Catalan, Basque or Valencian
- ✅ No login, no cookies, no proxy needed

### What can you do with it?

- **Price monitoring**: schedule a daily run and track how grocery prices move in Spain.
- **Inflation and market research**: build your own basket index with unit prices per kg or litre.
- **Competitor benchmarking**: compare Mercadona and its own-label brands (Hacendado, Deliplus, Bosque Verde) with your products.
- **Apps and AI agents**: shopping list, meal planning and nutrition apps that need real products, prices and EAN codes.
- **Regional comparison**: run it with several postal codes and compare prices between cities.

### Input

| Field | Type | Description |
|---|---|---|
| `postalCode` | string | Spanish postal code (5 digits). Default `28001`. |
| `searchTerms` | array | Keep only products whose name contains any of these terms. Accent-insensitive. |
| `categories` | array | Category names or IDs (top or second level), e.g. `"Aceite, especias y salsas"`. Empty = whole shop. |
| `includeDetails` | boolean | Adds EAN, brand, origin, ingredients, allergens, supplier and photos. One extra request per product. |
| `onlyPriceDrops` | boolean | Only products that are currently cheaper than before. |
| `maxItems` | integer | Stop after this many products. `0` = no limit. |
| `language` | string | `es`, `en`, `ca`, `eu` or `vai`. |

#### Example: all milk and coffee products in Barcelona, with barcodes

```json
{
  "postalCode": "08001",
  "searchTerms": ["leche", "café"],
  "includeDetails": true
}
```

#### Example: today's price drops in Valencia

```json
{
  "postalCode": "46001",
  "onlyPriceDrops": true
}
```

### Output

One item per product. Example:

```json
{
  "id": "4717",
  "name": "Aceite de oliva virgen extra Hacendado",
  "packaging": "Garrafa",
  "price": 12.8,
  "referencePrice": 4.267,
  "referenceFormat": "L",
  "previousPrice": 13.55,
  "priceDropped": true,
  "priceDropPercent": 5.5,
  "unitSize": 3,
  "sizeFormat": "l",
  "isPack": false,
  "currency": "EUR",
  "categoryL1": "Aceite, especias y salsas",
  "categoryL2": "Aceite, vinagre y sal",
  "categoryL3": "Aceite de oliva",
  "url": "https://tienda.mercadona.es/product/4717/aceite-oliva-virgen-extra-hacendado-garrafa",
  "image": "https://prod-mercadona.imgix.net/images/cd149804838dc230dad3c2a314cf2286.jpg?fit=crop&h=300&w=300",
  "postalCode": "46001",
  "warehouse": "vlc1",
  "scrapedAt": "2026-09-19T18:32:19.901Z",
  "ean": "8402001001192",
  "brand": "Hacendado",
  "origin": "Puente de Génave, Sierra de Segura. Jaén.",
  "ingredients": "Aceite de Oliva Virgen Extra 100%",
  "allergens": null,
  "supplier": "ACEITES MAEVA S.L.U; Aceites Oro Bailén Galgon 99 SLU, S.L.U.; Aceites del Sur- Coosur S.A.; Agrícola de Bailén Virgen de Zocueca, S.C.A; Jaencoop SCA; MERCADONA; MERCAOLEO; Oleoestepa S.C.A.; Oleoestepa, S.Coop.And.; Sovena España S.A.U",
  "photos": [
    "https://prod-mercadona.imgix.net/images/cd149804838dc230dad3c2a314cf2286.jpg?fit=crop&h=3600&w=3600"
  ]
}
```

Fields from `ean` onwards are only present when `includeDetails` is on.

Download the dataset as JSON, CSV, Excel or XML, or read it through the Apify API.

### Tips

- If a postal code is not served by Mercadona online, the Actor falls back to the Madrid warehouse and says so in the log.
- To compare cities, run the Actor once per postal code. The `warehouse` field tells you which regional assortment you got.
- For daily monitoring you usually do not need `includeDetails`: EAN and ingredients rarely change, prices do.

### Use it from AI agents (MCP)

This Actor works with the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp), so Claude, Cursor and other MCP clients can call it as a tool: "find the cheapest olive oil at Mercadona in Sevilla".

### Is it legal?

The Actor only collects publicly available product and price information. It does not collect personal data. You are responsible for how you use the data.

### Support

Found a problem or need another Spanish supermarket? Open an issue in the Issues tab.

# Actor input Schema

## `postalCode` (type: `string`):

Spanish postal code. Mercadona prices and assortment depend on the warehouse that serves each postal code. Default: 28001 (Madrid).

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

Keep only products whose name contains any of these terms (accent-insensitive). Leave empty to get every product.

## `categories` (type: `array`):

Category names or IDs to scrape, e.g. "Aceite, especias y salsas" or 12. Matches top-level and second-level categories. Leave empty for the whole shop.

## `includeDetails` (type: `boolean`):

Opens every product page to add EAN barcode, brand, origin, ingredients, allergens, storage and all photos. Slower: one extra request per product.

## `onlyPriceDrops` (type: `boolean`):

Keep only products Mercadona currently flags as reduced in price.

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

Stop after this many products. 0 = no limit.

## `language` (type: `string`):

Language of product and category names.

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

Optional. The actor normally works without a proxy.

## Actor input object example

```json
{
  "postalCode": "28001",
  "searchTerms": [
    "leche"
  ],
  "includeDetails": false,
  "onlyPriceDrops": false,
  "maxItems": 0,
  "language": "es",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `products` (type: `string`):

One item per Mercadona product, with prices, unit prices, categories and (optionally) EAN, brand, origin and ingredients.

## `liveView` (type: `string`):

Open this run in Apify Console to inspect the dataset in a table.

# 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 = {
    "postalCode": "28001",
    "searchTerms": [
        "leche"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("alnitak/mercadona-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 = {
    "postalCode": "28001",
    "searchTerms": ["leche"],
}

# Run the Actor and wait for it to finish
run = client.actor("alnitak/mercadona-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "postalCode": "28001",
  "searchTerms": [
    "leche"
  ]
}' |
apify call alnitak/mercadona-scraper --silent --output-dataset

```

## MCP server setup

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

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

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iaomGrm7GoO3w77wm/builds/5OFZIQ3W2h0xUB3S0/openapi.json
