Cities

Get a list of supported cities for the FuelPrice API.

Our API covers major cities and regional centers across all Australian states and territories including New South Wales, Victoria, Queensland, Western Australia, South Australia, Tasmania, Northern Territory, and the ACT. Access current fuel prices, historical data, and price spreads for each city.

The city model

The city model contains all the information about as specific city. The following attributes are returned when retrieving a city.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the city.

  • Name
    name
    Type
    string
    Description

    Formatted city name.

  • Name
    state
    Type
    string
    Description

    The state id where the city belongs.

  • Name
    latitude
    Type
    string
    Description

    GPS latitude of the city.

  • Name
    longitude
    Type
    string
    Description

    GPS longitude of the city.


GET/v1/cities

List all cities

This endpoint allows you to retrieve a paginated list of all your contacts. By default, a maximum of ten contacts are shown per page.

Optional attributes

Request

GET
/v1/cities
curl -G https://api.fuelprice.io/v1/cities \
  -H "Authorization: Bearer {token}" \
  -d state=qld

Response

{
"data":[
  {
     "id":"agnes-water",
     "name":"Agnes Water",
     "latitude":"-24.211530",
     "longitude":"151.902300",
     "state":"qld"
  },
  {
     "id":"ayr",
     "name":"Ayr",
     "latitude":"-19.576660",
     "longitude":"147.405820",
     "state":"qld"
  },
  {
     "id":"bamaga",
     "name":"Bamaga",
     "latitude":"-10.888201",
     "longitude":"142.387911",
     "state":"qld"
  }
  // ...
],
"total_items":45,
"total_pages":9,
"current_page":1
}

GET/v1/cities/:id

Retrieve a city

Retrieve a specific city along with locational information.

Request

GET
/v1/cities/{CITY_ID}
curl https://api.fuelprice.io/v1/cities/mandurah \
  -H "Authorization: Bearer {token}"

Response

{
"data": {
  "id":"mandurah",
  "name":"Mandurah",
  "state":"wa",
  "latitude":"-32.536102",
  "longitude":"115.742409"
 }
}

GET/v1/cities/{CITY_ID}/history

Retrieve price history for city

This endpoint allows you to retrieve a paginated list of all your contacts. By default, a maximum of ten contacts are shown per page.

Optional attributes

  • Name
    timeframe
    Type
    string
    Description

    Get the price history for a specific timeframe.

    Supports the following values: last-week, last-month, last-year, last-financial-year, all-time

Request

GET
/v1/cities/{CITY_ID}/history
curl -G https://api.fuelprice.io/v1/cities/mandurah/ \
  -H "Authorization: Bearer {token}" 

Response

{
"data": {
	"id": "mandurah",
	"name": "Mandurah",
	"history": [
		{
			"fuel": "e10",
			"records": false
		},
		{
			"fuel": "ulp91",
			"records": [
				{
					"timestamp": 1698390509,
					"date": "27-10-2023",
					"average": "1.99"
				},
				{
					"timestamp": 1698304162,
					"date": "26-10-2023",
					"average": "1.68"
				},
				{
					"timestamp": 1698217799,
					"date": "25-10-2023",
					"average": "1.76"
				},
				{
					"timestamp": 1698131335,
					"date": "24-10-2023",
					"average": "1.77"
				},
				{
					"timestamp": 1698045023,
					"date": "23-10-2023",
					"average": "1.79"
				},
				{
					"timestamp": 1697958515,
					"date": "22-10-2023",
					"average": "1.83"
				},
				{
					"timestamp": 1697872217,
					"date": "21-10-2023",
					"average": "1.83"
				}
			]
		},
		{
			"fuel": "ulp95",
			"records": [
				{
					"timestamp": 1698390509,
					"date": "27-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1698304162,
					"date": "26-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1698217799,
					"date": "25-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1698131335,
					"date": "24-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1698045023,
					"date": "23-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1697958515,
					"date": "22-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1697872217,
					"date": "21-10-2023",
					"average": "1.80"
				}
			]
		},
		{
			"fuel": "ulp98",
			"records": [
				{
					"timestamp": 1698390509,
					"date": "27-10-2023",
					"average": "2.21"
				},
				{
					"timestamp": 1698304162,
					"date": "26-10-2023",
					"average": "1.94"
				},
				{
					"timestamp": 1698217799,
					"date": "25-10-2023",
					"average": "1.97"
				},
				{
					"timestamp": 1698131335,
					"date": "24-10-2023",
					"average": "1.99"
				},
				{
					"timestamp": 1698045023,
					"date": "23-10-2023",
					"average": "2.00"
				},
				{
					"timestamp": 1697958515,
					"date": "22-10-2023",
					"average": "2.05"
				},
				{
					"timestamp": 1697872217,
					"date": "21-10-2023",
					"average": "2.20"
				}
			]
		},
		{
			"fuel": "diesel",
			"records": [
				{
					"timestamp": 1698390509,
					"date": "27-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1698304162,
					"date": "26-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1698217799,
					"date": "25-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1698131335,
					"date": "24-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1698045023,
					"date": "23-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1697958515,
					"date": "22-10-2023",
					"average": "1.80"
				},
				{
					"timestamp": 1697872217,
					"date": "21-10-2023",
					"average": "1.80"
				}
			]
		},
		{
			"fuel": "pdiesel",
			"records": false
		},
		{
			"fuel": "lpg",
			"records": [
				{
					"timestamp": 1698390509,
					"date": "27-10-2023",
					"average": "1.23"
				},
				{
					"timestamp": 1698304162,
					"date": "26-10-2023",
					"average": "1.23"
				},
				{
					"timestamp": 1698217799,
					"date": "25-10-2023",
					"average": "1.23"
				},
				{
					"timestamp": 1698131335,
					"date": "24-10-2023",
					"average": "1.23"
				},
				{
					"timestamp": 1698045023,
					"date": "23-10-2023",
					"average": "1.23"
				},
				{
					"timestamp": 1697958515,
					"date": "22-10-2023",
					"average": "1.23"
				},
				{
					"timestamp": 1697872217,
					"date": "21-10-2023",
					"average": "1.22"
				}
			]
		},
		{
			"fuel": "e85",
			"records": [
				{
					"timestamp": 1698390509,
					"date": "27-10-2023",
					"average": "2.79"
				},
				{
					"timestamp": 1698304162,
					"date": "26-10-2023",
					"average": "2.79"
				},
				{
					"timestamp": 1698217799,
					"date": "25-10-2023",
					"average": "2.79"
				},
				{
					"timestamp": 1698131335,
					"date": "24-10-2023",
					"average": "2.79"
				},
				{
					"timestamp": 1698045023,
					"date": "23-10-2023",
					"average": "2.79"
				},
				{
					"timestamp": 1697958515,
					"date": "22-10-2023",
					"average": "2.49"
				},
				{
					"timestamp": 1697872217,
					"date": "21-10-2023",
					"average": "2.49"
				}
			]
		},
		{
			"fuel": "e5",
			"records": false
		},
		{
			"fuel": "ev",
			"records": false
		},
		{
			"fuel": "b20",
			"records": false
		},
		{
			"fuel": "cng",
			"records": false
		},
		{
			"fuel": "lng",
			"records": false
		},
		{
			"fuel": "opal",
			"records": false
		},
		{
			"fuel": "lrp",
			"records": false
		},
		{
			"fuel": "ulsd",
			"records": false
		},
		{
			"fuel": "ulp-combined",
			"records": false
		},
		{
			"fuel": "pulp-combined",
			"records": false
		},
		{
			"fuel": "diesel-combined",
			"records": false
		}
	]
}
}

GET/v1/cities/{CITY_ID}/spread

Retrieve price spread for city

Retrieve todays price spread for a specific city.

Request

GET
/v1/cities/{CITY_ID}/spread
curl -G https://api.fuelprice.io/v1/cities/mandurah/spread \
  -H "Authorization: Bearer {token}" 

Response

{
"data": {
	"id": "mandurah",
	"name": "Mandurah",
	"spread": [
		{
			"fuel": "e10",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "ulp91",
			"average": "1.80",
			"min": "179.9",
			"max": "199.9"
		},
		{
			"fuel": "ulp95",
			"average": "1.80",
			"min": "179.9",
			"max": "189.9"
		},
		{
			"fuel": "ulp98",
			"average": "2.06",
			"min": "199.5",
			"max": "224.9"
		},
		{
			"fuel": "diesel",
			"average": "1.80",
			"min": ".0",
			"max": "223.9"
		},
		{
			"fuel": "pdiesel",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "lpg",
			"average": "1.23",
			"min": "135.7",
			"max": "139.9"
		},
		{
			"fuel": "e85",
			"average": "2.79",
			"min": "279.9",
			"max": "279.9"
		},
		{
			"fuel": "e5",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "ev",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "b20",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "cng",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "lng",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "opal",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "lrp",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "ulsd",
			"average": false,
			"min": false,
			"max": false
		},
		{
			"fuel": "ulp-combined",
			"average": false,
			"min": false,
			"max": "199.9"
		},
		{
			"fuel": "pulp-combined",
			"average": false,
			"min": "179.9",
			"max": "224.9"
		},
		{
			"fuel": "diesel-combined",
			"average": false,
			"min": false,
			"max": "223.9"
		}
	]
}
}

GET/v1/cities/{CITY_ID}/average

Retrieve price average for city

Retrieve todays price average for a specific city.

Request

GET
/v1/cities/{CITY_ID}/average
curl -G https://api.fuelprice.io/v1/cities/mandurah/average \
  -H "Authorization: Bearer {token}" 

Response

{
"data": {
	"id": "mandurah",
	"name": "Mandurah",
	"averages": [
		{
			"fuel": "e10",
			"average": false
		},
		{
			"fuel": "ulp91",
			"average": "1.80"
		},
		{
			"fuel": "ulp95",
			"average": "1.80"
		},
		{
			"fuel": "ulp98",
			"average": "2.06"
		},
		{
			"fuel": "diesel",
			"average": "1.80"
		},
		{
			"fuel": "pdiesel",
			"average": false
		},
		{
			"fuel": "lpg",
			"average": "1.23"
		},
		{
			"fuel": "e85",
			"average": "2.79"
		},
		{
			"fuel": "e5",
			"average": false
		},
		{
			"fuel": "ev",
			"average": false
		},
		{
			"fuel": "b20",
			"average": false
		},
		{
			"fuel": "cng",
			"average": false
		},
		{
			"fuel": "lng",
			"average": false
		},
		{
			"fuel": "opal",
			"average": false
		},
		{
			"fuel": "lrp",
			"average": false
		},
		{
			"fuel": "ulsd",
			"average": false
		},
		{
			"fuel": "ulp-combined",
			"average": false
		},
		{
			"fuel": "pulp-combined",
			"average": false
		},
		{
			"fuel": "diesel-combined",
			"average": false
		}
	]
}
}