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.4124
&q=petrol+station
&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": "TOTAL",
      "id": "here:pds:place:276u33dc-2e01d17cb4a24c14bcad179ed8946016",
      "resultType": "place",
      "address": {
        "label": "TOTAL, Prenzlauer Allee 1, 10405 Berlin, Germany",
        "countryCode": "DEU",
        "countryName": "Germany",
        "stateCode": "BE",
        "state": "Berlin",
        "countyCode": "B",
        "county": "Berlin",
        "city": "Berlin",
        "district": "Prenzlauer Berg",
        "street": "Prenzlauer Allee",
        "postalCode": "10405",
        "houseNumber": "1"
      },
      "position": { "lat": 52.52724, "lng": 13.41636 },
      "access": [{ "lat": 52.5273, "lng": 13.41617 }],
      "distance": 562,
      "categories": [
        { "id": "700-7600-0116", "name": "Gas Station", "primary": true },
        { "id": "700-7850-0121", "name": "Car Wash - Detailing" }
      ],
      "chains": [{ "id": "35" }],
      "references": [
        { "supplier": { "id": "core" }, "id": "50664440" },
        { "supplier": { "id": "yelp" }, "id": "OQn9q-QzNNu8v3eQQQIFNg" },
        { "supplier": { "id": "yelp" }, "id": "j926GEeY9jUex9ESkzJLJg" }
      ],
      "contacts": [
        {
          "phone": [{ "value": "+49304425643" }, { "value": "+4949304425643" }],
          "fax": [{ "value": "+49304417600" }],
          "www": [
            {
              "value": "http://store.total.de/de/germany/store-total-de/berlin/berlin-prenzlauer-allee-1-4/ND020511"
            },
            { "value": "http://store.total.de/de_DE/ND020511" },
            { "value": "http://www.total.de/" }
          ]
        }
      ],
      "openingHours": [
        {
          "text": ["Mon-Sun: 00:00 - 24:00"],
          "isOpen": true,
          "structured": [
            { "start": "T000000", "duration": "PT24H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,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 ""