Constructing a Request

A request to the HERE Geocoding and Search includes the basic elements shown in the following table and, in addition, may contain resource-specific parameters.

Info

All HERE Geocoding and Search endpoints are called with a GET method.

ElementValue/ExampleDescription
Schemehttps
Base URL Global:[service].search.hereapi.com, China:[service].search.hereapi.cn Base URL for the [service]. Note that endpoints are named after their related service. For instance the Discover service is served by the endpoint /discover.
So that the base url for the Discover service is discover.search.hereapi.com
Versionv1
Endpoint/discoverFind places or locations using a free-form text query
/autosuggestGet suggestions to build up search queries.
/geocodeSearch for an address and return the corresponding geo-coordinates
/revgeocodeFind the nearest address to specific geo-coordinates
/browseFind places data using names or category ids
/lookupFind a place or other location objects using its identifier
Parameters[key]=[value]&...Endpoint specific parameters.
Note that the repetition of the same parameter keys throws a 400.
Check the API Reference for more details.

for instance the following URI

https://discover.search.hereapi.com/v1/discover?at=52.5228,13.4124&q=petrol+station&limit=5

is used to reach the service/endpoint Discover with the following parameters:

  • at set to the latitude 52.5228 and longitude 13.4124
  • q set to "petrol station"
  • limit set to 5

HTTP Request Headers Overview

Important context information is passed to the API using optional HTTP request headers. Wherever applicable the service relies on established and standardized headers, complementing these with some additional private headers. Some of these directly affect the results, while others help to optimize search results.

The following table describes the http request header.

Header name Description
Accept Specifies which media types are acceptable for the response Accept header specification. The only value supported is application/json resulting in a standard JSON response. This value is also the default one.
Date The user's local time, for example, "Mon, 08 Aug 2011 11:58:17 GMT" (see Date header specification).
User-Agent A string identifying the client user agent (see User-Agent header specification, used for statistical purposes. If HERE Geocoding and Search is accessed from within a web browser, the browser should send this information automatically. For other applications, it may need to be explicitly set by the application.
Accept-Encoding Allows clients to enable compressed transfer of responses. The only supported value is gzip-compression. Clients are strongly encouraged to make use of that option, as it can have a major impact on the responsiveness and performance of the client application (see Accept-Encoding header specification.
X-Request-ID Allows a client to specify a different identifier for each query sent to HERE Geocoding and Search and get that {ID back in the response header. This is useful for customers own data mining and logging analysis about the correlation of responses to requests and to communicate with HERE about potential issues.

results matching ""

    No results matching ""