GuidesAPI Reference
Guides

Stations

This resource retrieves a list of fuel stations which match the specified criteria. Requests for this resource use the HTTP GET method. Specify the search criteria as query parameters, which must include search geometry. Search geometry can be one of:

  • prox: A circular area defined by the coordinates of its center and a radius.
  • corridor: A path defined as a set of points (latitude, longitude pairs) and a width.
  • bbox: A square defined by its top left latitude and longitude and its bottom right latitude and longitude.

Request

This code block shows a search request using proximity (prox) to define the search area.

https://fuel.hereapi.com/v3/stations
?prox=52.516667,13.383333,5000
&apiKey=\{YOUR\_API\_KEY\}

Request Parameters

The following table documents both mandatory and optional request parameters supported by the stations resource.

ParameterRequiredDescription
app_id - legacyYesA-20 byte Base64 URL-safe encoded string used for the authentication of the client app. You must include authentication with every request. For more information on authentication, see the Identity and Access Management Developer Guide.
app_code - legacyYesA-20 byte Base64 URL-safe encoded string used for the authentication of the client app. You must include authentication with every request. For more information on authentication, see the Identity and Access Management Developer Guide.
apiKeyYesA 43-byte Base64 URL-safe encoded string used for the authentication of the client app. API Keys never expire but you can disable your API Keys at any time. You can't have more than two API Keys for one app at the same time. You must include an apiKey with every request. For more information on authentication, see the Identity and Access Management Developer Guide.
proxprox, bbox or corridor must be presentA circular search area defined by the latitude and longitude of its center (compliant with WGS 84) and an integer representing the radius of the area in meters, all separated by commas. For example, prox=52.516667,13.383333,5000 searches for fuel prices 5km of latitude 52.50° N and 13.55 ° E, which is within Berlin. The maximum radius of the circle is 200 km.
bboxprox, bbox or corridor must be presentBounding box defined by the latitude and longitude (compliant with WGS 84) of its top left and bottom right corners. A semicolon separates he top left and bottom right pairs, and a comma separates the latitude and longitude pairs. For example, one possible bounding box value is bbox=52.8,11.37309;52.31,13.2. The bounding box size (width and height) must be no larger than 400km.
corridorprox, bbox or corridor must be presentA strip defined as a semicolon-separated list of points (pairs of comma-separated latitude and longitude WGS 84 compliant values). For example,corridor=52.51666,13.38333 52.13333,11.61666;53.56527,10.00138&lt specifies a journey from Berlin to Hamburg via Magdeburg.

Maximum corridor area is 5000 km2.

Requests to the stations resource can be a maximum of 4 kb in size in total. Since the corridor query parameter is the item that's most likely to contain the most information, a useful guideline is that this parameter can contain approximately 150 points (latitude/longitude pairs with an accuracy of 5 decimal points [for example, 11.37309]). Note that the amount of data you can include depends on the exact construction of the request.
fueltypeNoComma separated integers identifying the fuel types or categories included in the response. There are an unlimited number of values.
By default, the result set excludes Stations with unknown price information. When the showallstations parameter is set to "true," then all stations within the search area are in the result. For more information on available fuel types and categories, see Fuel Types and Categories.
corridorwidthNoThe width of the corridor in meters. This parameter takes effect only if corridor is in the request. The maximum corridor width is 20 km. Default: 5000.
maxresultsNoThe maximum number of results a response can contain. This parameter together with the offset parameter in the query and HasMore in the response, can be used for pagination. Default: 50.
sortkeyNoCriteria for sorting a list of search results. The possible values are:• price (available when fueltype is a query parameter, and its value mapped to a single fuel type)
• distance (only available for proximity search) – sorts by distance to fuel station.
sortorderNoThe sort order of the results. The possible values are:
• asc (ascending) Default: asc
• desc (descending)
.
offsetNoA value specifying the index of the first result. This parameter together with the maxresults parameter in the query and HasMore in the response can be used for pagination. Default: 0.
showallstationsNoFuel stations with unknown price or fuel type information are in the result set. This parameter works together with fueltype parameter. The possible values are:• true
• false Default: false .
imagedimensionsNoRequest specific maximum size of brand icon image to match UI and bandwidth requirements The format specifies dimension for a scaled image by providing either the desired width, desired height, or both. Valid elements are:
• w\d+
• h\d+
• w\d+-h\d+ Examples:• imagedimensions=w32-h32
• imagedimensions=w300
• imagedimensions=h200
brandNoA-list of brands to filter the stations in the response. Separate the brand names in the station matching one in the list. The matching is case-insensitive.
📘

Note

Use the provided values as upper boundaries for the dimensions of the returned image. The solution never scales up a small image and maintains the aspect ratio of the original image.

Response

For more information on the responses to queries for the stations resource, see FuelStationsResultType response.