Alcampo APIcompraonline.alcampo.es ↗
Access Alcampo product catalog, categories, promotions, and store locations via API. Search products, browse categories, and retrieve nutritional data from Spain's Alcampo supermarket.
What is the Alcampo API?
This API exposes 6 endpoints covering the full Alcampo online supermarket catalog at compraonline.alcampo.es, including product search, category browsing, and store locations across Spain. The get_product_details endpoint returns structured nutritional data, ingredient fields, HTML descriptions, and category breadcrumbs for any individual product. Use search_products to query by keyword or get_category_tree to navigate the full four-level category hierarchy.
curl -X GET 'https://api.parse.bot/scraper/0907c7f1-cf66-4da7-b388-5331f776597c/search_products?query=leche&page_size=10' \ -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 compraonline-alcampo-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: Alcampo Online Supermarket SDK — bounded, re-runnable."""
from parse_apis.alcampo_online_supermarket_api import Alcampo, ProductNotFound
client = Alcampo()
# Browse the category tree to discover retailerCategoryIds for browsing.
category = client.categories.list(limit=3).first()
if category:
print(category.name, category.retailer_category_id, category.product_count)
# Search for products by keyword — limit caps total items fetched.
for group in client.productgroups.search(query="leche", limit=3):
print(group.type, group.name)
for product in group.decorated_products[:2]:
print(" ", product.name, product.price.amount, product.brand)
# Browse a category's products.
for group in client.productgroups.by_category(category_id="OCLAC", limit=2):
for product in group.decorated_products[:2]:
print(product.name, product.available, product.price.currency)
# Drill into product details from a search result.
first_group = client.productgroups.search(query="pan", limit=1).first()
if first_group and first_group.decorated_products:
summary = first_group.decorated_products[0]
try:
detail = summary.details()
print(detail.name, detail.detailed_description, detail.ingredients)
except ProductNotFound as exc:
print(f"Product not found: {exc}")
# Find nearby stores by coordinates.
store = client.stores.search(lat=40.4168, lng=-3.7038, limit=1).first()
if store:
print(store.name, store.city, store.distance, store.open_now)
# Check current promotions.
for group in client.productgroups.promotions(limit=2):
for promo_product in group.decorated_products[:2]:
for promo in promo_product.promotions:
print(promo_product.name, promo.description, promo.type)
print("exercised: categories.list / productgroups.search / productgroups.by_category / details / stores.search / productgroups.promotions")
Full-text search over Alcampo's online catalog. Returns product groups organized by relevance, with decorated product details including pricing, availability, images, and promotions. Results are grouped by type (personalized, cluster, on_offer). Pagination is token-based via nextPageToken in metadata.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search keyword (e.g. 'leche', 'pan', 'agua'). |
| page_size | integer | Maximum number of products to return per page. |
{
"type": "object",
"fields": {
"metadata": "object containing nextPageToken for cursor-based pagination",
"productGroups": "array of product group objects, each containing type, name, decoratedProducts array with full product info, and otherProductIds",
"additionalPageInfo": "object with categories, filters, breadcrumb, sortOptions, and query info"
},
"sample": {
"data": {
"metadata": {
"nextPageToken": "449b1958-2b2d-44a8-8058-077900958e7a"
},
"productGroups": [
{
"name": "fop.headertitle.personalised",
"type": "personalized",
"otherProductIds": [],
"decoratedProducts": [
{
"name": "AUCHAN Leche semidesnatada de vaca 6 x 1l",
"brand": "PRODUCTO ALCAMPO",
"price": {
"amount": "5.28",
"currency": "EUR"
},
"available": true,
"categoryPath": [
"Leche, Huevos, Lácteos, Yogures y Bebidas vegetales",
"Leche",
"Leche semidesnatada"
],
"retailerProductId": "54180",
"packSizeDescription": "6000ml"
}
]
}
],
"additionalPageInfo": {
"categories": [
{
"name": "Leche",
"productCount": 322,
"retailerCategoryId": "OC1603"
}
],
"sortOptions": [
{
"selected": true,
"sortOptionId": "favorite"
}
]
}
},
"status": "success"
}
}About the Alcampo API
Product Search and Catalog
The search_products endpoint accepts a query string (e.g. 'leche', 'pan') and an optional page_size integer, returning productGroups arrays where each group contains a decoratedProducts array with pricing, availability, images, and promotion details alongside otherProductIds. To browse by category instead, get_products_by_category takes a category_id sourced from get_category_tree (e.g. 'OCLAC', 'OC16') and returns paginated results with a nextPageToken in the metadata object plus subcategory filters, breadcrumbs, and sort options in additionalPageInfo.
Product Details and Nutritional Data
get_product_details accepts a product_id string (obtainable from search or category results) and returns two top-level objects: bopData with detailedDescription HTML, ingredient fields, and breadcrumbs; and product with the full record including name, brand, price, images, availability, categoryPath, and a ratingSummary. This makes it the primary endpoint for building product pages or nutrition-tracking tools.
Promotions and Category Tree
get_promotions returns current on-offer product groups with promotion details embedded in each decorated product, paginated via nextPageToken. get_category_tree requires no inputs and returns the full hierarchy up to four levels deep — each node carries name, categoryId, retailerCategoryId, productCount, and a childCategories array. The retailerCategoryId values from this tree are the IDs expected by get_products_by_category.
Store Locations
get_store_locations accepts lat and lng coordinates (defaulting to central Madrid: 40.4168, -3.7038) and returns a GeoJSON FeatureCollection. Each Feature in the features array carries store name, address, contact, opening hours, and distance from the search point, making it straightforward to build a store-finder or coverage map for Spanish retail locations.
The Alcampo API is a managed, monitored endpoint for compraonline.alcampo.es — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when compraonline.alcampo.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 compraonline.alcampo.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?+
- Building a price-tracking dashboard for Alcampo grocery products using
search_productsand thepricefield in decorated product responses - Populating a nutrition database with ingredient and nutritional fields returned by
get_product_detailsfor individual SKUs - Rendering a store-finder map for Spain by querying
get_store_locationswith user-supplied coordinates and plotting the GeoJSON FeatureCollection - Monitoring active promotions and discount descriptions via
get_promotionsto surface deals in a comparison shopping tool - Navigating the full four-level category hierarchy with
get_category_treeto build a structured product taxonomy or sitemap - Syncing in-stock availability status from category pages using
get_products_by_categorywith pagination vianextPageToken - Extracting brand and
ratingSummarydata fromget_product_detailsto support product review aggregation
| 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 Alcampo provide an official developer API?+
How does pagination work across endpoints?+
get_products_by_category and get_promotions both return a metadata object containing a nextPageToken string. Pass this token in subsequent requests to retrieve the next page of results. search_products uses a page_size parameter to limit results but does not currently expose a pagination token.Does the API return user reviews or detailed ratings?+
get_product_details returns a ratingSummary object per product, but individual user review text and reviewer details are not currently exposed. The API covers product metadata, pricing, nutritional data, and aggregate rating summaries. You can fork the API on Parse and revise it to add an endpoint targeting per-review data.Is historical pricing or price-change history available?+
price, availability, and promotion details per product. You can fork the API on Parse and revise it to build a price-history endpoint by storing snapshots over time.What product ID format does `get_product_details` expect, and where do I get IDs?+
product_id parameter is a numeric string (e.g. '54497'). These IDs appear in the decoratedProducts arrays returned by both search_products and get_products_by_category, so the typical flow is to run a search or category query first, collect IDs from the results, then call get_product_details for each product you need full data on.