In Germany, every gas station must report gas prices online, to the Markttransparenzstelle für Kraftstoffe. Businesses and users can then fetch this data and provide services. One of these companies is Tankerkönig, and there’s also a Binding for openHAB.
If you are interested in gas prices for certain gas stations, you need to sign up for a (free) API key, and figure out the IDs of the gas stations. For that go to this website, Position the blue marker on the location you are interested in, and then click on all the gas stations you want to include. Finally click on
Tankstellen übernehmen - this will open a JSON with the data, from there extract the
id (and possibly the other data as well).