Live data from Hacker News

Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

github.com

81–90 of 94 posts

Re: Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

#81
post #79

Earlier quoted context omitted.

Stores are required by law to provide the price per unit/weight/volume alongside the price, so you can directly compare the price of a pint of beer to the 0.33 liter bottle without calculating anything.

Ah thanks, didn't think about that. I just checked and REWE only lets you sort by absolute price. But honestly, you can compare prices so much better on their website than in a physical supermarket already [0]. [0] https://www.rewe.de/shop/c/frisches-obst/?sorting=PRICE_DESC You have to enter a random zip code eg 20249

there is this "400g (1 kg = 3,48 €)" - would be pretty easy to sort results by that I'd guess, good idea!

Re: Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

#82
post #80

Earlier quoted context omitted.

Could you be specific? Saying it's not as "streamlined, quick, and versatile" is vague — I'm not really getting anything from that. For context, I've been writing Haskell for quite a long time and I'm maintaining a few packages like Yesod.

Sure, I find that with cabal and/or stack you often have to do things like manually add/link files for compilation and also both go mod and cargo support pulling libraries directly from Github say easily (using something like GO_PRIVATE), which I think is possible in cabal but you have to use project files which I never found intuitive. Also, just by virtue of having a smaller user base obviously the package ecosyste…

Thanks for expanding on that.

For me personally (and also for everyone at work), I'm doing all package management with Nix. I'm happy with the setup. There is a learning curve with Nix, but as you can imagine this has shortened now with AI.

Re: Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

#83
post #56

I hope REWE is seeing this and offers an official MCP server. In the end we pay real money there. :D I wrote a skill some time ago to support me with "agentic groceries" on my own - it's the future of shopping I would say. My workflow: - I paste in urls or text for receipts I will cook this week - agent extracts the ingredients, calculates cups to ml and such, replaces meat with vegi ingredients, replaces some other…

[deleted]

Re: Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

#84

I remember a friend and I in college were looking into ways to do this in the US but major grocery chains here are pretty sensitive about their product data being accessible by open APIs and web scraping... It would have been a cool project!

Kroger does have an open API with some limitations that get you pretty far. Someone built a python wrapper and MCP for it awhile back. [1]

The workflow in our house is basically to use Siri to add items to an iOS Reminders list as the week goes on. Then, the day of or day before we plan to shop we fill-in with commonly purchased items or one-off things and go shop.

It's been on my TODO list to have an agent "skill" take the Reminders list, ask for additional items, and populate the cart to schedule a pickup. We tend to prefer going in the store though to browse the produce because our local Kroger isn't great about that. Pickup is generally reserved for the weeks where we're feeling a bit short on time.

[1] https://github.com/CupOfOwls/kroger-api

Re: Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

#87
post #26

Earlier quoted context omitted.

>I do have a suggestion for your app though: Have it compare your basket of goods across different markets in your region to show you the cheapest option. I'd settle for just being able to sort items by unit price... I'm sure this is a [regulation-]solved problem in Germany though

> I'd settle for just being able to sort items by unit price What do you mean? The official REWE app and website provide just that. > I'm sure this is a [regulation-]solved problem in Germany though Not sure what you mean by that.

Sorry, yes, I'm not German and haven't used it. It was an idle complaint about how trying to use grocery store (or other similar) sites is difficult because they prevent you from being able to sort properly, for example by unit price. Sometimes they change the displayed unit per product so you also have to convert them to compare manually (less of a problem for metric, but like, drink brand 1 €2/100ml, drink brand 2 €13/1L etc).

As I was writing it, I realized that this kind of tactic just feels like it would be banned in Germany

Re: Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

#89
post #47

Earlier quoted context omitted.

I mean, fixing small issues is not a big deal – during my ordering sessions, if something comes up, I actually just let Claude create an issue for it, and then when I have time, I create a fix.

Well you don't control the API so it will still break.

It took hours not weeks. You were absolutely right.

Re: Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

#90
post #57
post #46

As a SWE at Rewe (at a completely different department), I can say that I find this pretty cool. I wonder if this is going to be a wakeup to management to relax the API restrictions.

Please pitch internally for an official Rewe MCP server. This is the future of doing groceries. Let us login with our credentials and let us do the search/filling the cart with agents. Totally fine to do the payment only on the web, so everyone can be sure they only order what was wished, and not 300 avocados.

That's a good idea and actually was my first thought too. I sent a chat message so the product owner in charge is aware of the interest in something like it.

I think a big issue here is the lack of standard - there is no established way of where an MCP server should be hosted so that agents are easily able to find it. Right now, the best solution I could think of would be to serve it at something like rewe.de/shop/mcp and you'd manually have to register it with your agent.

Post reply on HN