Petrolmate for Home Assistant

Real-time Australian and New Zealand fuel prices in your smart home dashboard

15,149+
Stations Tracked
8
States + NZ
7
Fuel Types
Free
API Access

Why Petrolmate? Unlike scraped community sources, Petrolmate aggregates data from official Australian government APIs (NSW FuelCheck, QLD, SA, VIC, WA FuelWatch, NT, TAS) plus community sources. If your existing fuel price integration stopped working, Petrolmate is a reliable alternative backed by official data.

API Endpoint

Petrolmate provides a free, public JSON API designed for Home Assistant and smart home integrations. No API key required.

Endpoint

GET https://petrolmate.com.au/api/v1/stations/area

Parameters

ParameterTypeDefaultDescription
latfloatrequiredLatitude of your location
lngfloatrequiredLongitude of your location
radiusinteger5000Search radius in metres (max 25,000)
limitinteger30Max stations returned (max 50)

Example Request

curl "https://petrolmate.com.au/api/v1/stations/area?lat=-33.87&lng=151.21&radius=5000&limit=5"

Example Response

{
  "success": true, "count": 3, "api": "petrolmate", "version": "1.0", "coverage": "AU+NZ",
  "stations": [
    {
      "id": 1234, "name": "Shell Woolloomooloo", "brand": "Shell",
      "address": "61 Cowper Wharf Rd", "suburb": "Woolloomooloo",
      "state": "NSW", "lat": -33.8696, "lng": 151.2213, "distance_m": 1115,
      "fuels": [
        {"type": "ULP",    "name": "Unleaded 91",  "price": 259.9, "updated": "2026-03-30T12:00:02"},
        {"type": "E10",    "name": "E10",           "price": 257.9, "updated": "2026-03-30T12:00:02"},
        {"type": "PULP95", "name": "Premium 95",    "price": 277.4, "updated": "2026-03-30T12:00:02"},
        {"type": "DIESEL", "name": "Diesel",        "price": 289.9, "updated": "2026-03-30T12:00:02"}
      ]
    }
  ]
}

Rate Limits and Fair Use

60 requests per minute per IP. For Home Assistant, a scan_interval of 300 (5 min) or longer is recommended. The API is designed for periodic location-based lookups within 25km, not bulk data extraction. Max 50 stations per request.

Supported Fuel Types

CodeNameCoverage
ULPUnleaded 91All States + NZ
E10E10 EthanolNSW, QLD, VIC, SA, ACT
PULP95Premium 95All States + NZ
PULP98Premium 98All States
DIESELDieselAll States + NZ
PDIESELPremium DieselMost States
LPGLPG AutogasNSW, VIC, QLD, SA

REST Sensor Setup

Add this to your Home Assistant configuration.yaml. Replace the latitude and longitude with your home coordinates.

Basic: Cheapest ULP Nearby

rest:
  - resource: "https://petrolmate.com.au/api/v1/stations/area?lat=-33.87&lng=151.21&radius=5000&limit=10"
    scan_interval: 300
    sensor:
      - name: "Cheapest ULP Nearby"
        value_template: >
          {% set ns = namespace(cheapest=none) %}
          {% for station in value_json.stations %}
            {% for fuel in station.fuels if fuel.type == 'ULP' %}
              {% if ns.cheapest is none or fuel.price < ns.cheapest %}
                {% set ns.cheapest = fuel.price %}
              {% endif %}
            {% endfor %}
          {% endfor %}
          {{ ns.cheapest }}
        unit_of_measurement: "c/L"

Multi-Sensor: Nearest Station + Fuel Types

rest:
  - resource: "https://petrolmate.com.au/api/v1/stations/area?lat=-33.87&lng=151.21&radius=5000&limit=10"
    scan_interval: 300
    sensor:
      - name: "Nearest Station"
        value_template: "{{ value_json.stations[0].name }}"
      - name: "Nearest ULP Price"
        value_template: >
          {{ value_json.stations[0].fuels | selectattr('type','eq','ULP')
              | map(attribute='price') | first | default('N/A') }}
        unit_of_measurement: "c/L"
      - name: "Nearest Diesel Price"
        value_template: >
          {{ value_json.stations[0].fuels | selectattr('type','eq','DIESEL')
              | map(attribute='price') | first | default('N/A') }}
        unit_of_measurement: "c/L"
      - name: "Stations in Range"
        value_template: "{{ value_json.count }}"

Automation: Price Alert

automation:
  - alias: "Fuel Price Alert"
    trigger:
      - platform: numeric_state
        entity_id: sensor.cheapest_ulp_nearby
        below: 250
    action:
      - service: notify.mobile_app
        data:
          title: "Cheap Fuel Alert"
          message: "ULP dropped to {{ states('sensor.cheapest_ulp_nearby') }}c/L nearby!"

Data Sources

Petrolmate aggregates prices from official government APIs across every Australian state plus community data.

StateSourceType
New South WalesNSW FuelCheckOfficial
QueenslandQLD Fair FuelOfficial
South AustraliaSA Fuel PricingOfficial
VictoriaVIC Fair FuelOfficial
Western AustraliaWA FuelWatchOfficial
TasmaniaTAS FuelCheckOfficial
Northern TerritoryNT MyFuelOfficial
ACT + BroaderCommunity dataCommunity
New ZealandCommunity dataCommunity

Official government sources are prioritised. Fresh official data (under 48 hours) takes precedence over community data.

FAQ

How often are prices updated?

Prices sync from government APIs and community sources multiple times daily. Most stations update every 6 to 12 hours. The API caches responses for 2 minutes.

Is the API free?

Yes, free for personal and Home Assistant use. Rate limited to 60 req/min. Designed for periodic polling within 25km, not bulk extraction.

What scan interval should I use?

300 seconds (5 min) works well. Prices change a few times per day, so polling more often adds no benefit.

PetrolSpy stopped working. Can Petrolmate replace it?

Yes. Petrolmate covers all Australian states plus NZ with 15,149+ stations backed by official government APIs.

Do I need an API key?

No. No registration, no key, no sign-up. Just call the endpoint with your coordinates.

Can I get prices for my whole state?

The API is designed for location-based lookups within 25km. For broader trends visit petrolmate.com.au/price-trends.

Ready to get started?

Copy the REST sensor config above into your configuration.yaml and restart Home Assistant.

Find Your Coordinates on the Map