DEV Community

Cover image for I built a free tool to compare Danish supermarket offers in English
S.a.m Noyon
S.a.m Noyon

Posted on Edited on

I built a free tool to compare Danish supermarket offers in English

Danish supermarkets put their offers in leaflets called tilbudsaviser. There are a lot of them, they're in Danish, and every chain has its own. If you don't read Danish well, finding out who has the cheapest eggs this week takes longer than it should.

I live in Aarhus, and most of the people I know here are internationals. So I built a small tool that puts the offers from eight supermarkets in one place and lets you search in English:

👉 Supermarket Offers Denmark

It covers Rema 1000, Netto, Føtex, Lidl, Bilka, 365 Discount, Spar and Meny. It's free and there's no sign-up. This post is about how it works and what I ran into while building it.

What it does

There are two tabs.

Compare a product. You type "egg" or "coffee" and get the best deal at the top, then every matching offer from each shop below it. Each card shows the shop name, so you can see at a glance where to go.

Offers by shop. Pick one shop and see everything it has on offer, sorted by lowest price or biggest discount.

That's it. I kept it small on purpose.

The stack

Nothing fancy:

WordPress on shared hosting. The site already ran on WordPress, so the tool is a plugin that drops onto a page with a shortcode.
The ShelfAtlas API for the offer data.
My own database as a cache, so visitors never hit the API directly.

The last point is the important one.

Searching in English for Danish products

The data comes back in Danish. Eggs are æg, milk is mælk, minced beef is hakket oksekød. If someone types "egg" and I just search the product names, they get nothing.

My fix is a word list that maps common English grocery words to their Danish versions. When you search "egg", the tool also searches "æg". It's not a full translation system and it doesn't need to be. People mostly search for the same couple of hundred basics: milk, bread, butter, chicken, rice, coffee.

The word list is the part I expect to keep growing. Every time someone searches for something and gets nothing back, that's a word to add.

Comparing different pack sizes

One shop has 10 eggs for 25 kr. Another has 15 for 32 kr. Which is cheaper?

Showing the pack price alone is misleading, so the tool works out a unit price for each offer: kroner per kilo, per litre, or per piece (stk in Danish). When pack sizes differ, it compares on unit price. A big pack on offer isn't always the better deal, and this makes that visible.

The boring SEO stuff that actually matters

This one surprised me. The tool worked, but when I searched for it on Google, the result said "Supermarket Offers Denmark This Week" with a description about "weekly offers".

That was my own old wording. The supermarkets' offers are weekly, but my data updates every day, and the snippet made the tool sound staler than it is. I had to fix it in three places:

I had also changed the URL at one point, so I added a redirect from the old one. Without it, Google would have kept sending people to a dead page.

Small lesson: if you build a tool, the words around it matter almost as much as the code. Google shows your title and description before anyone sees what you built.

What I'd do differently
Start with the cache. My first version called the API more directly. I should have designed around the limit from day one.
Pick the URL once. Changing it later meant redirects and waiting for Google to catch up.
Write the page copy carefully at the start. "Weekly" vs "daily" was a one-word mistake that showed up in search results.
Try it

nyneon.net/supermarket-offers-denmark

It's still new. If you live in Denmark and try it, I'd like to know what's missing. A product that doesn't show up when you search for it in English is the most useful thing you can tell me. Comments here are fine, or email support@nyneon.net.

Top comments (0)