Ocado APIocado.com ↗
Search Ocado UK's grocery catalog, get full product details with nutrition and allergens, fetch cart contents, and retrieve related products via one API.
What is the Ocado API?
The Ocado API gives developers access to 5 endpoints covering Ocado UK's grocery catalog, from keyword search to full product detail pages. search_products returns prices, promotions, availability, and images for up to 300 results per query. get_product_details adds nutrition tables, allergen strings, storage instructions, and star ratings. Together, these endpoints expose enough structured data to build price trackers, dietary filters, and product recommendation tools.
curl -X GET 'https://api.parse.bot/scraper/44d2a146-f43b-415b-8494-308caaef06cf/search_products?query=milk&max_results=5' \ -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 ocado-com-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.
from parse_apis.ocado_grocery_api import Ocado, ProductSummary, Product, ProductRelations
ocado = Ocado()
# Search for products and iterate results
for item in ocado.productsummaries.search(query="chicken breast", max_results=5):
print(item.name, item.price.amount, item.price.currency, item.available)
# Navigate from summary to full detail
detail = item.details()
print(detail.name, detail.brand, detail.allergens, detail.storage)
if detail.nutrition:
for nutrient in detail.nutrition:
print(nutrient.name, nutrient.value)
if detail.rating:
print(detail.rating.overall, detail.rating.count)
# Get related products for this item
relations = ocado.product(retailer_product_id=item.retailer_product_id).related()
print(relations.total_related, relations.total_similar)
# Get autocomplete suggestions
suggestions = ocado.suggestions.get(query="chick", limit=5)
print(suggestions.query, suggestions.total)
for s in suggestions.suggestions:
print(s)
# Check the current cart
cart = ocado.carts.get_active()
print(cart.cart_id, cart.status, cart.item_count)
print(cart.totals.items_retail_price.amount, cart.totals.savings.amount)
print(cart.checkout_info.can_checkout, cart.checkout_info.minimum_threshold.amount)
Full-text search over Ocado's grocery catalog. Returns decorated product listings with current prices, promotions, availability, and images. Results are grouped by type (featured, cluster). Pagination is not exposed — use max_results to control volume (up to 300).
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search term (e.g. 'milk', 'bread', 'chicken breast') |
| max_results | integer | Maximum number of results to return (1-300) |
{
"type": "object",
"fields": {
"query": "string - the search term used",
"products": "array of product summary objects with product_id, retailer_product_id, name, brand, type, pack_size, price, unit_price, available, image_url, promotions, group_type, quantity_in_basket",
"total_products": "integer - number of products returned"
},
"sample": {
"data": {
"query": "milk",
"products": [
{
"name": "Cravendale Filtered Fresh Whole Milk Fresher for Longer",
"type": "REGULAR",
"brand": "Cravendale",
"price": {
"amount": "2.65",
"currency": "GBP"
},
"available": true,
"image_url": "https://www.ocado.com/images-v3/eafa5127-d256-497b-9609-4869092accd6/3ce12050-c083-4d31-b754-0f99c90e2d6b/300x300.jpg",
"pack_size": "2L",
"group_type": "featured",
"product_id": "8161bfc9-792f-45a1-a50a-6dec88888d6f",
"promotions": [
{
"id": "f3df6824-52e4-4919-b8cd-490db425d230",
"type": "OFFER",
"description": "Buy any 2 for £4"
}
],
"unit_price": {
"unit": "fop.price.per.litre",
"amount": "1.33"
},
"quantity_in_basket": 0,
"retailer_product_id": "24577011"
}
],
"total_products": 5
},
"status": "success"
}
}About the Ocado API
Product Search and Discovery
search_products accepts a query string and an optional max_results parameter (1–300) and returns an array of product objects. Each object includes product_id, retailer_product_id, name, brand, pack_size, price, unit_price, available, and an image_url. The unit_price field makes per-unit cost comparisons straightforward without additional calculation. The available boolean lets you filter out out-of-stock items before displaying results.
Product Detail and Nutrition
get_product_details takes a numeric product_id (from search results) and returns the full product record: a description, structured nutrition as an array of {name, value} pairs, an allergens string, storage instructions, an images array with alt text, and a rating object containing an overall score and review count. Fields like allergens and nutrition may return null when the source has no data for a given item, so null-checking is necessary.
Autocomplete and Related Products
get_search_suggestions returns autocomplete strings for a given prefix, or popular/trending terms when query is omitted. This is useful for building typeahead search UIs without managing a local term index. get_related_products returns separate arrays of related_product_ids and similar_product_ids (as UUID strings), plus counts (total_related, total_similar). These IDs can then be passed to get_product_details to retrieve full product records for each suggestion.
Cart State
get_cart requires no inputs and returns the current anonymous cart, including an items array, a totals object with items_retail_price, price_after_promos, and savings, plus a checkout_info block that exposes can_checkout, above_threshold, and minimum_threshold. This is useful for monitoring basket state or verifying minimum order thresholds during checkout flow testing.
The Ocado API is a managed, monitored endpoint for ocado.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when ocado.com 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 ocado.com 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 that monitors
priceandunit_pricechanges for specific products over time. - Create a dietary filter tool that queries
nutritionandallergensfields to flag products matching user restrictions. - Power a typeahead search bar using
get_search_suggestionswith a short query prefix. - Generate a product recommendation widget by fetching
related_product_idsfromget_related_productsand resolving each withget_product_details. - Audit promotional savings by comparing
items_retail_priceandprice_after_promosfromget_carttotals. - Aggregate Ocado brand data using the
brandfield across search results to analyze product range by manufacturer. - Check delivery threshold eligibility by reading
minimum_thresholdandabove_thresholdfromcheckout_infoin the cart response.
| 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 Ocado have an official public developer API?+
What does get_product_details return beyond basic price and name?+
nutrition array of name/value pairs, an allergens string, storage instructions, a description, an images array with descriptions, and a rating object with an overall score and review count. Any of these fields may be null if the source has no data for that product.Does the API cover multiple Ocado regions or countries?+
Can I add items to the cart or place orders through this API?+
get_cart, which returns current contents and totals for an anonymous cart. Write operations such as adding items, updating quantities, or initiating checkout are not covered. You can fork this API on Parse and revise it to add the missing endpoints.Does search_products support filtering by category, brand, or dietary attribute?+
search_products endpoint accepts a query string and an optional max_results count. There are no built-in filter parameters for category, brand, price range, or dietary flags. You can fork this API on Parse and revise it to add filter-based browsing endpoints.