# Mercadona Scraper: Precios, Unit Prices & Price Changes (`moggedhq/mercadona-scraper`) Actor

Get Mercadona supermarket products by postal code: price, unit price per kg or litre, pack size, previous price and price drops, category and stock. Whole catalog, categories, search or product links, built for scheduled price monitoring. About $0.003 per product. No login.

- **URL**: https://apify.com/moggedhq/mercadona-scraper.md
- **Developed by:** [mogged](https://apify.com/moggedhq) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 93.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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: Precios, Unit Prices & Price Changes

For retail price analysts, brands and comparison services monitoring Mercadona's Spanish supermarket assortment. Collect current product prices, comparable unit prices, pack sizes, previous prices, price drops and availability for the warehouse serving a chosen postal code. About **$0.003 per delivered product**: **20 products cost $0.06**, plus the minimum **$0.00005 platform start charge**. No retailer login or retailer API key is required.

### What you get

The first field is a readable price observation. Common retail fields follow, then Mercadona-specific fields. Numeric prices use EUR; the Actor's usage price is in USD. Missing source values remain null.

| Field | Meaning |
| --- | --- |
| `verdict` | Product name, current price, reference price and warehouse in one readable sentence. |
| `retailer`, `country`, `currency` | Mercadona, ES and EUR. |
| `storeId`, `storeName`, `location` | Online warehouse code, descriptive warehouse label and requested postal code. |
| `productId`, `sku`, `gtin` | Source product identifier, the same retailer SKU and an explicit validated source EAN when available. |
| `title`, `brand`, `size` | Supplied product name, explicit brand and package or minimum-quantity size. |
| `price` | Current package price, estimated piece price or minimum selectable bulk quantity price. |
| `regularPrice`, `onSale` | Null because historic previous prices are distinct from simultaneous regular or promotional prices. |
| `promoText`, `promoType` | Price-drop label and PRICE_DROP when supported by the source. |
| `promoStart`, `promoEnd` | Null when no price-drop validity dates are supplied. |
| `memberPrice`, `memberProgram` | Null; the signed-out catalog supplies no member pricing. |
| `unitPrice`, `unitOfMeasure` | Reference price and reference unit, such as L, kg, ud, dz or lv. |
| `inStock`, `stockLevel` | Online catalog availability signal and null physical stock quantity. |
| `rating`, `reviewCount` | Null when the source supplies no product reviews. |
| `category`, `url`, `imageUrl` | Observed category, product link and product image. |
| `scrapedAt` | UTC observation timestamp. |

Mercadona-specific fields preserve additional source meaning:

| Field | Meaning |
| --- | --- |
| `sourceDisplayName` | Original catalog name, retained when detail data provides a fuller product name. |
| `ean`, `sourceEan` | Valid source barcode and original explicit EAN text. A product number is never promoted to a barcode. |
| `warehouse`, `postalCode`, `requestedLocations` | Warehouse, the first selecting postal code and all requested postal codes resolving to that warehouse. |
| `packaging`, `unitSize`, `sizeFormat` | Package description, numeric size and source size format. |
| `packSize`, `totalUnits`, `unitName`, `isPack` | Multipack size, unit count, unit label and multipack flag. |
| `referencePrice`, `referenceFormat` | Original reference price and unit; also mapped to the family unit-price fields. |
| `bulkPrice`, `sourceUnitPrice` | Source bulk/reference-scale price and original `unit_price` package or piece value. |
| `previousUnitPrice`, `priceDecreased` | Source historic unit price and the source's own price-decreased boolean. |
| `priceDropListed`, `isDeal` | Membership in the current price-drop list and the combined price-drop selection flag. |
| `categoryPath`, `categoryIds` | Full observed hierarchy and its IDs, from root to leaf. |
| `isNew`, `published`, `sourceStatus` | Source new-arrival, publication and availability values. |
| `isVariableWeight`, `approximateSize` | Source variable-weight flag and approximate-size flag. |
| `sellingMethod`, `minimumQuantity`, `quantityIncrement` | Source selling method, smallest selectable amount and amount increment. |
| `drainedWeight`, `taxPercentage` | Supplied drained weight and VAT percentage. |
| `unavailableFrom`, `unavailableWeekdays` | Source availability restrictions, retained without choosing a delivery date. |
| `details` | Optional origin, legal name, ingredients, allergens, nutrition, instructions, suppliers and photos. |
| `sourceUrl`, `sourceJobId`, `recordType` | Public source request, source provenance key and PRODUCT/NOTE distinction. |

### Read the prices correctly

For a six-by-one-litre milk pack, `price` is the pack price while `unitPrice` is the price per litre. A source example collected on 9 November 2026 was €4.98 for six one-litre briks, or €0.83/L. `unitSize` is 6, `packSize` is 1 and `totalUnits` is 6. Preserve those distinctions when comparing baskets.

For products sold by bulk quantity, `price` follows the storefront's minimum quantity multiplied by its bulk price, rounded to cents. `unitPrice` retains the reference scale. A kilogram price, a dozen price and a price per wash are different comparison units; keep `unitOfMeasure` with the number.

The public store can display a crossed-out previous price while `price_decreased` is false. Both facts are retained. `isDeal` is true when a product belongs to the current Bajadas de precio list, carries the explicit source flag or has an explicit previous source unit price greater than the current one. `priceDecreased` remains the original flag. Previous prices are historical comparison values and do not fill `regularPrice`.

### Start in three steps

1. Choose Spanish postal codes or exact online warehouse IDs.
2. Enter product searches, category links or product IDs, then set the maximum products.
3. Run, inspect SUMMARY and the dataset, then export JSON, CSV or Excel.

The overview, price-drops and details dataset views group the relevant fields. The form prefill searches `leche` at postal code `28001` with a 20-product cap. Its first cloud test on 9 November 2026 delivered 20 distinct products in 7.5 seconds. Separate catalog and category tests each delivered 1,200 product/warehouse observations successfully. These are observed test results; source response times vary.

### Inputs and examples

| Input | Behavior |
| --- | --- |
| `searchTerms` | Array of Spanish product searches, such as `["leche", "café"]`. |
| `startUrls` | Optional product, category, price-drop, new-arrival or catalog links on tienda.mercadona.es. |
| `productIds` | Exact retailer product IDs, preserving format suffixes such as `23086.2`. |
| `locations` | Spanish five-digit postal codes. Each is resolved live to the current serving warehouse. |
| `storeIds` | Exact warehouse codes, such as mad3 or vlc1. Takes precedence over postal codes. |
| `maxItemsPerSearch` | Maximum new rows per source and warehouse; default 20, maximum 10,000. |
| `maxItems` | Maximum product/warehouse rows in the run; default 20, maximum 10,000. |
| `dealsOnly` | Retain source-supported price drops. |
| `includeDetails` | Fetch product detail data with no additional product fee. |
| `proxyConfiguration` | Automatic datacenter-first routing with Spain residential retries after refusals. |
| `categoryIds`, `categoryUrls` | Root, middle or leaf category IDs, or category-link aliases. |
| `catalog` | Collect the warehouse catalog through its live category tree. |
| `postalCodes`, `warehouseIds` | Aliases combined with locations and storeIds respectively. |
| `maxResults` | Additional global cap. The smallest supplied maxItems/maxResults wins. |

Empty location selections use default warehouse `vlc1`. Shared warehouses are deduplicated, with their selecting postal codes in requestedLocations. Explicit warehouses have location null.

Apify may insert `maxItems: 20` from the schema. An alias cap of `maxResults: 3` still limits output to three rows. When both fields are explicit, the smaller value wins. To raise the cap, set `maxItems` explicitly as well.

A two-location comparison:

```json
{
  "searchTerms": ["leche", "café"],
  "locations": ["28001", "46001"],
  "maxItemsPerSearch": 20,
  "maxItems": 80
}
```

A category sample with optional barcode and ingredient details:

```json
{
  "categoryIds": ["112"],
  "locations": ["08001"],
  "includeDetails": true,
  "maxItems": 20
}
```

For a catalog sweep, set catalog true and raise both product caps. Explicit empty source arrays select the catalog; omitted source fields default to leche.

### Real output example

Selected fields from the 9 November 2026 prefill:

```json
{
  "retailer": "Mercadona",
  "country": "ES",
  "currency": "EUR",
  "storeId": "mad3",
  "location": "28001",
  "productId": "10381",
  "gtin": null,
  "title": "Leche semidesnatada Hacendado",
  "brand": "Hacendado",
  "size": "6 x 1 l",
  "price": 4.98,
  "unitPrice": 0.83,
  "unitOfMeasure": "L",
  "inStock": true,
  "warehouse": "mad3",
  "postalCode": "28001"
}
```

### Pricing and spending limits

One product means one distinct product at one warehouse. The same product at two warehouses is two observations. Overlapping sources at the same warehouse are delivered and charged once within a run. Summaries, notes, failed requests, duplicate discoveries and empty selections have no product charge. Optional details add no separate product charge.

| Delivered products | Base | Bronze | Silver | Gold |
| --- | --- | --- | --- | --- |
| 20 | $0.06 | $0.057 | $0.054 | $0.048 |
| 100 | $0.30 | $0.285 | $0.27 | $0.24 |
| 1,000 | $3.00 | $2.85 | $2.70 | $2.40 |

Add the minimum $0.00005 platform start charge. The Actor checks the run's maximum total charge before saving further paid observations and stops cleanly at the limit. SUMMARY records the spending-limit outcome. Apify can reject a schema-invalid input before a container starts; parseable invalid selections produce free explanatory notes and a summary.

### Monitor prices every day

Save a task with stable product IDs, warehouse IDs or postal codes and a deliberate product cap. In Apify Console, create a schedule, select the task and choose the daily time and timezone. Connect the successful-run webhook to your database, spreadsheet or workflow.

Join observations on `retailer + storeId + productId`, keeping `scrapedAt` as the observation timestamp. Keep GTINs as text in spreadsheets so leading zeros survive. Each scheduled run collects a new snapshot and charges for its delivered products again. Store those snapshots in your own database to measure changes over time.

### API and integrations

```bash
curl -X POST \
  'https://api.apify.com/v2/acts/moggedhq~mercadona-scraper/runs' \
  -H 'Authorization: Bearer YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"searchTerms":["leche"],"locations":["28001"],"maxItems":20}'
```

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("moggedhq/mercadona-scraper").call(
    run_input={"productIds": ["4240"], "locations": ["28001", "46001"], "maxItems": 2}
)
rows = list(client.dataset(run["defaultDatasetId"]).iterate_items())
summary = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("SUMMARY")
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('moggedhq/mercadona-scraper').call({
  searchTerms: ['aceite'], locations: ['08001'], maxItems: 20
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Make, Zapier, n8n, Sheets and webhooks can read the dataset. Filter recordType PRODUCT and inspect free NOTE rows separately. The output links expose the dataset, SUMMARY and DEALS. Large DEALS exports link to JSON parts. Inspect freeFailures and resolvedStores before accepting coverage.

### Use with AI agents (MCP)

Connect an agent to `https://mcp.apify.com`. Ask for Mercadona prices, unit prices, previous prices and EANs by Spanish postal code. Supply searches, exact IDs or categories and a product cap. Request includeDetails when barcodes or ingredients matter. Ask the agent to inspect SUMMARY and preserve unit-of-measure and warehouse fields when it combines results with another retailer.

### Limits

Coverage is the Spanish signed-out online catalog served by tienda.mercadona.es. Physical-store shelf prices, audited stock quantities, personal offers, account history, checkout totals and Portugal's separate shopping arrangements are outside this dataset. Delivery-day restrictions are preserved as source fields; no delivery date or slot is selected.

Search uses the storefront's warehouse-specific search index. An exceptionally broad query can hit the service's retrieval window; categories and catalog mode are the appropriate inputs for complete large collections. Search results and product-detail pages can differ as the retailer updates its index. includeDetails refreshes each selected item from its warehouse-specific product endpoint.

Prices and availability can change after collection. Approximate weights are estimates and final weighed amounts can differ. EANs and brands require explicit source evidence, normally available with product details. Some ingredients or nutrition fields contain retailer-specific text or codes; they are retained rather than expanded into unsupported claims. Promotion dates, member prices and ratings remain null when absent.

Requests are sequentially paced with fresh sessions on retry. Explicit proxy disable, country, groups and custom URLs are respected. Delivery uses the saved dataset as its restart ledger and reconciles acknowledged charges before continuing. Source changes, network refusals and unavailable postal coverage can still produce free notes or incomplete coverage; no old price is substituted to hide an outage. The Actor signs in to no retailer account and solves no CAPTCHA.

### FAQ

**Can I use a barcode as a product ID?** productIds expects Mercadona's own product identifier. EAN is an output field only when the source explicitly provides a valid barcode.

**How do I build price history?** Schedule repeated runs and store each snapshot with its warehouse and timestamp. The Actor collects current observations and does not backfill past snapshots.

**What happens after a reboot?** Saved products are recovered from the dataset. Charge receipts and authoritative run counts determine whether the last saved product still needs its one charge. Duplicate observations are skipped.

# Actor input Schema

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

Find Spanish product names such as leche, aceite or cafe. Searches the selected warehouse. Leave empty for category, product or whole-catalog jobs.

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

Optional tienda.mercadona.es/product/4240/... links, /categories/112, /home/price-drops/ or /home/new-arrivals/. Warehouse selection comes from this input, not a browser cookie or URL query.

## `productIds` (type: `array`):

Source product identifiers such as 4240 or 23086.2. These are not EAN barcodes. Format suffixes and leading zeros are retained.

## `locations` (type: `array`):

Five-digit delivery postal codes, such as 28001, 46001, 08001, 41001 or 03001. Each is resolved live to its serving warehouse. Empty uses the storefront default vlc1.

## `storeIds` (type: `array`):

Exact warehouse codes such as mad3 or vlc1. Verified against the warehouse-specific public index. Takes precedence over locations/postalCodes. Unknown codes never fall back silently.

## `maxItemsPerSearch` (type: `integer`):

Maximum new products per search, category, catalog or price-drop source at one warehouse. Duplicate observations do not consume this cap.

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

Global product/warehouse limit. About $0.003 per product: 20 products cost about $0.06 plus $0.00005 start. When maxResults is also supplied, the smaller cap wins, including platform-added defaults.

## `dealsOnly` (type: `boolean`):

Keep products listed under Bajadas de precio, flagged as price decreased or with a source previous price above the current source unit price. Mercadona uses everyday prices; no member promotions are invented.

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

Fetch product detail JSON for explicit EAN, brand, origin, ingredients, allergens, suppliers, storage instructions and photos. Slower, with no extra product charge. Missing details stay null.

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

Automatic default: datacenter first, then Spain residential after refused datacenter attempts. The platform default object {useApifyProxy:true} keeps fallback enabled. Explicit disable, groups, country and custom URLs are respected.

## `categoryIds` (type: `array`):

Optional numeric root, middle or leaf category IDs. Examples: 12, 112 or 420. Products retain the full observed category path.

## `categoryUrls` (type: `array`):

Alias for category links in startUrls; all supplied URL sources are combined and deduplicated.

## `catalog` (type: `boolean`):

Collect the selected warehouse catalog across the live category tree. Set maxItemsPerSearch and maxItems high enough. Explicit empty source arrays also select the catalog.

## `postalCodes` (type: `array`):

Alias for locations. Both arrays are combined. Repeated postal codes that resolve to the same warehouse produce one observation per product; requestedLocations keeps their provenance.

## `warehouseIds` (type: `array`):

Alias for storeIds. Both arrays are combined. Explicit warehouse selection takes precedence over postal selection.

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

Additional global cap. The smallest supplied maxItems/maxResults wins, even if Apify inserted maxItems=20. Set maxItems explicitly to raise that canonical default.

## Actor input object example

```json
{
  "searchTerms": [
    "leche"
  ],
  "locations": [
    "28001"
  ],
  "maxItemsPerSearch": 20,
  "maxItems": 20,
  "dealsOnly": false,
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "catalog": false
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

## `deals` (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 = {
    "searchTerms": [
        "leche"
    ],
    "locations": [
        "28001"
    ],
    "maxItemsPerSearch": 20,
    "maxItems": 20
};

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

# Run the Actor and wait for it to finish
run = client.actor("moggedhq/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 '{
  "searchTerms": [
    "leche"
  ],
  "locations": [
    "28001"
  ],
  "maxItemsPerSearch": 20,
  "maxItems": 20
}' |
apify call moggedhq/mercadona-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moggedhq/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/8wmWEJkBf6HrRyc0t/builds/AAXeFF7DvhHZVsIUj/openapi.json
