Search Auchan products
Automatically search Auchan products on auchan.fr. Search the products of the Auchan France store (auchan.fr) by keyword, one results page at a time, in the order the site gives (sponsored products included and marked). For each product: its id and reference (to pass to Get an Auchan product or Add a product to the Auchan cart), name, brand, link, image, packaging, price in euros, price per kilo or per litre, review count, availability, seller (the store, or the marketplace seller), offer id, categories and promotion flags, plus the total number of results. Auchan shows grocery prices only for a chosen store: pass a postcode and the script chooses the nearest drive or Click & Collect store the site lists for it, as a guest. Without a postcode, and when this browser has chosen no store before, grocery prices are null and the site states why. A search with no exact match gives a null total and either an empty list or the loose suggestions the site lists; a page past the end returns an empty list.
Inputs
query requiredWords to search for, as typed in the site's search box (for example "lait").
page optionalResults page, from 1.
Default: 1postcode optionalFrench postcode (5 digits). When given, the script chooses the nearest drive or Click & Collect store Auchan lists for it, and the prices are that store's.
Output
url requiredpage requiredquery requiredstore requiredThe store this run chose from the postcode, or null when no postcode was given.
total requiredNumber of results the site states for the search.
hasMore requiredTrue when a next page has products.
products requiredFAQ
Remove a product from the Auchan cart
Remove a product from the Auchan France (auchan.fr) cart of this browser by its product id, whatever its quantity, and return what is left in the cart: each line with its line id, product id, offer id, name, seller, quantity, unit price and line price in euros, plus the item count and the cart total. Give the offer id or the line id from List Auchan cart items to remove one seller's line only when the product is in the cart from several sellers. Works as a guest, with no account. A product that is not in the cart gives removed false, and nothing is changed.
Add a product to the Auchan cart
Add a product of the Auchan France store (auchan.fr) to the cart of this browser, from its product id, reference or link, with a quantity from 1 to 99, and return the cart afterwards: each line with its line id, product id, offer id, name, seller, quantity, unit price and line price in euros, plus the item count and the cart total. Works as a guest, with no account; lines already in the cart stay and are listed too. Grocery products need a store: pass a postcode and the script chooses the nearest drive or Click & Collect store Auchan lists for it, or keep the store this browser chose before. For a product that marketplace sellers sell, pass the offer id from Get Auchan product offers to buy from that seller; without it, the offer the site shows first is added. Nothing is paid or ordered, and no delivery slot is booked. An unknown product, a link that is not an Auchan product page, a quantity out of range, an offer the product does not have, and a product the site does not sell now fail with a message that says so.
List Auchan cart items
List the items in the Auchan France (auchan.fr) cart of this browser, as the site holds it: for each line its line id, product id, offer id, name with the brand, seller (the drive or Click & Collect store, or the marketplace seller), quantity, unit price and line price in euros, plus the number of items and the cart total. The cart is the guest cart of the browser, so no sign-in is needed; its prices are those of the store this browser chose. An empty cart returns an empty list and a zero count.
