Skip to main content

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.

mercadona categories lists the full Mercadona category tree — top-level sections and their subcategories with numeric IDs and names. With --id N, it fetches all products in that category directly from the catalog API, which is useful for sorting by reference price, scanning for discounts, or building a product list without a search query. No authentication is required.

Synopsis

mercadona categories [--id N] [flags]

Flags

FlagDefaultDescription
--id NFetch a single category’s products (numeric ID)
--wh <code>config/mad1Warehouse code
--lang <code>config/esLanguage
--jsonfalseEmit raw JSON (always raw when --id is used)

Examples

# List the full category tree
mercadona categories

# Get all products in a category
mercadona categories --id 118 --json   # 118 = Arroz

# Sort a category by price-per-kilo with jq
mercadona categories --id 118 --json | jq '.results[].products[] | {id, display_name, ref: .price_instructions.reference_price, per: .price_instructions.reference_format}' | sort -t'"' -k4 -n

# Find products on sale
mercadona categories --id 112 --json | jq '.. | objects | select(.price_decreased==true) | {id, display_name, was: .price_instructions.previous_unit_price, now: .price_instructions.unit_price}'

Human output format (category tree)

Without --id, the command prints a compact indented tree:
1  Frutas y verduras
    101  Frutas
    102  Verduras y hortalizas
2  Carne
    ...

Notable category IDs

Two category IDs are used internally by the --fresh flag in mercadona search and mercadona batch:
IDName
17Congelados (frozen)
14Conservas, caldos y cremas (canned / preserved)
Passing --fresh to search or batch adds Algolia facet filters that exclude both of these top-level categories from results. Run mercadona categories without flags to discover all other category IDs for use with --category and --id.
When --id is used the output is always raw JSON, regardless of whether --json is also passed. Pipe it to jq and sort by .price_instructions.reference_price to rank every product in a category by value per kilogram or litre — a quick way to find the best deal within a single section of the catalog.

Build docs developers (and LLMs) love