---
title: "Mercadona API: Spanish grocery search, categories as JSON"
description: "Mercadona API for Spanish grocery search, categories, product details with EAN and ingredients, and warehouse by postcode as JSON. 1 credit per call."
url: https://perceptlayer.com/apis/mercadona
---

[APIs](https://perceptlayer.com/apis) / [Marketplaces](https://perceptlayer.com/verticals/marketplaces) / Mercadona

1 credit per call 8 endpoints 15 datapoints 

# Mercadona API

Mercadona API for Spanish grocery search, categories, product details with EAN and ingredients, and warehouse by postcode as JSON. 1 credit per call.

[Get a free API key](https://perceptlayer.com/signup) Run it below

Mercadona

GET /v1/mercadona/search?query=leche&lang=es&sort=relevance 

```
{
  "success": true,
  "data": {
    "query": "leche",
    "page": 1,
    "sort": "relevance",
    "count": 24,
    "has_next_page": true,
    "lang": "es",
    "warehouse": "vlc1",
    "items": [
      {
        "position": 1,
        "id": "10381",
        "name": "Leche semidesnatada Hacendado",
        "brand": "Hacendado",
        "slug": "leche-semidesnatada-hacendado-pack-6",
        "url": "https://tienda.mercadona.es/product/10381/leche-semidesnatada-hacendado-pack-6",
        "image": "https://prod-mercadona.imgix.net/images/c15010ddd0e6fc881e5ef94446d43bef.jpg?fit=crop&h=300&w=300",
        "images": [
          "https://prod-mercadona.imgix.net/images/c15010ddd0e6fc881e5ef94446d43bef.jpg?fit=crop&h=300&w=300"
        ],
        "size": "6 l",
        "currency": "EUR",
        "categories": [
          "Huevos, leche y mantequilla"
        ],
        "price": 4.98,
        "unit_price": 0.83,
        "unit": "l",
        "price_decreased": false
      },
      {
        "position": 2,
        "id": "10379",
        "name": "Leche entera Hacendado",
        "brand": "Hacendado",
        "slug": "leche-entera-hacendado-pack-6",
        "url": "https://tienda.mercadona.es/product/10379/leche-entera-hacendado-pack-6",
        "image": "https://prod-mercadona.imgix.net/images/e471e628a91aef1a7d6473da2cb904c6.jpeg?fit=crop&h=300&w=300",
        "images": [
          "https://prod-mercadona.imgix.net/images/e471e628a91aef1a7d6473da2cb904c6.jpeg?fit=crop&h=300&w=300"
        ],
        "size": "6 l",
        "currency": "EUR",
        "categories": [
          "Huevos, leche y mantequilla"
        ],
        "price": 5.76,
        "unit_price": 0.96,
        "unit": "l",
        "price_decreased": false
      },
      {
        "position": 3,
        "id": "10721",
        "name": "Leche semidesnatada sin lactosa Hacendado",
        "brand": "Hacendado",
        "slug": "leche-semidesnatada-sin-lactosa-hacendado-pack-6",
        "url": "https://tienda.mercadona.es/product/10721/leche-semidesnatada-sin-lactosa-hacendado-pack-6",
        "image": "https://prod-mercadona.imgix.net/images/6b02e742d27be2ee2db0994bc431fe99.jpg?fit=crop&h=300&w=300",
        "images": [
          "https://prod-mercadona.imgix.net/images/6b02e742d27be2ee2db0994bc431fe99.jpg?fit=crop&h=300&w=300"
        ],
        "size": "6 l",
        "currency": "EUR",
        "categories": [
          "Huevos, leche y mantequilla"
        ],
        "price": 5.64,
        "unit_price": 0.94,
        "unit": "l",
        "price_decreased": false
      }
    ]
  },
  "meta": {
    "endpoint_family": "search",
    "request_id": "req_f87b3e61b913464f9eb265919ab99785",
    "credits_charged": 1,
    "credits_remaining": 4835
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

Sample data

## What one call returns

A recorded run of `search`: the fields and shapes you will get, shortened to 3 items.

| # | position integer | id string | name string | brand string | slug string | url url | image url | images string\[\] | size string | currency string | categories string\[\] | price number | unit\_price number | unit string | price\_decreased boolean |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | 1 | 10381 | Leche semidesnatada Hacendado | Hacendado | leche-semidesnatada-hacendado-pack-6 | https://tienda.mercadona.es/product/10381/leche-semidesnatada-hacendado-pack-6 | https://prod-mercadona.imgix.net/images/c15010ddd0e6fc881e5ef94446d43bef.jpg?fit=crop&h=300&w=300 | \[1 item\] | 6 l | EUR | \[1 item\] | 4.98 | 0.83 | l | false |
| 2 | 2 | 10379 | Leche entera Hacendado | Hacendado | leche-entera-hacendado-pack-6 | https://tienda.mercadona.es/product/10379/leche-entera-hacendado-pack-6 | https://prod-mercadona.imgix.net/images/e471e628a91aef1a7d6473da2cb904c6.jpeg?fit=crop&h=300&w=300 | \[1 item\] | 6 l | EUR | \[1 item\] | 5.76 | 0.96 | l | false |
| 3 | 3 | 10721 | Leche semidesnatada sin lactosa Hacendado | Hacendado | leche-semidesnatada-sin-lactosa-hacendado-pack-6 | https://tienda.mercadona.es/product/10721/leche-semidesnatada-sin-lactosa-hacendado-pack-6 | https://prod-mercadona.imgix.net/images/6b02e742d27be2ee2db0994bc431fe99.jpg?fit=crop&h=300&w=300 | \[1 item\] | 6 l | EUR | \[1 item\] | 5.64 | 0.94 | l | false |

Recorded from our API · 3 items shown · 15 datapoints per item GET /v1/mercadona/search?query=leche&lang=es&sort=relevance

15 datapoints

### Identity

-   id string
-   name string
-   brand string
-   slug string

### Contact

-   url url

### Reputation

-   image url
-   images string\[\]

### Price

-   currency string
-   price number
-   unit\_price number
-   price\_decreased boolean

### Other

-   position integer
-   size string
-   categories string\[\]
-   unit string

Playground

## Run this API

cURL shell 

```
curl "https://api.perceptlayer.com/v1/mercadona/search?query=leche&lang=es&sort=relevance" \
  -H "X-API-Key: $API_KEY"
```

Mercadona · 8 endpoints

## Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

| Endpoint | Required parameters | Returns | Cost |
| --- | --- | --- | --- |
| [GET `/v1/mercadona/categories`](https://perceptlayer.com/apis/mercadona/categories) | none +2 optional | `id` `name` `order` `is_extended` `categories` | 1 credit |
| [GET `/v1/mercadona/category`](https://perceptlayer.com/apis/mercadona/category) | `id` +2 optional | `id` `name` `slug` `url` `image` `images` +9 more | 1 credit |
| [GET `/v1/mercadona/discovery`](https://perceptlayer.com/apis/mercadona/discovery) | none +2 optional | `sections` | 1 credit |
| [GET `/v1/mercadona/product`](https://perceptlayer.com/apis/mercadona/product) | `id` +2 optional | `product` `lang` `warehouse` | 1 credit |
| [GET `/v1/mercadona/related`](https://perceptlayer.com/apis/mercadona/related) | `id` +2 optional | `id` `name` `slug` `url` `image` `images` +8 more | 1 credit |
| [GET `/v1/mercadona/search`](https://perceptlayer.com/apis/mercadona/search) | none +6 optional | `lang` `warehouse` `items` | 1 credit |
| [GET `/v1/mercadona/sitemap`](https://perceptlayer.com/apis/mercadona/sitemap) | none | `ids` | 1 credit |
| [GET `/v1/mercadona/warehouse`](https://perceptlayer.com/apis/mercadona/warehouse) | `postcode` | `postcode` `warehouse` | 1 credit |

Overview

## About the Mercadona API

## What you can get

The Mercadona API returns Mercadona online grocery data as JSON through 8 endpoints. Most take a `lang` (es, en or ca) and a `wh` (warehouse code).

-   **Search:** `search` takes a `query` or `category`, with `sort` (relevance, price\_asc or price\_desc) and `page`.
-   **Categories:** `categories` returns the category tree. `category` takes an `id` and lists its products.
-   **Products:** `product` takes an `id`. `related` takes an `id` and lists similar products.
-   **Warehouses:** `warehouse` takes a `postcode` and returns the warehouse code that serves it.
-   **Discovery and ids:** `discovery` returns the home page sections. `sitemap` lists product ids.

The recorded search for "leche" returns `query`, `page`, `sort`, `count` (24), `has_next_page`, `lang`, `warehouse` (vlc1) and `items`. Each item has `position`, `id`, `name`, `brand`, `slug`, `url`, `image`, `images`, `size`, `currency`, `categories`, `price`, `unit_price`, `unit` and `price_decreased`. The first result was Leche semidesnatada Hacendado, 6 l, at €4.98 or €0.83 per litre.

## How a call works

Find your warehouse, then search: `GET /v1/mercadona/warehouse?postcode=46001` with your key in the `X-API-Key` header returned `vlc1`. Pass it as `wh` to `search`, for example `GET /v1/mercadona/search?query=leche&lang=es&wh=vlc1`, which returns each product's `id`. `product` takes that `id` and adds `ean`, `description`, `origin`, `ingredients`, `allergens` and `availability`; `related` takes the same `id`. Check `has_next_page` before asking for the next `page`. Every successful call costs 1 credit; failed calls cost nothing.

Marketplaces JSON REST MCP

### More marketplaces APIs

[About You](https://perceptlayer.com/apis/about-you) [adidas](https://perceptlayer.com/apis/adidas) [Albert Heijn](https://perceptlayer.com/apis/albert-heijn) [ALDI SÜD](https://perceptlayer.com/apis/aldi-sued) [Alibaba](https://perceptlayer.com/apis/alibaba) [AliExpress](https://perceptlayer.com/apis/aliexpress) [Allegro](https://perceptlayer.com/apis/allegro) [ALTERNATE](https://perceptlayer.com/apis/alternate) [Alza](https://perceptlayer.com/apis/alza) [Amazon](https://perceptlayer.com/apis/amazon) [Americanas](https://perceptlayer.com/apis/americanas) [Aponeo](https://perceptlayer.com/apis/aponeo)

Use cases

### Track Mercadona prices and unit prices for a basket

`Use the Mercadona API to track Mercadona prices and unit prices for a basket` 

### Compare prices between warehouses by switching \`wh\`

`` Use the Mercadona API to compare prices between warehouses by switching `wh` `` 

### Catch price drops with \`price\_decreased\`

`` Use the Mercadona API to catch price drops with `price_decreased` `` 

### Match products to other retailers by \`ean\`

`` Use the Mercadona API to match products to other retailers by `ean` `` 

FAQ

## Questions

**How much does the Mercadona API cost?**

Each successful call costs one credit, and each search page is one call. New accounts get free credits to start, and credit packs bring the price down as you scale.

**Why does the warehouse matter?**

Mercadona serves each postcode from a warehouse, and prices and stock follow it. \`warehouse\` turns a postcode into the code you pass as \`wh\`; the recorded calls used \`vlc1\`.

**Can I get results in English or Catalan?**

Yes. Set \`lang\` to en or ca; the default is es.

**Do I need a Mercadona account?**

No. You call this Mercadona API with your Perceptlayer key in the \`X-API-Key\` header, with no Mercadona login.

**Is this the official Mercadona API?**

No. Perceptlayer is an independent service and is not affiliated with Mercadona. It returns Mercadona data as JSON with a Perceptlayer key, so there is no Mercadona developer account, app review or partner approval to get first. It only reads data: if Mercadona has an official API and you need to act on your own Mercadona account, such as posting, managing orders or reading private data, use that one.

**Should I build a Mercadona scraper instead?**

You can, but a Mercadona scraper is code you maintain: page changes break it, requests get blocked, and Mercadona's terms govern how you collect data. The Mercadona API gives you 8 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

## Try the Mercadona API with 100 free credits

No credit card. Failed calls are never billed.

[Get a free API key](https://perceptlayer.com/signup) [Read the docs](https://docs.perceptlayer.com)
