The read commands (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ivorpad/mercadona-cli/llms.txt
Use this file to discover all available pages before exploring further.
search, batch, product, categories, total) require no login and work immediately after install. These recipes show real use cases with actual command output — every example below is live CLI output from the live catalog.
Recipe 1 — Price a shopping list written in plain words
You think in names; the cart API thinks in IDs.batch bridges them in a single request — returning the top hit per term with its price and reference unit:
# comments, so it reads like the original list rather than a wall of numbers (paella.txt):
total sums unit_price × qty in integer cents, so fractional quantities work correctly for weight items:
#-commented basket file feeds cart set-many to fill the cart in a single write; add --json to get structured output with {lines, total, count, complete}.
Recipe 2 — Get the fresh item, not the frozen or canned one
A bare search term often top-ranks the frozen or canned version. The--fresh flag drops the Congelados (id 17) and Conservas, caldos y cremas (id 14) top-level categories as Algolia facet filters, surfacing the fresh product instead:
batch, so you can apply it across a whole list at once:
--fresh is a heuristic, not a guarantee. When no fresh variant exists in the catalog (e.g. some guisantes are only sold frozen or canned), excluding those categories can let Algolia typo-match unrelated items. Eyeball the results. To pin to a specific aisle, combine with --category <id|name>.Recipe 3 — Sort a whole category by price-per-kilo
Every product carries areference_price field — the unit-normalised price in €/kg, €/L, or equivalent. Pull a whole category and rank by it to surface genuine value:
| id | product | price | per kg |
|---|---|---|---|
5044 | Arroz redondo Hacendado | 1.20€ | 1.200 €/kg |
5063 | Arroz largo Hacendado | 1.20€ | 1.200 €/kg |
5020 | Arroz vaporizado Hacendado | 1.55€ | 1.550 €/kg |
5042 | Arroz redondo J Sendra Hacendado | 1.60€ | 1.600 €/kg |
5184 | Arroz integral largo Hacendado | 1.65€ | 1.650 €/kg |
reference_price and reference_format fields appear on every search hit and product — use them whenever comparing products of different pack sizes.
Recipe 4 — Find products actually on offer
Each product carriesprice_decreased and previous_unit_price fields in the API response, so you can catch genuine price drops rather than marketing labels. A jq filter on a category scan surfaces them all:
| id | product | was | now | drop |
|---|---|---|---|---|
4717 | Aceite de oliva virgen extra Hacendado | 14.55€ | 14.40€ | -1% |
4706 | Aceite de oliva virgen extra Gran Selección | 5.95€ | 5.75€ | -3% |
4718 | Aceite de oliva virgen extra Hacendado | 2.70€ | 2.60€ | -4% |
5063 | Arroz largo Hacendado | 1.25€ | 1.20€ | -4% |
26029 | Garbanzo cocido Hacendado | 0.85€ | 0.80€ | -6% |
6305 | Pajaritas vegetales Hacendado | 1.00€ | 0.90€ | -10% |
mercadona categories first (no --id) to browse the full category tree and find the ID for any section you want to scan.
Recipe 5 — Read nutrition info and allergens
mercadona product <id> fetches product detail including the per-100g nutrition table for products that carry one:
--json, the structured nutrition table lives at product_information.nutritional_information, and allergen + ingredient text is at nutrition_information.allergens:
The numeric nutrition table is present for only a minority of products — most staples (pasta, plain eggs, rice) and many prepared items return none. By contrast,
nutrition_information (allergens and ingredients text) is available for nearly all products and is the more reliable field for diet-safe basket building.Recipe 6 — Discover regional specialties
Prices are uniform nationwide (see Recipe 7), but the catalog is not — each warehouse stocks local products. Use the--wh flag to query any warehouse’s catalog:
[20869] Sobrasada de Mallorca Can Pere Joan — 5.25€, [53114] Sobrasada cerdo negro de Mallorca — 14.84€, con miel, picante, and more. The same technique surfaces local cheeses, wines, and other regional products at each warehouse.
Recipe 7 — Verify price consistency across regions
Query the same product ID in five warehouses to verify Mercadona’s “Siempre Precios Bajos” policy:| id | product | Madrid | Barcelona | Valencia | Sevilla | Baleares | |
|---|---|---|---|---|---|---|---|
5044 | Arroz redondo | 1.20€ | 1.20€ | 1.20€ | 1.20€ | 1.20€ | ✓ |
4740 | AOVE Hacendado | 4.95€ | 4.95€ | 4.95€ | 4.95€ | 4.95€ | ✓ |
10379 | Leche entera | 5.76€ | 5.76€ | 5.76€ | 5.76€ | 5.76€ | ✓ |
60393 | Gambón | 6.00€ | 6.00€ | 6.00€ | 6.00€ | 6.00€ | ✓ |
64000 | Helado bombón | 2.90€ | 2.90€ | 2.90€ | 2.90€ | 2.90€ | ✓ |