Dia APIdia.es ↗
Access Dia.es supermarket catalog via API: search products, browse categories, retrieve nutritional info, and fetch current discounts. 6 endpoints.
What is the Dia API?
The Dia.es API provides 6 endpoints covering the full product catalog of the Día supermarket chain in Spain, from category navigation to individual product nutritional data. The get_product_detail endpoint returns ingredients, nutritional information, storage instructions, and pricing for any product SKU. You can combine search_products with pagination and facets to build keyword-driven product searches, or walk the category tree with get_categories and get_subcategories.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/a1d71c17-a0c7-43ac-8b5e-ed231981ce90/get_categories' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace dia-es-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Dia Supermercado SDK — search products, browse categories, get offers."""
from parse_apis.dia_supermercado_api import Dia, CategoryNotFound
client = Dia()
# List all top-level categories
for cat in client.categories.list(limit=5):
print(cat.name, cat.id)
# Search for products by keyword — limit caps total items fetched
for product in client.productsummaries.search(query="aceite oliva", limit=3):
print(product.display_name, product.prices.price, product.prices.currency)
# Drill into one product's full detail
item = client.productsummaries.search(query="leche", limit=1).first()
if item:
detail = item.detail()
print(detail.sku_id, detail.title, detail.units_in_stock)
# Browse a category's subcategories
category = client.category(id="L108")
for subcat in category.subcategories(limit=3):
print(subcat.name, subcat.id)
# List products within a subcategory
subcat = client.subcategory(id="L2051")
for product in subcat.products(limit=3):
print(product.display_name, product.units_in_stock)
# Get current offers grouped by category
for group in client.offergroups.list(limit=2):
print(group.category_name, group.has_more_items)
# Handle a non-existent category
try:
bad = client.category(id="L9999")
for s in bad.subcategories(limit=1):
print(s.name)
except CategoryNotFound as exc:
print(f"Category not found: {exc.category_id}")
print("exercised: categories.list / productsummaries.search / detail / category.subcategories / subcategory.products / offergroups.list / CategoryNotFound")
Get all top-level product categories from the Dia supermarket navigation menu. Returns approximately 30 categories with their IDs, names, and URL slugs. These category IDs are used as input for get_subcategories and get_products_by_category.
No input parameters required.
{
"type": "object",
"fields": {
"categories": "array of category objects each containing id, name, slug, and link"
},
"sample": {
"data": {
"categories": [
{
"id": "L128",
"link": "/novedades-y-recomendados/c/L128",
"name": "Novedades y recomendados",
"slug": "novedades-y-recomendados"
},
{
"id": "L105",
"link": "/frutas/c/L105",
"name": "Frutas",
"slug": "frutas"
},
{
"id": "L108",
"link": "/huevos-leche-y-mantequilla/c/L108",
"name": "Huevos, leche y mantequilla",
"slug": "huevos-leche-y-mantequilla"
}
]
},
"status": "success"
}
}About the Dia API
Category and Product Browsing
The get_categories endpoint returns approximately 30 top-level categories from the Día navigation menu, each with an id, name, slug, and link. Pass any returned id (e.g. L108) to get_subcategories to retrieve child categories, which include a Todo entry representing the full parent scope. Both category and subcategory IDs can then be passed to get_products_by_category, which returns paginated product listings. Each product in the plp_items array carries sku_id, display_name, brand, prices, units_in_stock, image, and url. The pagination object provides page_number, page_size, and total_pages.
Product Search and Detail
search_products accepts a query string — single words like leche or multi-word phrases like aceite oliva — and returns the same product shape as category browsing, plus a facets array you can inspect to understand available filter dimensions. For full product data, get_product_detail takes a product_id (SKU such as 504P6 or 203958) and returns a product object with nested fields: primary_info, prices, ingredients, nutritional_info, images, instructions, product_info, and sku_id. This is the only endpoint that exposes ingredient lists and nutritional panels.
Offers and Discounts
get_offers returns currently discounted products grouped by category. Each entry in plp_items contains a category_id, category_name, link, and an items array of discounted products with discount percentages and club pricing. The pagination model for this endpoint uses token-based cursors exposed as current_page and next_page fields, even when an integer page parameter is supplied — consecutive integer pages may return overlapping results. The total_items field gives the count of all discounted products currently available.
The Dia API is a managed, monitored endpoint for dia.es — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when dia.es changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official dia.es API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a grocery price tracker monitoring
pricesfields across product SKUs over time. - Aggregate nutritional information from
get_product_detailto compare products within a category. - Scrape current promotions via
get_offersto surface discount percentages and club pricing in a deals app. - Construct a category-tree navigation by chaining
get_categoriesandget_subcategoriescalls. - Power a recipe ingredient cost estimator by searching
search_productswith ingredient names. - Monitor
units_in_stockfromget_products_by_categoryto detect low-stock items in a specific category. - Index the Día catalog for a comparison shopping tool by iterating categories and collecting
sku_idandbrandfields.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Día have an official public developer API?+
What does get_product_detail return beyond what category browsing shows?+
get_product_detail is the only endpoint that returns ingredients, nutritional_info, and instructions. Category and search endpoints return a shorter product shape — sku_id, display_name, brand, prices, units_in_stock, image, and url — without ingredient lists or nutrition panels. You need the SKU from one of those endpoints to call get_product_detail.Are there known quirks with the get_offers pagination?+
get_offers endpoint uses token-based cursors internally, exposed as current_page and next_page fields in the pagination object. Passing sequential integer values to the page parameter may return overlapping sets of results. Use the next_page cursor token rather than incrementing integers to page through offers reliably.Does the API cover product reviews or customer ratings?+
Can I filter search results by facets returned in search_products?+
search_products endpoint returns a facets array alongside results, which describes the filter dimensions available for a given query. The current endpoint does not accept facet filter parameters as inputs. You can fork the API on Parse and revise it to add facet-based filtering parameters to the search endpoint.