Free for blogs, dealers and local sites
Free UK fuel price widget.
Show your readers the cheapest fuel near a postcode, a regional or UK average, and what a mile of driving costs, straight from the government's Fuel Finder data. Every widget shows when the data was last updated. No cookies, no analytics.
Build your widget
Script embed (recommended)
Iframe embed (no JavaScript)
Options
Use data- attributes on the script embed, or the same names as query parameters on the iframe address.
| Option | Values |
|---|---|
data-postcode / postcode | A UK postcode or postcode district, such as LS1 or LS1 4AP. Only the district is used. Leave out for a region or the UK. |
data-region / region | uk (default), london, south-east, south-west, east-of-england, east-midlands, west-midlands, north-west, north-east, yorkshire-and-the-humber, scotland, wales, northern-ireland. Ignored when a postcode is set. |
data-fuel / fuel | e10 (unleaded, default), e5 (super unleaded) or diesel. |
data-show / show | both (default), stations (cheapest list only) or ppm (average and cost per mile only). |
data-mpg / mpg | Miles per gallon for the cost-per-mile figure, 15 to 99. Default 50. |
data-limit / limit | Number of stations listed, 1 to 5. Default 3. |
data-theme / theme | light (default), dark or auto (follows the reader's system setting). |
How it works
- Data: current prices from the UK Government Fuel Finder scheme, refreshed by Motorbook every 5 minutes. Prices that have not changed for over 14 days, closed stations and prices outside 50p to 300p a litre are left out, the same rules as the fuel cost per mile index.
- Nearby: the cheapest prices within 5 miles of the postcode district centre (from the ONS Postcode Directory via postcodes.io), widening to 10 miles if fewer than three stations are found.
- Cost per mile: pence per litre x 4.546 / mpg, using the mpg you set (default 50).
- Credit: keep the visible "Fuel prices by Motorbook" link. The script adds it back if it is missing.
- Privacy and speed: no cookies, no analytics and no third-party code. The script is under 5 KB, renders inside a shadow root so it does not clash with your styles, and responses are cached for 10 minutes.
- JSON: developers can read the same data from
https://motorbook.uk/embed/fuel/local.jsonwith the options above as query parameters (CORS enabled, fair use). - Licence: contains Fuel Finder data from GOV.UK under the Open Government Licence v3.0.
Questions
Is the Motorbook fuel widget free?
Yes. The widget is free for blogs, dealers, clubs and local sites. The only condition is that the visible "Fuel prices by Motorbook" credit link stays in place.
Where do the prices come from?
From the UK Government Fuel Finder scheme, which forecourts must report their prices to. Motorbook refreshes its copy every 5 minutes, and the widget shows the time the data was last updated.
Which postcode does it use?
Only the postcode district (for example LS1 from LS1 4AP). The widget lists the cheapest current prices within 5 miles of the district centre, widening to 10 miles if fewer than three stations are found.
Does the widget set cookies or track visitors?
No. It sets no cookies, loads no analytics or third-party scripts, and sends no data about your visitors beyond the normal request for the widget itself.
How is cost per mile worked out?
Pence per mile = pence per litre x 4.546 (litres in a UK gallon) / miles per gallon. The default is 50 mpg; set data-mpg or mpg= to your own figure.