Live data from Hacker News

UK government launches fuel forecourt price API

gov.uk

131–140 of 153 posts

Re: UK government launches fuel forecourt price API

#131
I spent the last few hours hacking together PetrolMate using this dataset: https://petrolmate.co.uk

A couple of interesting observations while building it:

Yesterday the dataset had ~600 stations. Today it’s reporting 6,666 stations from the UK government feed, which is… a slightly ominous number, but according to the data and me asking an LLM, that’s close to full UK coverage already.

I deliberately went for a “pure speed” tech stack. Astro, no UI framework, just vanilla JS. Deployed on Cloudflare, with prices stored in D1.

I'm not using the API to load the data, I'm cleansing and then importing the CSV (which you can download for free) into the D1 database.

There’s also an /insights page with some aggregated stats that genuinely surprised me: https://petrolmate.co.uk/insights

Really nice to finally have an official, open dataset to build on. It already feels far more reliable than the old user-reported approaches, and it’ll be interesting to see how coverage and update frequency settles over the next few weeks.

Would love to hear feedback by the way. What is this missing to make it a genuinely useful tool?

Re: UK government launches fuel forecourt price API

#132
post #127
post #122

Earlier quoted context omitted.

> I think it's exactly that, the UK has never had this so people there either choose by brand or just convenience. We've had it for years (as noted in other comments there's a few different people like the RAC, AA and Petrolprices.com all maintaining their own lists - a quick check of my email has messages from the latter going back to 2011). The new part is that this is from the government and the data is freely acc…

But how accurate was the data on those older apps? Petrolprices.com (for example) seems to have been built on user-reported data rather than petrol-station reported data, and it's easy to find fairly recent criticisms of the whole thing being inaccurate. And an inaccurate comparison site is fairly useless IMHO. I lived in the UK until 2021 and I must admit I'd never heard of them. Whereas here in WA everyone uses fue…

Other than a time lag (and petrol prices don't generally change often enough to matter IME), I can't say I ever noticed any of them being that inaccurate.

myAutomate (the owners of Petrolprices.com) talk about having "over 60 years combined expertise in the fuel industry", so I suppose I'd be surprised if it's all crowdsourced data - they've probably made arrangements with at least the big players, in which case the forced publication is much of a muchness?

Re: UK government launches fuel forecourt price API

#133
post #86

Decisions about fuel purchases are often irrational, much like many food purchases or generic medicines. I know someone who avoids their local petrol station that is 10p/litre cheaper than most others nearby (within a mile or so) as they think the cheaper fuel must be lower quality. There are weird status things going on with purchases like this. Only the other day my father refused to buy some branded paracetamol be…

On the topic of fuel, it's funny when people only put in £10 worth of fuel a time.

You spend more in by fuel driving there more often. As well as wasting your own time.

Re: UK government launches fuel forecourt price API

#134

Earlier quoted context omitted.

> this causes price convergence aka competition

coopertition

I see where you're going, but this happen now where I live. All prices are with in 2p of each other in a 2 mile radius.

but travel around 5miles and it's typically 5-9p cheaper

no way can this make it worse for me - hopefully people will travel to punish the garages.

Re: UK government launches fuel forecourt price API

#135
post #13
post #2

Yesterday I had to drive to a nearby town, just 20 minutes away, and noticed that every single petrol station there was a good 5p per litre cheaper than my town. I might plug this into a map.

as much as I try to stay away from Google products: waze shows this on the usual driving map quite well

Strange that google maps still doesn't show fuel prices in the UK. Google maps show fuel prices the US so this feature was implemented and it should be easy to show prices in the UK using the same data source was Waze.

Re: UK government launches fuel forecourt price API

#136

I spent the last few hours hacking together PetrolMate using this dataset: https://petrolmate.co.uk A couple of interesting observations while building it: Yesterday the dataset had ~600 stations. Today it’s reporting 6,666 stations from the UK government feed, which is… a slightly ominous number, but according to the data and me asking an LLM, that’s close to full UK coverage already. I deliberately went for a “pure…

Thanks for putting this together! Couple QoL features I'd love to see:

1. filter slider, decreasing on price, to see places closest to me disappearing 2. on the left panel, when I click on a low priced area, it should highlight it on the map, so I know where it is. The 'go to pump' button, I guess is good. but I'd only want to commit to gmaps if I already know that it's a reasonable place for me to. be going.

Re: UK government launches fuel forecourt price API

#137
post #86

Decisions about fuel purchases are often irrational, much like many food purchases or generic medicines. I know someone who avoids their local petrol station that is 10p/litre cheaper than most others nearby (within a mile or so) as they think the cheaper fuel must be lower quality. There are weird status things going on with purchases like this. Only the other day my father refused to buy some branded paracetamol be…

On the topic of fuel, it's funny when people only put in £10 worth of fuel a time. You spend more in by fuel driving there more often. As well as wasting your own time.

Operating on such a tight budget is more common than you might think and they could have been hit with a surprise bill that's pushed them into debt.

Re: UK government launches fuel forecourt price API

#138
post #129

Earlier quoted context omitted.

These things are not true in the UK - all fuel is held to the same high standard, though premium variants are available too.

So no petrol is permitted to be higher quality (for the same octane rating)? ie you're asserting there is zero variance in quality? OP wrote lower quality, not low quality

By "lower quality" I did mean "low quality".

It's the reverse of "this one is more expensive therefore it must be better" without any evidence at all that it is the case.

Re: UK government launches fuel forecourt price API

#139
post #86

Decisions about fuel purchases are often irrational, much like many food purchases or generic medicines. I know someone who avoids their local petrol station that is 10p/litre cheaper than most others nearby (within a mile or so) as they think the cheaper fuel must be lower quality. There are weird status things going on with purchases like this. Only the other day my father refused to buy some branded paracetamol be…

Since paracetamol interacts with alcohol,there may be more rationality than first thought!

Not really, he was advised to take it daily by his doctor and his doctor knows his drinking habits.

UK advice is to avoid drinking more than 14 units (think a shot, a small beer or a small glass of wine = 1 unit) whilst taking paracetamol.

https://www.nhs.uk/medicines/paracetamol-for-adults/common-q...

Re: UK government launches fuel forecourt price API

#140
post #86

Decisions about fuel purchases are often irrational, much like many food purchases or generic medicines. I know someone who avoids their local petrol station that is 10p/litre cheaper than most others nearby (within a mile or so) as they think the cheaper fuel must be lower quality. There are weird status things going on with purchases like this. Only the other day my father refused to buy some branded paracetamol be…

On the topic of fuel, it's funny when people only put in £10 worth of fuel a time. You spend more in by fuel driving there more often. As well as wasting your own time.

I put in £3 worth of fuel the other day but that's because it was a rental car that I had to return with the same fuel level as at pickup and I'd only done ~30 miles with lots of stop/start. (I would have used a Zipcar/Zipvan but they've all gone now.) I would have tried to put in less but UK fuel pumps usually mandate a minimum of 2 litres which is not far off £3 at current prices.
Post reply on HN