# Fuelwatch — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Find fuel prices across Western Australia by searching stations by suburb, comparing daily and monthly price trends, and viewing detailed station information. Track fuel price movements across different regions and fuel types to identify the cheapest options nearby.

**Category:** Government & Public Data | **Website:** [fuelwatch.gov.sg/](https://fuelwatch.gov.sg/) | **Docs:** [parse.bot/marketplace/95ad8610-e3c9-4c11-a56a-73210d4bf73f/fuelwatch-gov-sg-api](https://parse.bot/marketplace/95ad8610-e3c9-4c11-a56a-73210d4bf73f/fuelwatch-gov-sg-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_cheapest_stations

Retrieve the top 10 cheapest fuel stations for a given fuel type, optionally filtered by suburb. Returns stations sorted by price ascending for the selected day (today or tomorrow).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day` | string | No | Which day's prices to sort by. |
| `fuel_type` | string | No | Fuel type code. |
| `suburb` | string | No | Optional suburb name filter in uppercase (e.g. 'ALKIMOS'). If omitted, searches all stations state-wide. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/get_cheapest_stations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day":"<string>","fuel_type":"<string>","suburb":"<string>"}'
```

### get_daily_prices

Returns today's fuel prices for all stations state-wide for a given fuel type. Each entry includes station identity, address with coordinates, current price, brand, and operational flags. Results are ordered by price ascending (currentPricingOrder).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fuel_type` | string | No | Fuel type code. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/get_daily_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fuel_type":"<string>"}'
```

### get_fuel_types

Returns the list of available fuel types and their price range limits. Each fuel type has a short code, human-readable name, and the minimum/maximum price bounds in cents per litre that the system tracks.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/get_fuel_types \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_monthly_average_prices

Retrieve monthly average fuel prices for a region and fuel type over a date range. Returns one entry per month with the average price in cents per litre. Not all fuel type and region combinations have data available; some may return an empty array.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date_from` | string | No | Start date in 'DD MMM YYYY' format (e.g. '01 Jan 2024'). Defaults to '01 Jan 2024' if omitted. |
| `date_to` | string | No | End date in 'DD MMM YYYY' format (e.g. '01 Jun 2026'). Defaults to today's date if omitted. |
| `fuel_type` | string | No | Fuel type code. |
| `region` | string | No | Region name. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/get_monthly_average_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date_from":"<string>","date_to":"<string>","fuel_type":"<string>","region":"<string>"}'
```

### get_price_trends

Retrieve daily average fuel price trend for the past 31 days for a given region and fuel type. Returns an array of date/price pairs ordered newest-first. Not all fuel type and region combinations have trend data available; some may return an empty array.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fuel_type` | string | No | Fuel type code. |
| `region` | string | No | Region name. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/get_price_trends \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fuel_type":"<string>","region":"<string>"}'
```

### get_regions

Returns the list of Western Australia regions tracked by FuelWatch. Each region has an ID, name, and type (Metro or Country). Use region descriptions as input to price trend and monthly average endpoints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/get_regions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_station_details

Retrieve full details for a specific fuel station including features (ATM, toilets, air, etc.), brand information, client contact details, address, and trading hours. Requires a station ID obtainable from get_daily_prices or search_stations_by_suburb.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `station_id` | string | Yes | Numeric station ID. Obtain from get_daily_prices or search_stations_by_suburb results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/get_station_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"station_id":"<string>"}'
```

### get_suburbs

Returns the list of all suburbs tracked by FuelWatch, including postcode, region association, and number of fuel stations. Use suburb location values as input to search_stations_by_suburb and get_cheapest_stations.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/get_suburbs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_stations_by_suburb

Search for fuel stations and their current prices in a specific suburb. Returns all stations matching the suburb name for the given fuel type. Suburb names are uppercase (e.g. 'ALKIMOS'). Obtain valid suburb names from get_suburbs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fuel_type` | string | No | Fuel type code. |
| `suburb` | string | Yes | Suburb name in uppercase (e.g. 'ALKIMOS'). Obtain from get_suburbs results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fuelwatch-gov-sg-api-95ad8610/search_stations_by_suburb \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fuel_type":"<string>","suburb":"<string>"}'
```
