WA Fuel Price API and Embeddable Widget

FuelCompass serves Western Australian fuel prices from FuelWatch as JSON: today’s price at every station, and tomorrow’s once FuelWatch publishes them at 2:30pm, by suburb, region or location. Or put a small price card for your town on your website, with no code at all.

Get Started

  1. Make an API key in your FuelCompass account. Signing in takes an email address, no password. Each account can have three keys.
  2. Send the key with every request, in a header.
  3. Show the FuelWatch credit wherever you show the prices.
curl -H "Authorization: Bearer fc_live_…" \
  "https://fuel-compass.com/api/v1/cheapest?fuel=diesel&region=perth"

Keys

Send the key as Authorization: Bearer <key> or X-API-Key: <key>. Keys look like fc_live_ followed by 52 letters and digits. We show a key once, when you make it, and keep only a scrambled copy, so store it somewhere safe. If one leaks, revoke it in your account and make another.

Never put a key in a URL. Requests with a key in the query string are refused, because URLs end up in logs and browser history.

The API answers requests from any website (CORS, without cookies), but a key in a web page’s JavaScript is visible to everyone who opens the page. Call the API from your server and cache the answers there.

Limits

  • 10 requests a second per key, in bursts of up to 20.
  • 10,000 requests per key per day. The count resets at midnight in Perth. The quota is per key, not per account or per person: it is there to keep the service fast for everyone, and using extra keys or accounts to get around it, or any use that strains the service, leads to account suspension. An account can make up to 5 keys a day. If you need more, ask for a higher quota on one key.
  • Over either limit you get 429 with a Retry-After header in seconds. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset for the daily quota.
  • Prices change twice a day at most: FuelWatch publishes tomorrow’s at 2:30pm, and they take over at 6am. Answers carry an ETag; send it back as If-None-Match and you get a 304 when nothing changed.

Credit FuelWatch

The prices come from FuelWatch, Government of Western Australia. Their condition for reuse is that FuelWatch is acknowledged as the source with a link to www.fuelwatch.wa.gov.au, so wherever you show prices from this API, show that credit too. Every answer includes it in attribution:

Fuel prices from FuelWatch (https://www.fuelwatch.wa.gov.au), Government of Western Australia. Historic prices © State of Western Australia (FuelWatch), licensed under CC BY 4.0; aggregated and processed by FuelCompass. FuelCompass is not affiliated with or endorsed by FuelWatch.

Answers

Every answer is JSON with the same four fields. Prices are cents per litre, as an exact decimal string and as whole tenths of a cent.

{
  "price_date": "2026-10-16",
  "generated_at": "2026-10-16T02:00:00Z",
  "attribution": { "text": "Fuel prices from FuelWatch …", "source_url": "https://www.fuelwatch.wa.gov.au", … },
  "data": { …, "prices": [ { "station": { … }, "fuel": "diesel", "price": { "cents_per_litre": "189.9", "tenths": 1899 } } ] }
}

price_date is the day the prices are for: each price applies from 6am that day until 6am the next. With day=tomorrow before 2:30pm, lists are empty and published is false.

Errors look like {"error": {"code": "invalid_parameter", "message": "…"}}: 401 for a missing or unknown key, 403 for a revoked key, 400 for a key in the URL, 404 for an unknown place, station or endpoint, 422 for a bad or unknown parameter, and 429 over a limit.

Endpoints

All are GET, relative to https://fuel-compass.com, and every one needs a key.

GET /api/v1/regions

Every WA region, with how many suburbs and stations have current prices.

Example: /api/v1/regions

GET /api/v1/regions/{region}/suburbs

The suburbs in a region with stations reporting prices, and the fuels they sell.

Example: /api/v1/regions/goldfields-esperance/suburbs

GET /api/v1/suburbs/{region}/{suburb}/prices

Every station’s price in a suburb, cheapest first within each fuel.

ParameterDescription
fuelFuel slug: diesel, premium-diesel, unleaded-91, premium-95, premium-98, lpg or e85. Every fuel when left out.
daytoday (the default: the price in force now, 6am to 6am) or tomorrow (the next day’s price, published each afternoon, WA time).

Example: /api/v1/suburbs/goldfields-esperance/kalgoorlie/prices?fuel=diesel&day=today

GET /api/v1/stations/{slug}

One station: where it is, and today’s and tomorrow’s price for every fuel it sells.

Example: /api/v1/stations/ampol-kalgoorlie

GET /api/v1/stations

Stations within a radius of a point, nearest first.

ParameterDescription
nearRequiredlat,lon in decimal degrees, inside WA, e.g. -31.95,115.86.
radius_kmSearch radius in km, above 0 and at most 50 (default 10).
fuelFuel slug: diesel, premium-diesel, unleaded-91, premium-95, premium-98, lpg or e85. Every fuel when left out.
daytoday (the default: the price in force now, 6am to 6am) or tomorrow (the next day’s price, published each afternoon, WA time).
limitHow many results, 1 to 100 (default 20).

Example: /api/v1/stations?near=-30.7489,121.4658&radius_km=10&fuel=diesel&limit=20

GET /api/v1/cheapest

The cheapest stations for one fuel, statewide or in one region.

ParameterDescription
fuelRequiredFuel slug: diesel, premium-diesel, unleaded-91, premium-95, premium-98, lpg or e85.
regionRegion slug from /api/v1/regions. The whole state when left out.
daytoday (the default: the price in force now, 6am to 6am) or tomorrow (the next day’s price, published each afternoon, WA time).
limitHow many results, 1 to 100 (default 10).

Example: /api/v1/cheapest?fuel=diesel&region=goldfields-esperance&day=today

GET /api/v1/tomorrow

Every published next-day price, with today’s beside it. Empty, with published: false, until FuelWatch publishes each afternoon, WA time.

ParameterDescription
fuelFuel slug: diesel, premium-diesel, unleaded-91, premium-95, premium-98, lpg or e85. Every fuel when left out.
regionRegion slug from /api/v1/regions. The whole state when left out.

Example: /api/v1/tomorrow?fuel=diesel

GET /api/v1/meta

The price window, when prices last loaded, the fuels, your key’s quota and the attribution.

Example: /api/v1/meta

Price Card for Your Website

A small card with the three cheapest stations in a town today, and tomorrow’s prices once they are out. It updates by itself, follows your visitors’ light or dark setting, sets no cookies, runs no scripts and needs no key. Pick a place and a fuel, then copy the code into your page.