Get started

This section outlines how to get started quickly using HERE Geocoding and Search on the HERE platform:

  1. Get a HERE account
  2. Create a project
  3. Configure your project
  4. Get An API key
  5. Send a request
  6. Next steps

Note

This section provides information on the minimum setup required to quickly begin using HERE Geocoding and Search. For more detailed information on HERE account setup, project creation, service linking, app registration, and authentication, see the Identity & Access Management Guide.

Get a HERE account

You can get started with a free HERE platform account from the flexible HERE Base Plan. For more information, see the HERE Base Plan Pricing. Alternatively, if your company has already established a HERE platform organization, contact your organization admin who can invite you to join your company's organization.

Create a project

To create a project, follow these steps:

  1. Sign in to the HERE platform using your HERE account.
  2. Open the Projects manager from the launcher.
  3. Click Create new project.
  4. Enter a name for the project. Project names don't have to be unique.
  5. Enter a project ID. Project IDs must be unique within an organization and cannot be changed for the lifetime of the organization. Project IDs must be between 4 and 16 characters in length.
  6. Enter an optional description.
  7. Click Save.

Configure your project

To configure your project, which involves linking the HERE Geocoding and Search services you want to use, adding an app to the project, and generating credentials for the app, follow these steps:

  1. On the Resources tab, select Services and then click Link a Service.
  2. Search for HERE Geocoding and Search service(s) and click Link.
  3. Click Done.

Get an API key

To get an API key, follow these steps:

  1. Sign in to the HERE platform using your HERE account.
  2. Select the Access Manager from the launcher.
  3. Select the Apps tab and click Register new app.
  4. Enter a name for the app.
  5. Optional: Enter a description for the app.
  6. Optional: Select the project you created in the previous procedure from the Default access to a project field.
  7. Click Register. The HERE platform creates a new app with a unique app ID.
  8. On the Credentials tab, select API Keys and then click Create API key to generate a maximum of two API Keys for your application authentication credentials. The API key is created and displayed.

Send a request

The following are two examples of requests:

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
&apiKey={YOUR_API_KEY}

https://geocode.search.hereapi.com/v1/
geocode
?q=Invalidenstr+117+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",
      "ontologyId": "here:cm:ontology:petrol_gasoline_station",
      "resultType": "place",
      "address": {
        "label": "TOTAL, Prenzlauer Allee 1-4, 10405 Berlin, Deutschland",
        "countryCode": "DEU",
        "countryName": "Deutschland",
        "stateCode": "BE",
        "state": "Berlin",
        "countyCode": "B",
        "county": "Berlin",
        "city": "Berlin",
        "district": "Prenzlauer Berg",
        "street": "Prenzlauer Allee",
        "postalCode": "10405",
        "houseNumber": "1-4"
      },
      "position": { "lat": 52.52896, "lng": 13.41802 },
      "access": [{ "lat": 52.52906, "lng": 13.41775 }],
      "distance": 783,
      "categories": [
        { "id": "700-7600-0116", "name": "Tankstelle", "primary": true },
        { "id": "100-1000-0009", "name": "Fastfood" },
        { "id": "700-7850-0121", "name": "Autowäsche/-reinigung" }
      ],
      "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", "categories": [{ "id": "700-7600-0116" }] },
            { "value": "304-425643" }
          ],
          "fax": [
            { "value": "030 4417600", "categories": [{ "id": "700-7600-0116" }] },
            { "value": "304417600", "categories": [{ "id": "700-7600-0116" }] }
          ],
          "www": [
            {
              "value": "http://store.total.de/de/germany/store-total-de/berlin/berlin-prenzlauer-allee-1-4/ND020511",
              "categories": [{ "id": "700-7600-0116" }]
            },
            { "value": "http://store.total.de/de_DE/ND020511" },
            { "value": "http://www.total.de", "categories": [{ "id": "700-7600-0116" }] }
          ]
        }
      ],
      "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",
        "stateCode": "BE",
        "state": "Berlin",
        "countyCode": "B",
        "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 }],
      "mapView": { "west": 13.38379, "south": 52.52951, "east": 13.38675, "north": 52.53131 },
      "scoring": { "queryScore": 1, "fieldScore": { "city": 1, "streets": [1], "houseNumber": 1 } }
    }
  ]
}


Note

Oauth tokens are recommended for production. This example uses an apiKey to allow you to quickly try the API.

HERE Geocoding and Search services are:

Next steps

We encourage you to explore the following topics to learn how to succesfully use HERE Geocoding and Search.

results matching ""

    No results matching ""