Mercadona API — Real-Time Product & Price Data

The Mercadona API for developers: search products, look up barcodes, track price drops for any Spanish postal code. Clean JSON, 274 warehouses. Start free.

Free tier available
JSON responses
Real-time data

What Is the FlyByAPIs Mercadona API?

FlyByAPIs Mercadona API is a REST service that returns product and price data from Spain’s largest supermarket as clean, structured JSON. Search the catalog, look up any product by barcode (EAN), walk the category tree, and pull price drops, new arrivals and best sellers, all scoped to the exact warehouse that serves any Spanish postal code. Available on RapidAPI starting at $0/month with 100 free requests.



Mercadona Product & Price Data for Any Postal Code

Mercadona has no public API. We built one: FlyByAPIs Mercadona API offers 14 endpoints covering the full online catalog, with real prices for the shopper’s real store, barcode lookup on every product, and discovery feeds like price drops and best sellers. One GET request, clean JSON back.

274

Warehouses covered

14

Endpoints

3

Languages (es, en, ca)

Free

100 req/month

Here’s the part most people miss: Mercadona’s prices and assortment depend on the warehouse that serves each address. Scrape without resolving that and you get Valencia prices labelled as Madrid. Pass a postal code to any endpoint and we resolve it to the right warehouse for you, the same way mercadona.es does it, and every response says which warehouse answered.

Start free — see pricing plans

100 requests/month free · Hard limit, no surprise overage


Endpoints

EndpointDescription
/searchFree-text, typo-tolerant product search with EAN barcodes, brand and category facets on every result.
/product-detailsFull product sheet by product id or barcode: price, unit price, ingredients, allergens, origin, supplier, photos, VAT.
/product-related-productsThe products Mercadona suggests alongside a given one (cross-selling).
/categoriesThe complete category tree: 26 top-level categories, 152 subcategories, optional level-2 groups.
/category-productsEvery product in a category, paginated. The exhaustive alternative to search.
/brandsEvery brand with product counts, globally or per warehouse.
/brand-productsEvery product of one brand, with price filters and sorting.
/price-dropsProducts currently discounted, with the saving in euros and percent.
/new-productsNew arrivals from the Novedades grid or every “Nuevo en…” section.
/best-sellersProducts ranked by Mercadona’s own internal popularity score.
/campaigns + /campaign-productsHome-page sections (banners, carousels) and the products inside each one.
/warehouses + /resolve-warehouseAll 274 warehouses, and which one serves a given postal code.

Full reference with response schemas and examples in the Mercadona API docs .


Code Examples (Python, JavaScript, cURL)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
import requests

url = "https://mercadona-api.p.rapidapi.com/search"

querystring = {
    "q": "leche",
    "postal_code": "28001",
    "per_page": "5"
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "mercadona-api.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)
data = response.json()["data"]

print(f"Warehouse: {data['resolved_filters']['warehouse']['resolved']}")
for p in data["results"]:
    print(f"{p['name']} | {p['price']} € ({p['unit_price']} €/{p['unit_price_format']}) | EAN {p['ean']}")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
const url = "https://mercadona-api.p.rapidapi.com/search?q=leche&postal_code=28001&per_page=5";

const options = {
  method: "GET",
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "mercadona-api.p.rapidapi.com",
  },
};

const response = await fetch(url, options);
const { data } = await response.json();

console.log(`Warehouse: ${data.resolved_filters.warehouse.resolved}`);
data.results.forEach((p) => {
  console.log(`${p.name} | ${p.price} € | EAN ${p.ean}`);
});
1
2
3
4
5
6
curl -G "https://mercadona-api.p.rapidapi.com/search" \
  --data-urlencode "q=leche" \
  --data-urlencode "postal_code=28001" \
  --data-urlencode "per_page=5" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: mercadona-api.p.rapidapi.com"

Example JSON Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  "status": true,
  "request_id": "4a44b45a-d9bd-9470-b17d-49ceef2a",
  "data": {
    "results": [
      {
        "product_id": "10381",
        "name": "Leche semidesnatada Hacendado",
        "price": "4.98",
        "price_value": 4.98,
        "previous_price": "5.04",
        "is_price_drop": true,
        "unit_price": "0.830",
        "unit_price_format": "L",
        "ean": "8402001002090",
        "brand": "Hacendado",
        "warehouse": "mad3",
        "availability": { "in_stock": true },
        "thumbnail": "https://prod-mercadona.imgix.net/images/...jpg"
      }
    ],
    "total": 309,
    "page": 1,
    "total_pages": 50,
    "resolved_filters": {
      "warehouse": { "input": "28001", "resolved": "mad3", "source": "postal_code" }
    }
  }
}

Features

  • Postal-code resolution — Pass any Spanish 5-digit postal code and get the catalog of the warehouse that actually delivers there, across 7 online hubs and 267 stores. Every response echoes the warehouse that answered.
  • Barcode (EAN) on every result — Search results carry the product’s barcode, and /product-details accepts an EAN directly. No second call, no extra charge.
  • Full product sheets — Ingredients, allergens, origin, supplier, storage instructions, alcohol %, VAT and photos in one request.
  • Numbers you can sort — Prices come as real floats (price_value, unit_price_value) next to the display strings. No parsing “4,98 €” ever again.
  • Price drops, computed honestly — We calculate discounts from the previous price we observed, not from Mercadona’s own flags, and return the saving in euros and percent.
  • Discovery feeds — New arrivals, home-page campaigns and best sellers ranked by Mercadona’s internal popularity score.
  • Three languages — Product and category names in Spanish, English or Catalan with one parameter.
  • Structured JSON, always — Every endpoint returns the same clean envelope, with the filters it actually applied echoed back.

Use Cases

Supermarket Price Tracking

Track Mercadona prices, unit prices and price drops per region, every day. Build a price history, alert users when a wishlist product goes on sale, or feed a dashboard that shows how grocery prices move across Spain.

Barcode Scanner & Allergen Apps

Turn a scanned EAN into the full Mercadona product: price, ingredients, allergens and photos in one call. Build nutrition checkers, diet apps or shopping assistants that answer "can I eat this?" at the shelf.

Price Comparison Across Supermarkets

Match products across retailers by EAN and compare unit prices per litre or kilo. The numeric price fields make a price comparison engine a sort, not a parsing project. A solid data source for any "comparador de precios" product.

Market & Assortment Research

Walk the whole catalog by category or brand, see what launches each week and what sells best in each region. A live base de datos of Mercadona products for FMCG brands, analysts and agencies, without writing a scraper.

Start building — view pricing

Free tier · No credit card · Cancel anytime


Why Developers Switch

Everyone who needs Mercadona data starts the same way: they find the undocumented endpoints behind tienda.mercadona.es and think the job is done. Then the gaps show up: no barcode lookup, no price-drop feed. And every answer is scoped to a warehouse you have to figure out yourself, so your “Madrid prices” are quietly Valencia prices until someone notices.

The alternatives have the same shape: a GitHub catalog dump that’s a static snapshot of one warehouse, or a no-code scraping tool that fights a JavaScript store page by rendering it. We took the other route: we did the warehouse-resolution, barcode-indexing and monitoring work once, and sell the result per request.

Why other approaches fail

✗

Calling Mercadona's private endpoints directly

Undocumented and unsupported: no barcode lookup, no price-drop or best-seller feeds, and you must resolve postal codes to warehouses yourself. When something changes on Mercadona's side, your pipeline breaks silently and nobody tells you.

✗

GitHub catalog dumps

Open datasets of the Mercadona catalog are great for a one-off analysis, but they're static snapshots of a single warehouse. No live prices, no per-postal-code assortment, no product lookups on demand.

✗

No-code scraping tools

Point-and-click scrapers fight the store's JavaScript rendering page by page. Slow at catalog scale, fragile when the layout changes, and you still end up massaging CSV exports instead of consuming JSON.

$

Building and babysitting your own scraper

The code is the cheap part. The expensive part is the months of upkeep: warehouse mapping, schema changes, EAN indexing, monitoring. Engineering hours that cost more than any plan on this page.

To be fair: if all you need is a one-time snapshot of the catalog for an analysis, a free GitHub dump will do, and we’d tell you to use one. The moment you need live prices, barcodes, or more than one region, the free options stop being free. You pay in engineering time instead.


See pricing plans

Free tier available · No credit card required


Get Started in Minutes

  1. Sign up on RapidAPI — it’s free.
  2. Subscribe to the Basic plan (no credit card required).
  3. Copy your API key from the RapidAPI dashboard.
  4. Make your first request using the code examples above.

Every week spent maintaining a homemade Mercadona scraper is a week of warehouse-mapping bugs and silent schema breaks instead of shipping your product. Start the FlyByAPIs Mercadona API on the free tier: 100 requests a month, hard limit, no surprise bill. Most developers have their first product search back in under 5 minutes.

Simple Pricing

Start Free, Scale as You Grow

All plans include full API access to every endpoint. No feature gating.

Basic

Free
  • 100 requests/month
  • 1,000 requests/hour
Start Free

Pro

$19.99 /mo
  • 10,000 requests/month
  • 2 requests/second
Choose Plan

Mega

$99.99 /mo
  • 200,000 requests/month
  • 8 requests/second
Choose Plan
Get in Touch

Need the Data Without the Hassle?

Custom extractions, enterprise plans, or just a quick question. We reply within 24 hours.

Message sent!

We'll get back to you within 24 hours. Check your inbox.

Reply within 24h
No commitment
Free consultation
FAQ

Frequently Asked Questions

Q Does Mercadona have a public API?

No. Mercadona does not offer a public API for its online store. FlyByAPIs Mercadona API fills that gap: a documented REST API with 14 endpoints covering product search, barcode lookup, categories, brands, price drops and best sellers, with a free tier of 100 requests/month on RapidAPI.

Q How do I get Mercadona prices for a specific postal code?

Pass any Spanish 5-digit postal code with the postal_code parameter and FlyByAPIs Mercadona API resolves it to the warehouse that serves that address, the same way mercadona.es does it. Prices and assortment differ across Mercadona's 274 warehouses, and every response tells you which warehouse answered, so you never get Valencia prices silently labelled as Madrid.

Q Can I look up a Mercadona product by barcode (EAN)?

Yes. FlyByAPIs Mercadona API returns the full product sheet for any EAN-13 barcode via /product-details?ean=... : price, unit price, ingredients, allergens, origin, photos and VAT. Every search result also includes the product's EAN, so you can match Mercadona products against other retailers in one call.

Q How do I track Mercadona price drops with an API?

Call the /price-drops endpoint of FlyByAPIs Mercadona API. It returns every product currently discounted in a warehouse, with the discount in euros and percent, sortable by biggest cut first. The drop is computed from the previous price we observed, not taken from Mercadona's own unreliable flags.

Q Can I get Mercadona product data in English or Catalan?

Yes. Pass language=es (default), en or ca and FlyByAPIs Mercadona API translates product and category names. Prices and barcodes stay the same. Search matches names in the chosen language: 'leche' in Spanish, 'milk' in English, 'llet' in Catalan.

Q How much does the Mercadona API cost?

FlyByAPIs Mercadona API starts free with 100 requests/month (hard limit, no surprise bill). Paid plans start at $19.99/month for 10,000 requests. Billing is per request: one search returns up to 20 products and counts as a single request.

Q How fresh is the Mercadona data?

Responses are cached for 10 to 15 minutes, and you can pass fresh=true on any request to bypass the cache and fetch live data from Mercadona. We also monitor every endpoint continuously for changes on Mercadona's side and ship fixes within hours, so your pipeline keeps working without you filing a ticket.

Q Can I build a supermarket price comparison app with this API?

Yes, that's one of the most common uses. FlyByAPIs Mercadona API returns numeric price and unit-price fields (price_value, unit_price_value) next to the display strings, plus the EAN on every result, so you can match products across supermarkets by barcode and compare prices per litre or kilo programmatically.

Try It Free

Sign up, grab your API key, and make your first call in under 5 minutes.

Explore Our Other APIs

One RapidAPI account works across the whole FlyByAPIs suite. Every API starts free.