# Dia Spain API scraper — DIA supermarket online shop (www.dia.es): search products, read the full product sheet with shelf price, Club Dia price, promotions, unit price, pack size, stock, ingredients, allergens and nutrition, browse categories and the offers list, priced for any Spanish postal code. Prices in EUR. No account, no browser.

> Search Dia Spain's online supermarket (www.dia.es) by keyword for a Spanish postal code. Each product comes with its shelf price, the Club Dia price and promotion when there is one, the unit price per kg / litre / dozen as Dia prints it, the pack size, units in stock at the serving store, brand and category. Up to 1 000 products per call; filter by brand, Dia's own brands or any of the shop's filters; sort by price or unit price.
> ReefAPI engine `dia-es` · 6 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/dia-es/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http). Clients that add connectors by URL, such as ChatGPT and the Claude app, connect with OAuth 2.1 (the user pastes their key once on a ReefAPI page; discovery at `/.well-known/oauth-protected-resource/mcp`). Config files send the key as `Authorization: Bearer <key>`. `?key=<key>` in the URL also works as a last-resort fallback.

## Endpoints

### POST https://api.reefapi.com/dia-es/v1/search — 1 credit
Search Dia Spain's online supermarket (www.dia.es) by keyword for a Spanish postal code. Each product comes with its shelf price, the Club Dia price and promotion when there is one, the unit price per kg / litre / dozen as Dia prints it, the pack size, units in stock at the serving store, brand and category. Up to 1 000 products per call; filter by brand, Dia's own brands or any of the shop's filters; sort by price or unit price.

**Parameters:**
- `query` (string, required) — What to look for, as a shopper types it on www.dia.es ('leche', 'aceite de oliva', 'huevos camperos'). 2-100 characters (the shop's own limits).
- `postal_code` (string, optional) — Spanish postal code of the delivery address. Stock, assortment, offers and some prices follow the Dia store that serves it. A postal code Dia does not deliver to (e.g. the Canary Islands, Melilla) is rejected with INVALID_PARAM. Default: the shop's own default area, 28041 Madrid.
- `page` (integer, optional, default 1) — Result page, 1-based. A page past the last one is NOT_FOUND.
- `page_size` (integer, optional, default 30) — Products per page, 30-1000 (default 30, the shop's own page; Dia answers 30 rows to anything smaller). One call returns up to 1 000 products; billed per 100 rows returned.
- `sort` (enum, optional, default "relevance") — Order of the rows — the three orders www.dia.es offers. Note: Dia's price orders return a narrower, stricter match than relevance (measured: 'leche' 400 → 326 → 275 rows). [one of: relevance, price_asc, unit_price_asc]
- `brand` (string, optional) — Only this brand (one brand; see filters_available 'brand_description'). Two brands in one call match nothing on Dia's side, so the engine takes one.
- `own_brand` (boolean, optional) — true = only Dia's own brands (Dia, Dia Láctea, El Molino de Dia …).
- `filters` (array, optional) — More of the shop's filters, each 'field:value' exactly as listed in `filters_available[].values[].filter` (e.g. 'lactose_free:SI', 'bio:SI', 'custom_gluten_free:SI', 'milk_type:Entera'). Several filters are AND-ed.
- `max_rotations` (integer, optional, default 3) — Advanced: how many times to retry a difficult request (1-5, default 3).

**Returns:** results[]{product_id (string, e.g. '608' or '504P6' for a pack), title, brand, own_brand (Dia's own brand), brand_type, ean (always null — Dia publishes no barcode), category{id,name,level} (name on search rows), department, category_slug, url, image, price (EUR, the shelf price a shopper without the Club Dia card pays), price_display ('4,98 €'), currency, original_price (the struck-through price of a non-club promotion), original_price_display, discount_percent, save_amount, on_offer, member_price (the 'Precio CLUB Dia' when there is one), member_price_display, member_discount_percent, member_program ('Club Dia'), member_unit_price, source_discount_percent (the shop's own -X% label), displayed_price + displayed_price_label (the big number the shop prints and its label), strikethrough_price, unit_price (as printed, e.g. 0.83), unit_price_unit (the shop's word: 'LITRO' | 'KILO' | 'DOCENA' | '100 ML.' …), unit_price_measure ('litre', 'kg', 'dozen', '100 ml'), unit_price_display ('0,83 €/LITRO'), unit_price_applies_to ('price' | 'member_price'), size (pack size as written at the end of the name: 'pack 6 x 1 L', '450 g', '24 unidades'), size_value, size_unit, pack_units, size_is_approximate, stock_units (units in stock at the serving store), in_stock, availability ('in_stock' | 'out_of_stock'), badge ('Mejor valorado', 'Especial Navidad' …), badge_code, headband ('exclusive_offer' …), labels[] ('Sin gluten' …), promotions[]{code, description, short_description, club_dia_only, type, url}, expiration_days, rating/review_count (null — not published), sponsored (false)}, count, total_results, page, page_size, page_count, sort_applied, area{postal_code, store_id (Dia's physical store that serves the postal code), source ('postal_code' | 'default')}, query, filters_applied[], filters_available[]{field, name, values[]{value, count, filter}}, suggestions[] (Dia's own related searches)

**Example request body:**
```json
{
  "query": "leche"
}
```

### POST https://api.reefapi.com/dia-es/v1/product/detail — 1 credit
The full Dia product sheet by `product_id` (or product URL) for a Spanish postal code: title, brand, every image, shelf price, Club Dia price, promotions, unit price, pack size and net content, units in stock, breadcrumb, description, ingredients, allergen labels, nutrition table per 100 g/ml, storage and preparation instructions and the manufacturer.

**Parameters:**
- `product_id` (string, required) — Dia product id (`product_id` of any search row, e.g. '608' or '504P6' for a pack), or a www.dia.es product URL (…/p/504P6).
- `postal_code` (string, optional) — Spanish postal code of the delivery address. Stock, assortment, offers and some prices follow the Dia store that serves it. A postal code Dia does not deliver to (e.g. the Canary Islands, Melilla) is rejected with INVALID_PARAM. Default: the shop's own default area, 28041 Madrid.
- `max_rotations` (integer, optional, default 3) — Advanced: how many times to retry a difficult request (1-5, default 3).

**Returns:** product{product_id (string, e.g. '608' or '504P6' for a pack), title, brand, own_brand (Dia's own brand), brand_type, ean (always null — Dia publishes no barcode), category{id,name,level} (name on search rows), department, category_slug, url, image, price (EUR, the shelf price a shopper without the Club Dia card pays), price_display ('4,98 €'), currency, original_price (the struck-through price of a non-club promotion), original_price_display, discount_percent, save_amount, on_offer, member_price (the 'Precio CLUB Dia' when there is one), member_price_display, member_discount_percent, member_program ('Club Dia'), member_unit_price, source_discount_percent (the shop's own -X% label), displayed_price + displayed_price_label (the big number the shop prints and its label), strikethrough_price, unit_price (as printed, e.g. 0.83), unit_price_unit (the shop's word: 'LITRO' | 'KILO' | 'DOCENA' | '100 ML.' …), unit_price_measure ('litre', 'kg', 'dozen', '100 ml'), unit_price_display ('0,83 €/LITRO'), unit_price_applies_to ('price' | 'member_price'), size (pack size as written at the end of the name: 'pack 6 x 1 L', '450 g', '24 unidades'), size_value, size_unit, pack_units, size_is_approximate, stock_units (units in stock at the serving store), in_stock, availability ('in_stock' | 'out_of_stock'), badge ('Mejor valorado', 'Especial Navidad' …), badge_code, headband ('exclusive_offer' …), labels[] ('Sin gluten' …), promotions[]{code, description, short_description, club_dia_only, type, url}, expiration_days, rating/review_count (null — not published), sponsored (false), brand_source ('seo_text' — the detail has no brand field), breadcrumb[]{id,name,level,url}, images[], net_content ('6L', the label's 'Contenido neto'), info_labels[], coupons[], description, subtitle, ingredients, storage, preparation, usage, instructions{}, manufacturer, manufacturer_address, nutrition{per ('100 ml'), energy_kcal, energy_kj, values[]{name, value, unit, value_per_100, of_which[]}, vitamins_minerals[]}, additional_info ('Información de interés'), average_weight_g + weight_in_grams (items sold by the piece), hazards{caution[], hazard[], pictograms[]} (cleaning products), seo_text, other_fields{} (any further field Dia adds, passed through)}, area{postal_code, store_id (Dia's physical store that serves the postal code), source ('postal_code' | 'default')}

**Example request body:**
```json
{
  "product_id": "608"
}
```

### POST https://api.reefapi.com/dia-es/v1/category — 1 credit
Products of one Dia category (ids from `categories`, 20 per page as on www.dia.es) for a Spanish postal code, sorted like the shop (relevance, price, unit price). Same rows as search, plus the category's filters with ready-made filtered category URLs.

**Parameters:**
- `category_id` (string, required) — A category id from `categories` (second level, e.g. L2051 = Leche), a www.dia.es category URL, or a filtered category URL from `filters_available[].values[].url` (e.g. only one brand inside the category).
- `postal_code` (string, optional) — Spanish postal code of the delivery address. Stock, assortment, offers and some prices follow the Dia store that serves it. A postal code Dia does not deliver to (e.g. the Canary Islands, Melilla) is rejected with INVALID_PARAM. Default: the shop's own default area, 28041 Madrid.
- `page` (integer, optional, default 1) — Result page, 1-based. A page past the last one is NOT_FOUND.
- `sort` (enum, optional, default "relevance") — Order of the rows — the three orders www.dia.es offers. Note: Dia's price orders return a narrower, stricter match than relevance (measured: 'leche' 400 → 326 → 275 rows). [one of: relevance, price_asc, unit_price_asc]
- `max_rotations` (integer, optional, default 3) — Advanced: how many times to retry a difficult request (1-5, default 3).

**Returns:** results[]{product_id (string, e.g. '608' or '504P6' for a pack), title, brand, own_brand (Dia's own brand), brand_type, ean (always null — Dia publishes no barcode), category{id,name,level} (name on search rows), department, category_slug, url, image, price (EUR, the shelf price a shopper without the Club Dia card pays), price_display ('4,98 €'), currency, original_price (the struck-through price of a non-club promotion), original_price_display, discount_percent, save_amount, on_offer, member_price (the 'Precio CLUB Dia' when there is one), member_price_display, member_discount_percent, member_program ('Club Dia'), member_unit_price, source_discount_percent (the shop's own -X% label), displayed_price + displayed_price_label (the big number the shop prints and its label), strikethrough_price, unit_price (as printed, e.g. 0.83), unit_price_unit (the shop's word: 'LITRO' | 'KILO' | 'DOCENA' | '100 ML.' …), unit_price_measure ('litre', 'kg', 'dozen', '100 ml'), unit_price_display ('0,83 €/LITRO'), unit_price_applies_to ('price' | 'member_price'), size (pack size as written at the end of the name: 'pack 6 x 1 L', '450 g', '24 unidades'), size_value, size_unit, pack_units, size_is_approximate, stock_units (units in stock at the serving store), in_stock, availability ('in_stock' | 'out_of_stock'), badge ('Mejor valorado', 'Especial Navidad' …), badge_code, headband ('exclusive_offer' …), labels[] ('Sin gluten' …), promotions[]{code, description, short_description, club_dia_only, type, url}, expiration_days, rating/review_count (null — not published), sponsored (false)}, count, total_results, page, page_size, page_count, sort_applied, area{postal_code, store_id (Dia's physical store that serves the postal code), source ('postal_code' | 'default')}, category{id,name,url}, filters_available[]{field,name,values[]{value,count,filter,url}}

**Example request body:**
```json
{
  "category_id": "L2051"
}
```

### POST https://api.reefapi.com/dia-es/v1/categories — 1 credit
Dia's full online category tree — every department and its categories, with the ids `category` and `deals` take.

**Parameters:**
- `max_rotations` (integer, optional, default 3) — Advanced: how many times to retry a difficult request (1-5, default 3).

**Returns:** categories[]{id, name, level (0), url, path, icon, children[]{id, name, level (1), url, path}}, count, category_count

### POST https://api.reefapi.com/dia-es/v1/deals — 1 credit
The products on offer ('Ofertas') in one Dia department for a Spanish postal code, 24 per page as on www.dia.es: shelf price, Club Dia price, struck-through price, discount and the promotion text. Offers differ by area.

**Parameters:**
- `category_id` (string, required) — A department id from `categories` (first level, e.g. L108 = Huevos, leche y mantequilla). Returns that department's offers, 24 per page.
- `postal_code` (string, optional) — Spanish postal code of the delivery address. Stock, assortment, offers and some prices follow the Dia store that serves it. A postal code Dia does not deliver to (e.g. the Canary Islands, Melilla) is rejected with INVALID_PARAM. Default: the shop's own default area, 28041 Madrid.
- `page` (integer, optional, default 1) — Result page, 1-based. A page past the last one is NOT_FOUND.
- `max_rotations` (integer, optional, default 3) — Advanced: how many times to retry a difficult request (1-5, default 3).

**Returns:** results[]{product_id (string, e.g. '608' or '504P6' for a pack), title, brand, own_brand (Dia's own brand), brand_type, ean (always null — Dia publishes no barcode), category{id,name,level} (name on search rows), department, category_slug, url, image, price (EUR, the shelf price a shopper without the Club Dia card pays), price_display ('4,98 €'), currency, original_price (the struck-through price of a non-club promotion), original_price_display, discount_percent, save_amount, on_offer, member_price (the 'Precio CLUB Dia' when there is one), member_price_display, member_discount_percent, member_program ('Club Dia'), member_unit_price, source_discount_percent (the shop's own -X% label), displayed_price + displayed_price_label (the big number the shop prints and its label), strikethrough_price, unit_price (as printed, e.g. 0.83), unit_price_unit (the shop's word: 'LITRO' | 'KILO' | 'DOCENA' | '100 ML.' …), unit_price_measure ('litre', 'kg', 'dozen', '100 ml'), unit_price_display ('0,83 €/LITRO'), unit_price_applies_to ('price' | 'member_price'), size (pack size as written at the end of the name: 'pack 6 x 1 L', '450 g', '24 unidades'), size_value, size_unit, pack_units, size_is_approximate, stock_units (units in stock at the serving store), in_stock, availability ('in_stock' | 'out_of_stock'), badge ('Mejor valorado', 'Especial Navidad' …), badge_code, headband ('exclusive_offer' …), labels[] ('Sin gluten' …), promotions[]{code, description, short_description, club_dia_only, type, url}, expiration_days, rating/review_count (null — not published), sponsored (false)}, count, total_results, page, page_size, page_count, sort_applied, area{postal_code, store_id (Dia's physical store that serves the postal code), source ('postal_code' | 'default')}, department{id,name}

**Example request body:**
```json
{
  "category_id": "L108"
}
```

### POST https://api.reefapi.com/dia-es/v1/store/lookup — 0 credits
Check whether Dia's online shop delivers to a Spanish postal code and which Dia store serves it.

**Parameters:**
- `postal_code` (string, required) — Spanish 5-digit postal code.
- `max_rotations` (integer, optional, default 3) — Advanced: how many times to retry a difficult request (1-5, default 3).

**Returns:** postal_code, delivers (bool), store_id (null when not served), message

**Example request body:**
```json
{
  "postal_code": "46001"
}
```

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

## More
- Try it live, no code: https://reefapi.com/playground?engine=dia-es
- Human docs page: https://reefapi.com/docs/dia-es
- Overview page: https://reefapi.com/dia-es-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
