Data API

Fuel Prices API Docs

Real-time UK fuel prices by postcode, coordinates, or station ID.

Base URL

https://api.it-stacks.com/fuel

All endpoints are relative to this base URL. HTTPS only.

Authentication

All requests require an API key passed as a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Get your API key from the dashboard. Keys are scoped per service — a QR Code key will not work against the Fuel API.

Endpoints

GEThttps://api.it-stacks.com/fuel/prices

Get current fuel prices for stations near a UK postcode.

Parameters

NameTypeRequiredDescription
postcodestringYesFull or partial UK postcode (e.g. BB7 or BB7 1AB)
radiusintegerNoSearch radius in miles (default: 5, max: 25)
fuel_typestringNoFilter by fuel type: petrol, diesel, or ev

Example request

GET https://api.it-stacks.com/fuel/prices?postcode=BB7&radius=5

Example response

{
  "postcode": "BB7",
  "radius_miles": 5,
  "stations": [
    {
      "id": "stn_001",
      "name": "Tesco Clitheroe",
      "address": "Whalley Road, Clitheroe, BB7 1AB",
      "distance_miles": 0.4,
      "prices": {
        "petrol": 142.9,
        "diesel": 150.2
      },
      "updated_at": "2026-03-24T10:00:00Z"
    }
  ]
}
GEThttps://api.it-stacks.com/fuel/station/{id}

Get full price details for a specific station by its ID.

Parameters

NameTypeRequiredDescription
idstringYesStation ID returned from /prices or /nearby

Example request

GET https://api.it-stacks.com/fuel/station/stn_001

Example response

{
  "id": "stn_001",
  "name": "Tesco Clitheroe",
  "address": "Whalley Road, Clitheroe, BB7 1AB",
  "coordinates": { "lat": 53.869, "lng": -2.392 },
  "prices": {
    "petrol": 142.9,
    "diesel": 150.2,
    "ev_per_kwh": null
  },
  "updated_at": "2026-03-24T10:00:00Z"
}
GEThttps://api.it-stacks.com/fuel/nearby

Get stations near a set of GPS coordinates.

Parameters

NameTypeRequiredDescription
latfloatYesLatitude (decimal degrees)
lngfloatYesLongitude (decimal degrees)
radiusintegerNoSearch radius in miles (default: 5, max: 25)
fuel_typestringNoFilter by fuel type: petrol, diesel, or ev

Example request

GET https://api.it-stacks.com/fuel/nearby?lat=53.869&lng=-2.392&radius=3

Example response

{
  "stations": [
    {
      "id": "stn_001",
      "name": "Tesco Clitheroe",
      "distance_miles": 0.4,
      "prices": {
        "petrol": 142.9,
        "diesel": 150.2
      }
    }
  ]
}

Rate limits

Requests exceeding your plan limit return HTTP 429. Limits reset monthly.

PlanLimit
Free1,000 requests / month
Pro50,000 requests / month
EnterpriseUnlimited

Error codes

CodeMeaning
400Missing or invalid parameters
401Missing or invalid API key
404Station not found
429Rate limit exceeded
500Internal server error

Links