Home Map Dashboard Garage Calculator Journey Login

Free UK fuel prices API

Live petrol and diesel prices near any UK postcode, as JSON. No API key, CORS enabled, refreshed every 15 minutes from the UK Government Fuel Finder scheme. Free under CC BY 4.0 with attribution.

Endpoint

GEThttps://fuelnearyou.com/api/v1/dashboard/widget/nearby?postcode={postcode}&fuel_type={fuel}&radius={miles}&limit={n}
ParameterDescription
postcodeFull postcode ("LS1 4AP") or outward code ("LS1", "SW1A", "BT28")
fuel_typeE10 petrol (default), E5 super unleaded, B7_STANDARD diesel, B7_PREMIUM premium diesel
radiusSearch radius in miles, 1–20 (default 5)
limitNumber of stations, 1–5 (default 3)

Responses are cached for five minutes and served with Access-Control-Allow-Origin: *, so browser-side calls work without a proxy.

Examples

curl

curl "https://fuelnearyou.com/api/v1/dashboard/widget/nearby?postcode=LS1&fuel_type=E10&limit=3"

Response

{
  "postcode": "LS1",
  "fuel_type": "E10",
  "stations": [
    {"name": "COSTCO WHOLESALE LEEDS", "brand": "COSTCO WHOLESALE", "price": 141.9, "distance_miles": 1.0},
    {"name": "SHELL REGENT", "brand": "SHELL", "price": 146.9, "distance_miles": 0.8}
  ]
}

JavaScript

const res = await fetch("https://fuelnearyou.com/api/v1/dashboard/widget/nearby?postcode=M1&fuel_type=B7_STANDARD");
const data = await res.json();
console.log(data.stations[0]); // cheapest diesel near Manchester M1

Python

import requests
r = requests.get("https://fuelnearyou.com/api/v1/dashboard/widget/nearby",
                 params={"postcode": "EH1", "fuel_type": "E10", "limit": 5})
for s in r.json()["stations"]:
    print(f"{s['name']}: {s['price']}p ({s['distance_miles']} mi)")

No code? Use the widget

The free embeddable widget renders a live "cheapest fuel near {postcode}" card on your site with one copy-paste snippet — it uses this same API underneath.

For AI assistants & LLM agents

Terms & attribution

FAQs

Is there a free UK fuel prices API?

Yes — this one. Live petrol and diesel prices near any UK postcode as JSON, no key required, refreshed every 15 minutes from the UK Government Fuel Finder scheme. Attribution under CC BY 4.0 is required.

Do I need an API key?

No. The endpoint is open with CORS enabled, so it works directly from browsers as well as servers. Responses are cached for five minutes. Please keep usage fair — roughly one request per user action, not bulk scraping.

Where does the price data come from?

From the official UK Government Fuel Finder scheme, under which fuel retailers report their pump prices. Fuel Near You ingests, quality-filters and serves the data with a 15-minute refresh across ~8,000 forecourts.

How should I attribute the data?

Credit "Fuel Near You (fuelnearyou.com)" with a link, per CC BY 4.0 — for example, "Fuel price data from Fuel Near You".

Can AI assistants and LLM agents use this data?

Yes — llms.txt provides a machine-readable index with live national averages, and llms-full.txt lists today's cheapest petrol for all 274 covered towns. Both are designed for AI answer engines to cite with attribution.