Fuel Prices API Developer's Guide

Fuel Price - all fuel types Example

This section provides an example of a fuel price request without fuel type.

Note: This example uses a HERE API key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide

User story

The user wants to obtain prices for all fuel types within 5km of latitude 52.53087 and longitude 13.44176, which is in Berlin, Germany. Note that the latitude and longitude values are in WGS 84 format.

Request Summary

Resource: stations , note that resource representation is specified via extensions .xml or .json
Parameters: prox – indicates the area searched for fuel prices; in this case the area is a circle defined by a point within Berlin and a radius of 5km.


The code block below demonstrates the complete request, specifying that the response data are to be delivered in JSON.


Here is the same request indicating that the response data are to be delivered in XML.



The response to the request contains:

  • the fuel prices of all the fuel types that met the search criteria (within proximity radius). If price is estimated, fuelPrice element does not contain any price information but fuel type is available on this station (fuel type 4 - Premium).
  • list of stations that fit the specified criteria with additional details

The example response in JSON format is as follows:


The example response in XML format is as follows:

    <fuelStation id="276u33dc-d1d2783a63404a6789f281438f32375f" pvId="50664433" lastUpdateTimestamp="2014-12-14T11:01:41.609Z" timeZone="Europe/Berlin">
      <fuelPrice fuelType="27" unit="l" currency="EUR" lastUpdateTimestamp="2015-03-12T10:17:45.000Z">
      <fuelPrice fuelType="1" unit="l" currency="EUR" lastUpdateTimestamp="2015-03-12T10:17:45.000Z">
      <fuelPrice fuelType="14" unit="l" currency="EUR" lastUpdateTimestamp="2015-02-25T11:04:41.000Z">
      <fuelPrice fuelType="11" unit="l" currency="EUR" lastUpdateTimestamp="2015-03-12T10:17:45.000Z">

For more details about responses to this type of request refer to Fuel Stations Response.