GET /product-details

Product Details

Get the full Mercadona product sheet by product id or EAN barcode: price, unit price, ingredients, allergens, origin, suppliers and photos.

Mercadona API

Returns the complete product sheet for one Mercadona product, looked up by product_id or by EAN barcode. On top of the standard product row (price, unit price, previous price, availability, brand, category path) you get ingredients and allergens as HTML and plain text, origin, suppliers, legal name, storage and usage instructions, alcohol content and every product photo. Prices and stock are for the warehouse that serves the postal code you pass, and the product must be stocked there.

HTTP Request

GET /product-details

Parameters

ParameterTypeRequiredDefaultDescription
product_idstringOne of-Mercadona product id, passed verbatim. Decimal ids like 81241.3 exist (81241 is a different, unknown id). Pass exactly one of product_id or ean
eanstringOne of-EAN-13 barcode. Counter items carry internal 2105… codes. The response is the same as for product_id
postal_codestringNo-Spanish 5-digit postal code. Resolved to the warehouse that serves that address and takes precedence over warehouse
warehousestringNovlc1Hub or 4-digit store code from /warehouses . The product must be stocked there. Ignored when postal_code is given
languagestringNoeses, en or ca. Only name and category names are translated. Description, ingredients, allergens and the other texts stay in Spanish
freshbooleanNofalseBypass the product cache (1 hour, 20 minutes when availability is restricted) and fetch live data

Numeric store codes are served live: popularity_score is null, and brand, ean or category_path may be null.

Response

Request: GET /product-details?product_id=10381&postal_code=08001

  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
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
  "status": true,
  "request_id": "b8a2c5c8-e7c8-9a9e-135d-ecc7a0bb",
  "cached_at": null,
  "data": {
    "product_id": "10381",
    "name": "Leche semidesnatada Hacendado",
    "slug": "leche-semidesnatada-hacendado-pack-6",
    "url": "https://tienda.mercadona.es/product/10381/leche-semidesnatada-hacendado-pack-6",
    "thumbnail": "https://prod-mercadona.imgix.net/images/71a4a0c11d865a62f958ad522290f8f4.jpg?fit=crop&h=300&w=300",
    "packaging": null,
    "main_feature": null,
    "is_water": false,
    "requires_age_check": false,
    "category": {
      "category_id": 6,
      "name": "Huevos, leche y mantequilla"
    },
    "availability": {
      "in_stock": true,
      "status": null,
      "unavailable_from": null,
      "unavailable_weekdays": [],
      "order_limit": 999
    },
    "price": "4.98",
    "price_value": 4.98,
    "previous_price": "5.04",
    "previous_price_value": 5.04,
    "is_price_drop": true,
    "unit_price": "0.830",
    "unit_price_value": 0.83,
    "unit_price_format": "L",
    "bulk_price_value": 0.83,
    "size_format": "l",
    "unit_size": 6.0,
    "is_pack": true,
    "pack_size": 1.0,
    "total_units": 6,
    "unit_name": "briks",
    "iva_percent": 4,
    "approx_size": false,
    "drained_weight": null,
    "currency": "EUR",
    "color_variants": null,
    "warehouse": "bcn1",
    "ean": "8402001002090",
    "brand": "Hacendado",
    "category_path": [
      [
        {
          "category_id": 6,
          "name": "Huevos, leche y mantequilla",
          "level": 0
        },
        {
          "category_id": 72,
          "name": "Leche y bebidas vegetales",
          "level": 1
        }
      ]
    ],
    "popularity_score": 34027.0,
    "is_new": false,
    "origin": "España",
    "photos": [
      {
        "zoom": "https://prod-mercadona.imgix.net/images/71a4a0c11d865a62f958ad522290f8f4.jpg?fit=crop&h=3600&w=3600",
        "regular": "https://prod-mercadona.imgix.net/images/71a4a0c11d865a62f958ad522290f8f4.jpg?fit=crop&h=600&w=600",
        "thumbnail": "https://prod-mercadona.imgix.net/images/71a4a0c11d865a62f958ad522290f8f4.jpg?fit=crop&h=300&w=300",
        "perspective": 1
      },
      {
        "zoom": "https://prod-mercadona.imgix.net/images/f1f9759d56fac59c525fb815d7a675ad.jpg?fit=crop&h=3600&w=3600",
        "regular": "https://prod-mercadona.imgix.net/images/f1f9759d56fac59c525fb815d7a675ad.jpg?fit=crop&h=600&w=600",
        "thumbnail": "https://prod-mercadona.imgix.net/images/f1f9759d56fac59c525fb815d7a675ad.jpg?fit=crop&h=300&w=300",
        "perspective": 9
      }
    ],
    "ingredients": "<strong>Leche</strong> semidesnatada de vaca. Origen de la leche: España",
    "ingredients_text": "Leche semidesnatada de vaca. Origen de la leche: España",
    "allergens": "Contiene <strong>leche y sus derivados (incluida la lactosa)</strong>.",
    "allergens_text": "Contiene leche y sus derivados (incluida la lactosa).",
    "legal_name": "Leche semidesnatada UHT de vaca",
    "description": "Leche semidesnatada Hacendado",
    "suppliers": [
      "COVAP S. COOP. AND. GANADERA DEL VALLE DE LOS PEDROCHES",
      "Capsa"
    ],
    "storage_instructions": "Mantener en lugar fresco y seco. Una vez abierto el envase, conservar en el frigorífico y consumir antes de 3 días.",
    "usage_instructions": null,
    "mandatory_mentions": "100% granjas nacionales",
    "danger_mentions": null,
    "alcohol_by_volume": null,
    "alcohol_by_volume_value": null,
    "counter_info": null,
    "production_variant": null,
    "is_prepared_by_mercadona": false,
    "is_bulk": false,
    "is_variable_weight": false,
    "snapshot_date": "2026-10-14",
    "resolved_filters": {
      "warehouse": {
        "input": "08001",
        "resolved": "bcn1",
        "source": "postal_code"
      }
    },
    "language": "es"
  },
  "request_params": {
    "postal_code": "08001",
    "product_id": "10381"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the product was found
request_idstringUnique request identifier
cached_atstring | nullISO timestamp when the answer came from cache, null when fetched for this request
dataobjectThe product
data.product_idstringMercadona product id. Pass it verbatim: decimal ids like 81241.3 exist
data.namestringProduct name, translated with language
data.slugstringURL slug of the product page
data.urlstringProduct URL on tienda.mercadona.es
data.thumbnailstringProduct image URL (300x300)
data.packagingstring | nullPackaging label, e.g. "Pack-6" or "Brik"
data.main_featurestring | nullHighlighted feature, when Mercadona sets one
data.is_waterbooleanWater product flag
data.requires_age_checkbooleanAlcohol or other age-restricted product
data.categoryobjectLevel-0 category of the product
data.category.category_idintegerLevel-0 category id
data.category.namestringLevel-0 category name, translated with language
data.availabilityobjectAvailability at the resolved warehouse
data.availability.in_stockbooleanIn stock at the resolved warehouse
data.availability.statusstring | nullRestriction status, null when unrestricted
data.availability.unavailable_fromstring | nullDate the product stops being available
data.availability.unavailable_weekdaysarrayWeekdays the product can’t be delivered
data.availability.order_limitintegerMaximum units per order, e.g. 999
data.pricestringDisplay price in euros, e.g. "4.98"
data.price_valuefloatNumeric price in euros
data.previous_pricestring | nullPrevious display price, null when there is none
data.previous_price_valuefloat | nullPrevious numeric price
data.is_price_dropbooleantrue when the current price is below the previous price (computed by the API, not a Mercadona flag)
data.unit_pricestringDisplay unit price, e.g. "0.830"
data.unit_price_valuefloatNumeric unit price
data.unit_price_formatstringUnit the unit price refers to, e.g. "L" or "kg"
data.bulk_price_valuefloatBulk price
data.size_formatstringSize unit, e.g. "l"
data.unit_sizefloatSize expressed in size_format units
data.is_packbooleanProduct is sold as a pack
data.pack_sizefloat | nullSize of each unit in the pack
data.total_unitsinteger | nullNumber of units in the pack
data.unit_namestring | nullName of each unit, e.g. "briks"
data.iva_percentintegerVAT percentage
data.approx_sizebooleanSize is approximate
data.drained_weightfloat | nullDrained weight, for canned or preserved products
data.currencystringAlways "EUR"
data.color_variantsarray | nullColour variants, null when the product has none
data.warehousestringWarehouse that answered for this row
data.eanstringEAN-13 barcode
data.brandstringBrand name as Mercadona writes it
data.category_patharrayCategory paths of the product. Each path is an array of objects from level 0 down
data.category_path[][].category_idintegerCategory id
data.category_path[][].namestringCategory name, translated with language
data.category_path[][].levelintegerCategory level: 0, 1 or 2
data.popularity_scorefloat | nullMercadona’s internal popularity score. null on numeric store codes
data.is_newbooleanFlagged as new by Mercadona
data.originstringOrigin, e.g. "España"
data.photos[]arrayAll product photos
data.photos[].zoomstringImage URL, 3600x3600
data.photos[].regularstringImage URL, 600x600
data.photos[].thumbnailstringImage URL, 300x300
data.photos[].perspectiveintegerPerspective number of the photo
data.ingredientsstringIngredients as HTML. <strong> marks allergens
data.ingredients_textstringIngredients as plain text
data.allergensstringAllergen statement as HTML
data.allergens_textstringAllergen statement as plain text
data.legal_namestringLegal denomination of the product
data.descriptionstringProduct description
data.suppliers[]array of stringsSupplier names
data.storage_instructionsstring | nullStorage instructions
data.usage_instructionsstring | nullUsage instructions
data.mandatory_mentionsstring | nullMandatory label mentions, e.g. "100% granjas nacionales"
data.danger_mentionsstring | nullHazard text
data.alcohol_by_volumestring | nullAlcohol by volume, display value
data.alcohol_by_volume_valuefloat | nullAlcohol by volume, numeric
data.counter_infostring | nullInformation for counter (fresh) items
data.production_variantstring | nullProduction variant
data.is_prepared_by_mercadonabooleanReady meal prepared by Mercadona
data.is_bulkbooleanSold loose
data.is_variable_weightbooleanPrice depends on the weight served
data.snapshot_datestringDate of the catalog snapshot, YYYY-MM-DD
data.resolved_filtersobjectWhat your filters resolved to
data.resolved_filters.warehouseobjectWarehouse resolution
data.resolved_filters.warehouse.inputstring | nullThe postal_code or warehouse you sent
data.resolved_filters.warehouse.resolvedstringWarehouse that answered, e.g. bcn1
data.resolved_filters.warehouse.sourcestringpostal_code, param or default
data.resolved_filters.eanobjectOnly when looked up by ean: {input, resolved, source}, where resolved is the matching product_id and source is "index"
data.languagestringLanguage used
request_paramsobjectQuery parameters you sent, echoed back as strings

Error Responses

When the product can’t be found, the API returns HTTP 200 with status: false, data: null and an error object. Unknown barcode:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
  "status": false,
  "request_id": "51cec14a-674b-1fb6-d6d7-af41ea3b",
  "cached_at": null,
  "error": {
    "code": "ean_not_found",
    "message": "No product with EAN 0000000000000 in the catalog; the barcode may be a counter item or not sold online. Try /mercadona/search with the product name.",
    "warehouse": null
  },
  "data": null,
  "request_params": {
    "ean": "0000000000000"
  }
}

The message mentions /mercadona/search. That is an internal path: the public endpoint is /search .

Invalid input returns HTTP 400 with error as a plain string. Passing both product_id and ean, or neither:

1
2
3
4
5
{
  "status": false,
  "request_id": "e0d8ba7e-bc75-79ff-3d65-01de3124",
  "error": "Invalid parameter 'ean': pass exactly one of product_id or ean"
}
Status CodeCauseDescription
200, error.code: ean_not_foundUnknown barcodeNo product with that EAN in the catalog. It may be a counter item or not sold online. Search by name instead
200, error.code: not_found_in_warehouseNot stockedThe product exists but isn’t stocked in the resolved warehouse. Try another postal code
200, error.code: not_foundUnknown product idNo product with that product_id. Check decimal ids are passed verbatim
400Both or neither of product_id / eanPass exactly one of them
400Invalid warehouseMust be a hub code (3 letters + 1 digit) or a 4-digit store code

Check status before reading data: not-found answers are HTTP 200.

Code Examples

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

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

params = {
    "product_id": "10381",
    "postal_code": "08001"
}

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

response = requests.get(url, headers=headers, params=params)
body = response.json()

if body["status"]:
    product = body["data"]
    print(f"{product['name']}: {product['price']} EUR ({product['unit_price']}/{product['unit_price_format']})")
    print(f"EAN: {product['ean']}, origin: {product['origin']}")
    print(f"Allergens: {product['allergens_text']}")
else:
    print(f"Not found: {body['error']}")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const url = "https://mercadona-api.p.rapidapi.com/product-details";

// Look up by barcode instead of product id
const params = new URLSearchParams({
  ean: "8402001002090",
  postal_code: "08001"
});

const response = await fetch(`${url}?${params}`, {
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "mercadona-api.p.rapidapi.com"
  }
});

const body = await response.json();
if (body.status) {
  const product = body.data;
  console.log(`${product.product_id} ${product.name}: ${product.price} EUR`);
  console.log(`Ingredients: ${product.ingredients_text}`);
} else {
  console.log(body.error);
}
1
2
3
4
5
curl -G "https://mercadona-api.p.rapidapi.com/product-details" \
  --data-urlencode "product_id=10381" \
  --data-urlencode "postal_code=08001" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: mercadona-api.p.rapidapi.com"
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI