# Mercadona Products — Catalogue & Prices by Postal Code (`aitorsm/mercadona-product-scraper`) Actor

Full Mercadona online catalogue for any Spanish postal code: product names, unit, bulk and reference prices, VAT, packaging, images, categories and product URLs from the warehouse that serves that code.

- **URL**: https://apify.com/aitorsm/mercadona-product-scraper.md
- **Developed by:** [Aitor Sanchez-Mansilla](https://apify.com/aitorsm) (community)
- **Categories:** E-commerce
- **Stats:** 60 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Products - Full Catalogue and Prices by Postal Code for Market Research, Price Comparison, and Inventory Tracking

### Overview

**Mercadona Products** returns the product catalogue of Mercadona’s online store for a specific postal code in Spain. Whether you’re conducting market research, price comparison, or tracking inventory, this tool provides valuable insights into product availability, pricing, and categories across different regions.

### Features

With Mercadona Products, you can retrieve detailed data, including:

- **Product Name**: Accurate and up-to-date product titles.
- **Product Categories**: Organize items based on their respective categories.
- **Pricing Information**: Get detailed pricing, including unit prices, bulk prices, and VAT.
- **Product Images**: URLs for product images for visual reference.
- **Product Availability**: Check if products are in stock or limited in quantity.
- **Product Packaging Details**: Learn about the packaging types and unit sizes.
- **Shareable URLs**: Direct links to each product on Mercadona's website for easy access.

#### Use Cases

**Market Research**
Businesses and researchers can track product trends and pricing changes in different regions of Spain, providing valuable insights for decision-making.

**Price Comparison**
Consumers and businesses alike can compare prices across Mercadona stores in different regions, helping them find the best deals or understand regional pricing variations.

**Inventory Tracking**
Keep track of product availability and stock levels at specific Mercadona locations, allowing businesses to monitor inventory trends and make data-driven decisions.

**Regional Product Data**
Get detailed product data by targeting specific regions or cities using postal codes, helping you focus on localized markets.

### Input

The Actor requires a **postal code** and returns the products of the Mercadona warehouse that serves it. The first two digits of the postal code determine the region.

#### Supported Postal Code Prefixes and Corresponding Cities

| Postal Code Prefix | City/Region                |
|--------------------|----------------------------|
| **01**             | Álava                      |
| **02**             | Albacete                   |
| **03**             | Alicante                   |
| **04**             | Almería                    |
| **05**             | Ávila                      |
| **06**             | Badajoz                    |
| **07**             | Balearic Islands           |
| **08**             | Barcelona                  |
| **09**             | Burgos                     |
| **10**             | Cáceres                    |
| **11**             | Cádiz                      |
| **12**             | Castellón                  |
| **13**             | Ciudad Real                |
| **14**             | Córdoba                    |
| **15**             | A Coruña                   |
| **16**             | Cuenca                     |
| **17**             | Girona                     |
| **18**             | Granada                    |
| **19**             | Guadalajara                |
| **20**             | Guipúzcoa                  |
| **21**             | Huelva                     |
| **22**             | Huesca                     |
| **23**             | Jaén                       |
| **24**             | León                       |
| **25**             | Lleida                     |
| **26**             | La Rioja                   |
| **27**             | Lugo                       |
| **28**             | Madrid                     |
| **29**             | Málaga                     |
| **30**             | Murcia                     |
| **31**             | Navarra                    |
| **32**             | Ourense                    |
| **33**             | Asturias                   |
| **34**             | Palencia                   |
| **35**             | Las Palmas                 |
| **36**             | Pontevedra                 |
| **37**             | Salamanca                  |
| **38**             | Santa Cruz de Tenerife     |
| **39**             | Cantabria                  |
| **40**             | Segovia                    |
| **41**             | Seville                    |
| **42**             | Soria                      |
| **43**             | Tarragona                  |
| **44**             | Teruel                     |
| **45**             | Toledo                     |
| **46**             | Valencia                   |
| **47**             | Valladolid                 |
| **48**             | Biscay                     |
| **49**             | Zamora                     |
| **50**             | Zaragoza                   |
| **51**             | Ceuta                      |
| **52**             | Melilla                    |

#### Example Input Format

The input postal code can be given in JSON format or directly via the Apify form. Here is an example in JSON format.

```json
{
  "postalCode": "28001",   // Postal code for Madrid
}
```

All products within the warehouse associated with the postal code are returned.

### Output

The output is delivered in JSON format, containing detailed information about the products in the specified Mercadona store. Example structure with all fields returned:

```json
[
     {
    "id": "69066",
    "slug": "patata-pieza",
    "limit": 999,
    "badges": {
      "is_water": false,
      "requires_age_check": false
    },
    "status": null,
    "packaging": "Pieza",
    "published": true,
    "share_url": "https://tienda.mercadona.es/product/69066/patata-pieza",
    "thumbnail": "https://prod-mercadona.imgix.net/images/df649ff24352a75b9e4e741de8533ba2.jpg?fit=crop&h=300&w=300",
    "categories": [
      {
        "id": 1,
        "name": "Fruta y verdura",
        "level": 0,
        "order": 306
      }
    ],
    "display_name": "Patata",
    "unavailable_from": null,
    "price_instructions": {
      "iva": 0,
      "is_new": false,
      "is_pack": false,
      "pack_size": null,
      "unit_name": null,
      "unit_size": 0.23,
      "bulk_price": "1.99",
      "unit_price": "0.46",
      "approx_size": true,
      "size_format": "kg",
      "total_units": null,
      "unit_selector": true,
      "bunch_selector": false,
      "drained_weight": null,
      "selling_method": 0,
      "price_decreased": false,
      "reference_price": "1.990",
      "min_bunch_amount": 1,
      "reference_format": "kg",
      "previous_unit_price": null,
      "increment_bunch_amount": 1
    },
    "unavailable_weekdays": []
  }
]
```

#### Data Fields:

- **ID**: Unique identifier for each product.
- **Display_name**: The official name of the product.
- **Categories**: Info about the category such as name and ID.
- **Price_instructions**: Info about price, bulk price, unit price and more.
- **Thumbnail**: Link to the product image.
- **Packaging**: Packaging details.
- **Share URL**: A direct link to the product on the Mercadona website.

### Cost

This Actor uses pay-per-event pricing with tiered rates:

- **No subscription** - $0.016 per product
- **Bronze Tier** - $0.014 per product
- **Silver Tier** - $0.012 per product
- **Gold Tier** - $0.01 per product

Apify platform costs are included, so the total amount is totally predictable for you.

***

For questions, requests, or assistance, feel free to reach out!

# Actor input Schema

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

Spanish postal code served by Mercadona online delivery. Only codes with a known warehouse are listed; the catalogue and prices are those of that warehouse.

## Actor input object example

```json
{
  "postalCode": "08023"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `prices` (type: `string`):

No description

## `results` (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 = {
    "postalCode": "08023"
};

// Run the Actor and wait for it to finish
const run = await client.actor("aitorsm/mercadona-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 = { "postalCode": "08023" }

# Run the Actor and wait for it to finish
run = client.actor("aitorsm/mercadona-product-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": "08023"
}' |
apify call aitorsm/mercadona-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,aitorsm/mercadona-product-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/HKYcxpmNeJDXNsyh8/builds/JgO6L4KPhjZgD6C7i/openapi.json
