Quick Start Guide

Two quick examples of geocoding and search capabilities:

discover request geocode Request
To retrieve 5 petrol stations near (52.5228,13.4124), send the request: To geocode the free-form text "Invalidenstr 117, Berlin", send the request:

https://discover.search.hereapi.com/v1/
discover
?at=52.5228,13.412
&q=petrol+station
&limit=5
&lang=en-US
&apiKey={YOUR_API_KEY}

https://geocode.search.hereapi.com/v1/
geocode
?q=Invalidenstr+117%2C+Berlin
&apiKey={YOUR_API_KEY}


The responses to the above requests may include multiple items, and each item will provide the following high-level elements:

  • resultType – HERE Geocoding and Search supports multiple location object types (place, street, locality, ...)
  • title – a representative string for the result, for instance the name of a place, or a complete address
  • address - a breakdown of the result address into its related fields
  • position - a representative geo-position (WGS 84) of the result; this is to be used to display the result on a map
  • access - the geo-position of the access to the result (for instance the entrance)
  • id - the identifier of the item. Its value can be used to retrieve the very same object using the /lookup endpoint.

Other elements are specific to the different HERE Geocoding and Search services/endpoints.

{
  "items": [
    ...
    {
      "title": "Clean Car",
      "id": "here:pds:place:276u33d9-f9eb2dbed6704ac099d044217562b261",
      "resultType": "place",
      "address": {
        "label": "Clean Car, Holzmarktstraße 5, 10179 Berlin, Germany",
        "countryCode": "DEU",
        "countryName": "Germany",
        "state": "Berlin",
        "county": "Berlin",
        "city": "Berlin",
        "district": "Mitte",
        "street": "Holzmarktstraße",
        "postalCode": "10179",
        "houseNumber": "5"
      },
      "position": { "lat": 52.51468, "lng": 13.41986 },
      "access": [{ "lat": 52.51481, "lng": 13.41998 }],
      "distance": 1034,
      "categories": [
        { "id": "700-7850-0121", "name": "Car Wash - Detailing", "primary": true },
        { "id": "700-7400-0287", "name": "Maid Services" },
        { "id": "700-7600-0116", "name": "Gas Station" }
      ],
      "contacts": [
        {
          "phone": [{ "value": "+4930..." }],
          "fax": [{ "value": "+49302..." }],
          "www": [{ "value": "http://www.cleancar.de/" }],
          "email": [{ "value": "nl120@..." }]
        }
      ],
      "openingHours": [
        {
          "text": ["Mon-Fri: 07:30 - 20:00", "Sat: 08:00 - 19:00", "Sun: 09:00 - 17:00"],
          "isOpen": true,
          "structured": [
            { "start": "T073000", "duration": "PT12H30M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR" },
            { "start": "T080000", "duration": "PT11H00M", "recurrence": "FREQ:DAILY;BYDAY:SA" },
            { "start": "T090000", "duration": "PT08H00M", "recurrence": "FREQ:DAILY;BYDAY:SU" }
          ]
        }
      ]
    },
    ...
  ]
}

{
  "items": [
    {
      "title": "Invalidenstraße 117, 10115 Berlin, Deutschland",
      "id": "here:af:streetsection:tVuvjJYhO86yd5jk1cmzNB:CgcIBCCf2912EAEaAzExNyhk",
      "resultType": "houseNumber",
      "houseNumberType": "PA",
      "address": {
        "label": "Invalidenstraße 117, 10115 Berlin, Deutschland",
        "countryCode": "DEU",
        "countryName": "Deutschland",
        "state": "Berlin",
        "county": "Berlin",
        "city": "Berlin",
        "district": "Mitte",
        "street": "Invalidenstraße",
        "postalCode": "10115",
        "houseNumber": "117"
      },
      "position": { "lat": 52.53041, "lng": 13.38527 },
      "access": [{ "lat": 52.53105, "lng": 13.3848 }],
      ...
    }
  ]
}

To retrieve an api key, check Get Credentials. Note that the use of Oauth tokens is recommended for production.

HERE Geocoding and Search services are:

results matching ""

    No results matching ""