API v1.0 -- Live

Developer API

Access live UK fuel price data via our RESTful API. Real-time prices for 8,000+ stations, postcode search, brand comparison, and historical trend data.

Quick Start

1

Create Account

Sign up for a free PetrolFinder account. No credit card required.

2

Apply for API Key

Submit your name, project name, and use case below. We review and approve keys manually.

3

Make Requests

Use your key to call any endpoint. Data updates every 5 minutes.

bash
curl -H "Authorization: Bearer pfk_YOUR_KEY" \
  "https://www.petrolfinder.uk/api/v1/search?q=SW1A+1AA&fuel_type=E10"

Authentication

All API requests require authentication using your API key. You can provide it in two ways:

Option 1: Authorization Header (recommended)

Authorization: Bearer pfk_your_api_key_here

Option 2: Query Parameter

https://www.petrolfinder.uk/api/v1/stations?api_key=pfk_your_api_key_here

The Bearer token method is recommended as it keeps your key out of server logs and browser history.

Endpoints Reference

All prices are in pence per litre. All timestamps are ISO 8601 UTC. Distances are in kilometres.

GET/api/v1/stationsList Stations

Returns all fuel stations with current prices. Each station includes its name, brand, location, amenities, and an array of live fuel prices. Ideal for building station directories or map-based UIs.

Parameters

NameTypeRequiredDescription
fuel_typestringOptionalFilter to stations selling this fuel: E10, B7, B7_STANDARD, E5, B7_PREMIUM
limitintegerOptionalNumber of stations to return (default 100, max 500)

Example Request

bash
curl -H "Authorization: Bearer pfk_YOUR_KEY" \
  "https://www.petrolfinder.uk/api/v1/stations?fuel_type=E10&limit=3"

Example Response

json
{
  "data": [
    {
      "id": "0c4f27d850bb901bdca1e4bc473b331786ce447b50b59bb46a3bae7f543ffd0d",
      "name": "MFG MORRISONS BRAMPTON",
      "brand": "MORRISONS",
      "address": "CORTON WOOD, BRAMPTON, BARNSLEY",
      "postcode": "S73 0SX",
      "city": "BRAMPTON",
      "county": "",
      "latitude": 53.5271,
      "longitude": -1.3989,
      "is_motorway": false,
      "is_supermarket": true,
      "amenities": ["air_and_water", "car_wash", "toilet"],
      "prices": [
        { "fuel_type": "E10", "price": 155.9, "updated_at": "2026-04-05T20:39:59.000Z" },
        { "fuel_type": "E5", "price": 169.9, "updated_at": "2026-04-04T20:41:29.000Z" },
        { "fuel_type": "B7_STANDARD", "price": 188.9, "updated_at": "2026-04-05T20:39:59.000Z" }
      ],
      "updated_at": "2026-04-05T20:39:59.000Z"
    },
    {
      "id": "a19df48d5a13557455982d2a6743a85fd5d4233c27a1cdefba56e2f6f3a21aef",
      "name": "BARNSLEY EXTRA - PETROL FILLING STATION",
      "brand": "TESCO",
      "address": "WOMBWELL LANE, BARNSLEY",
      "postcode": "S70 3NS",
      "city": "BARNSLEY",
      "county": "",
      "latitude": 53.54079,
      "longitude": -1.43602,
      "is_motorway": false,
      "is_supermarket": true,
      "amenities": ["toilet", "payphone"],
      "prices": [
        { "fuel_type": "E10", "price": 154.9, "updated_at": "2026-04-06T06:43:38.036Z" },
        { "fuel_type": "B7_STANDARD", "price": 186.9, "updated_at": "2026-04-06T06:43:38.036Z" }
      ],
      "updated_at": "2026-04-06T06:43:38.036Z"
    }
  ],
  "total": 8412,
  "api_version": "1.0"
}
GET/api/v1/stations/:idGet Station

Returns full details for a single station including all fuel prices, opening times, amenities, and location data. Use this to build station detail pages or to get the latest prices for a specific forecourt.

Parameters

NameTypeRequiredDescription
idstringRequiredStation ID (SHA-256 hash, from the List Stations response)

Example Request

bash
curl -H "Authorization: Bearer pfk_YOUR_KEY" \
  "https://www.petrolfinder.uk/api/v1/stations/a19df48d5a13557455982d2a6743a85fd5d4233c27a1cdefba56e2f6f3a21aef"

Example Response

json
{
  "data": {
    "id": "a19df48d5a13557455982d2a6743a85fd5d4233c27a1cdefba56e2f6f3a21aef",
    "name": "BARNSLEY EXTRA - PETROL FILLING STATION",
    "brand": "TESCO",
    "address": "WOMBWELL LANE, BARNSLEY",
    "postcode": "S70 3NS",
    "city": "BARNSLEY",
    "latitude": 53.54079,
    "longitude": -1.43602,
    "is_motorway": false,
    "is_supermarket": true,
    "amenities": ["toilet", "payphone"],
    "opening_times": {
      "usual_days": {
        "monday": { "open": "06:00", "close": "23:00" },
        "tuesday": { "open": "06:00", "close": "23:00" }
      }
    },
    "prices": [
      { "fuel_type": "E10", "price": 154.9, "updated_at": "2026-04-06T06:43:38.036Z" },
      { "fuel_type": "B7_STANDARD", "price": 186.9, "updated_at": "2026-04-06T06:43:38.036Z" }
    ],
    "updated_at": "2026-04-06T06:43:38.036Z"
  },
  "api_version": "1.0"
}
GET/api/v1/pricesCheapest Prices

Returns the cheapest stations nationally for a given fuel type, sorted by price ascending. Perfect for "cheapest fuel in the UK" leaderboards, price alerts, or market intelligence dashboards.

Parameters

NameTypeRequiredDescription
fuel_typestringRequiredFuel type: E10, B7, B7_STANDARD, B7_PREMIUM, E5
limitintegerOptionalNumber of results (default 20, max 100)

Example Request

bash
curl -H "Authorization: Bearer pfk_YOUR_KEY" \
  "https://www.petrolfinder.uk/api/v1/prices?fuel_type=E10&limit=5"

Example Response

json
{
  "data": [
    {
      "station_id": "f2a3b4c5d6e7...",
      "station_name": "ASDA AUTOMAT WOLVERHAMPTON",
      "brand": "ASDA",
      "postcode": "WV10 6QJ",
      "city": "WOLVERHAMPTON",
      "price": 127.7,
      "fuel_type": "E10",
      "updated_at": "2026-04-08T09:15:00.000Z"
    },
    {
      "station_id": "a1b2c3d4e5f6...",
      "station_name": "COSTCO BIRMINGHAM",
      "brand": "COSTCO",
      "postcode": "B69 4LT",
      "city": "OLDBURY",
      "price": 129.7,
      "fuel_type": "E10",
      "updated_at": "2026-04-08T08:30:00.000Z"
    },
    {
      "station_id": "d4e5f6a7b8c9...",
      "station_name": "ASDA AUTOMAT SWINDON",
      "brand": "ASDA",
      "postcode": "SN2 2PN",
      "city": "SWINDON",
      "price": 130.7,
      "fuel_type": "E10",
      "updated_at": "2026-04-08T07:45:00.000Z"
    }
  ],
  "fuel_type": "E10",
  "api_version": "1.0"
}
GET/api/v1/brandsBrand Averages

Returns average fuel prices aggregated by brand across all their UK stations. Includes E10 (unleaded) and diesel averages, total station count, and brand logo URL. Great for brand comparison tools, editorial data, or infographics.

Example Request

bash
curl -H "Authorization: Bearer pfk_YOUR_KEY" \
  "https://www.petrolfinder.uk/api/v1/brands"

Example Response

json
{
  "data": [
    {
      "brand": "Asda",
      "avg_e10": 132.5,
      "avg_diesel": 138.2,
      "station_count": 320,
      "logo_url": "https://cdn.brandfetch.io/asda.com?c=..."
    },
    {
      "brand": "Tesco",
      "avg_e10": 133.1,
      "avg_diesel": 139.4,
      "station_count": 512,
      "logo_url": "https://cdn.brandfetch.io/tesco.com?c=..."
    },
    {
      "brand": "Shell",
      "avg_e10": 142.8,
      "avg_diesel": 148.1,
      "station_count": 891,
      "logo_url": "https://cdn.brandfetch.io/shell.com?c=..."
    },
    {
      "brand": "BP",
      "avg_e10": 143.2,
      "avg_diesel": 149.0,
      "station_count": 1203,
      "logo_url": "https://cdn.brandfetch.io/bp.com?c=..."
    }
  ],
  "total_brands": 35,
  "api_version": "1.0"
}
GET/api/v1/statsNational Statistics

Returns a summary of current UK fuel market statistics including national averages, cheapest station per fuel type, weekly price change direction, total reporting stations, and the last data sync time. Updated every 5 minutes.

Example Request

bash
curl -H "Authorization: Bearer pfk_YOUR_KEY" \
  "https://www.petrolfinder.uk/api/v1/stats"

Example Response

json
{
  "data": {
    "total_stations": 8412,
    "last_sync": "2026-04-08T10:30:00.000Z",
    "fuel_stats": [
      {
        "fuel_type": "E10",
        "avg_price": 133.5,
        "min_price": 127.7,
        "max_price": 199.9,
        "station_count": 7820,
        "price_change": -0.3,
        "cheapest": {
          "station_name": "ASDA AUTOMAT WOLVERHAMPTON",
          "postcode": "WV10 6QJ",
          "price": 127.7
        }
      },
      {
        "fuel_type": "B7_STANDARD",
        "avg_price": 141.2,
        "min_price": 132.9,
        "max_price": 210.9,
        "station_count": 7614,
        "price_change": 0.8,
        "cheapest": {
          "station_name": "ASDA AUTOMAT WOLVERHAMPTON",
          "postcode": "WV10 6QJ",
          "price": 132.9
        }
      },
      {
        "fuel_type": "E5",
        "avg_price": 148.7,
        "min_price": 139.9,
        "max_price": 219.9,
        "station_count": 5230,
        "price_change": -0.1,
        "cheapest": {
          "station_name": "COSTCO BIRMINGHAM",
          "postcode": "B69 4LT",
          "price": 139.9
        }
      }
    ]
  },
  "api_version": "1.0"
}

Rate Limits

TierRequests / DayMax KeysPrice
Free1,0003Free
Pro10,0005Coming soon
EnterpriseUnlimitedUnlimitedContact us

Rate limit headers are included in every response: X-Rate-Limit. Exceeding your limit will not block requests in v1 but may be enforced in future versions.

Your API Keys

Loading...

API Terms of Use

  • 1.The API is provided as-is for informational purposes. Fuel prices shown are sourced from the UK Government CMA feed and may not reflect real-time pump prices.
  • 2.Do not use the API in a way that competes directly with PetrolFinder.uk. Building complementary apps, research tools, and integrations is encouraged.
  • 3.Attribution is appreciated but not required. A link back to petrolfinder.uk is always welcome.
  • 4.Do not share your API key publicly or embed it in client-side code. Keep it server-side.
  • 5.We reserve the right to revoke keys that abuse the service, make excessive requests, or violate these terms.
  • 6.Rate limits may be adjusted at any time. We will notify users of significant changes via email.