# Petrolspy — 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 the cheapest fuel prices across Australian petrol stations in real-time by searching your area, comparing prices by fuel type, and viewing detailed station information. Quickly locate the best deals near you by specifying your geographic region and fuel preferences.

**Category:** Maps & Geospatial | **Website:** [petrolspy.com.au/map](https://petrolspy.com.au/map) | **Docs:** [parse.bot/marketplace/a6ae7cba-fbf6-422a-8bb9-9b26150c79bf/petrolspy-com-au-api](https://parse.bot/marketplace/a6ae7cba-fbf6-422a-8bb9-9b26150c79bf/petrolspy-com-au-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-petrolspy-com-au-api-a6ae7cba/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_cheapest_prices

Get the cheapest fuel prices in a geographic area for a specific fuel type, sorted ascending by price. Only stations that carry the requested fuel type are returned.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fuel_type` | string | No | Fuel type to find cheapest prices for. |
| `limit` | integer | No | Maximum number of cheapest prices to return. |
| `ne_lat` | string | Yes | Northeast corner latitude of the bounding box (decimal degrees, e.g. -33.76). |
| `ne_lng` | string | Yes | Northeast corner longitude of the bounding box (decimal degrees, e.g. 151.07). |
| `sw_lat` | string | Yes | Southwest corner latitude of the bounding box (decimal degrees, e.g. -33.86). |
| `sw_lng` | string | Yes | Southwest corner longitude of the bounding box (decimal degrees, e.g. 150.94). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-petrolspy-com-au-api-a6ae7cba/get_cheapest_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fuel_type":"<string>","limit":"<integer>","ne_lat":"<string>","ne_lng":"<string>","sw_lat":"<string>","sw_lng":"<string>"}'
```

### get_station_details

Get detailed information for a specific fuel station by its ID. Requires a bounding box that contains the station. Returns full station details including all fuel prices, trading hours, and amenities.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ne_lat` | string | Yes | Northeast corner latitude of the bounding box (decimal degrees, e.g. -33.76). |
| `ne_lng` | string | Yes | Northeast corner longitude of the bounding box (decimal degrees, e.g. 151.07). |
| `station_id` | string | Yes | PetrolSpy station ID (alphanumeric, e.g. 523274ca036466fee4985694). Obtainable from search_stations or get_cheapest_prices results. |
| `sw_lat` | string | Yes | Southwest corner latitude of the bounding box (decimal degrees, e.g. -33.86). |
| `sw_lng` | string | Yes | Southwest corner longitude of the bounding box (decimal degrees, e.g. 150.94). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-petrolspy-com-au-api-a6ae7cba/get_station_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ne_lat":"<string>","ne_lng":"<string>","station_id":"<string>","sw_lat":"<string>","sw_lng":"<string>"}'
```

### search_stations

Search for fuel stations within a geographic bounding box. Returns stations with all available fuel prices, sorted by the requested fuel type price (cheapest first). Stations without the requested fuel type appear at the end.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fuel_type` | string | No | Fuel type to sort stations by price. |
| `limit` | integer | No | Maximum number of stations to return. |
| `ne_lat` | string | Yes | Northeast corner latitude of the bounding box (decimal degrees, e.g. -33.76). |
| `ne_lng` | string | Yes | Northeast corner longitude of the bounding box (decimal degrees, e.g. 151.07). |
| `sw_lat` | string | Yes | Southwest corner latitude of the bounding box (decimal degrees, e.g. -33.86). |
| `sw_lng` | string | Yes | Southwest corner longitude of the bounding box (decimal degrees, e.g. 150.94). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-petrolspy-com-au-api-a6ae7cba/search_stations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fuel_type":"<string>","limit":"<integer>","ne_lat":"<string>","ne_lng":"<string>","sw_lat":"<string>","sw_lng":"<string>"}'
```
