APIs / Marketplaces / Mercadona

1 credit per call8 endpoints15 datapointsChecked working 6 Dec 2026

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.

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 OKJSONX-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.

#positionintegeridstringnamestringbrandstringslugstringurlurlimageurlimagesstring[]sizestringcurrencystringcategoriesstring[]pricenumberunit_pricenumberunitstringprice_decreasedboolean
1110381Leche semidesnatada HacendadoHacendadoleche-semidesnatada-hacendado-pack-6https://tienda.mercadona.es/product/10381/leche-semidesnatada-hacendado-pack-6https://prod-mercadona.imgix.net/images/c15010ddd0e6fc881e5ef94446d43bef.jpg?fit=crop&h=300&w=300[1 item]6 lEUR[1 item]4.980.83lfalse
2210379Leche entera HacendadoHacendadoleche-entera-hacendado-pack-6https://tienda.mercadona.es/product/10379/leche-entera-hacendado-pack-6https://prod-mercadona.imgix.net/images/e471e628a91aef1a7d6473da2cb904c6.jpeg?fit=crop&h=300&w=300[1 item]6 lEUR[1 item]5.760.96lfalse
3310721Leche semidesnatada sin lactosa HacendadoHacendadoleche-semidesnatada-sin-lactosa-hacendado-pack-6https://tienda.mercadona.es/product/10721/leche-semidesnatada-sin-lactosa-hacendado-pack-6https://prod-mercadona.imgix.net/images/6b02e742d27be2ee2db0994bc431fe99.jpg?fit=crop&h=300&w=300[1 item]6 lEUR[1 item]5.640.94lfalse

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

15 datapoints

Identity

  • idstring
  • namestring
  • brandstring
  • slugstring

Contact

  • urlurl

Reputation

  • imageurl
  • imagesstring[]

Price

  • currencystring
  • pricenumber
  • unit_pricenumber
  • price_decreasedboolean

Other

  • positioninteger
  • sizestring
  • categoriesstring[]
  • unitstring

Playground

Run this API

cURLshell
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.

EndpointRequired parametersReturnsCost
GET/v1/mercadona/categories
none+2 optional
idnameorderis_extendedcategories
1 credit
GET/v1/mercadona/category
id+2 optional
idnameslugurlimageimages+9 more
1 credit
GET/v1/mercadona/discovery
none+2 optional
sections
1 credit
GET/v1/mercadona/product
id+2 optional
productlangwarehouse
1 credit
GET/v1/mercadona/related
id+2 optional
idnameslugurlimageimages+8 more
1 credit
GET/v1/mercadona/search
none+6 optional
langwarehouseitems
1 credit
GET/v1/mercadona/sitemap
none
ids
1 credit
GET/v1/mercadona/warehouse
postcode
postcodewarehouse
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.

MarketplacesJSONRESTMCP

More marketplaces APIs

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.