Menu

Compare Tesco, Sainsbury's, Asda and Morrisons prices in 20 lines of JavaScript (plus Coles, Woolworths and ALDI)
📰

Compare Tesco, Sainsbury's, Asda and Morrisons prices in 20 lines of JavaScript (plus Coles, Woolworths and ALDI)

DEV Community: api·ByteHarvester·1 day ago
#nYv4tjag
#devtoapi#devto#dev#price#prices
Reading 0:00
15s threshold

Disclosure: I built the APIs in this post. Written with AI assistance.

Grocery prices are the prices people check most often. They are also among the hardest to get as data. Every chain has its own website, its own search, its own way of showing a multi-buy offer, and its own habit of changing all of it without warning. If you have ever started a price-comparison side project, you know where the time goes: not into your app, but into keeping a scraper per supermarket alive.

So I put 8 supermarkets in 3 countries behind one API, with one JSON shape :

Country Stores Extras

UK (GBP) Tesco, Sainsbury's, Asda, Morrisons Sainsbury's: barcode, availability, Nectar prices with start and end dates

Australia (AUD) Coles, Woolworths, ALDI barcode, ingredients and nutrition where the store publishes them

New Zealand (NZD) Woolworths NZ (formerly Countdown) barcode, club price, stock level

Every product comes back with name, price, was-price, offer text, unit price, pack size, category, image and link.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.