Places (Search) API Developer's Guide

Discover Here

User Story

The user of an application on a mobile device is at Avenue 18 Novembre in Marrakech, Morocco and would like to find an ATM.

Request

The user story suggest a request using the discover/here endpoint with the user's current location as the location context and the place category that covers ATMs (atm-bank-exchange) to reduce the number of response items. We use an explicit location context (the parameter at) and we name the search category (the type of place to find) through the parameter named cat.

Here is the request:

https://places.ls.hereapi.com/places/v1/discover/here
?apiKey={YOUR_API_KEY}
&at=31.6473,-8.0009
&cat=atm-bank-exchange
&pretty
Note: This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

Response

The response identifies two ATMs shown in the "results" element below. (Note that parts of the response have been modified as described in the introduction to Examples) .

"results": {
  "items": [
    {
    "position": [
      31.64733,
      -8.00085
    ],
    "distance": 6,
    "title": "BMCI",
    "averageRating": 0,
    "category": {
      "id": "atm-bank-exchange",
      "title": "ATM/Bank/Exchange",
      "href": "https://places.ls.hereapi.com/places/v1/categories/places/atm-bank-exchange
      ?apiKey={YOUR_API_KEY}",
      "type": "urn:nlp-types:category",
      "system": "places"
    },
    "icon": "https://download.vcdn.data.here.com/p/d/places2/icons/categories/15.icon",
    "vicinity": "شارع علال الفاسي<br/>مراكش, مراكش",
    "having": [],
    "type": "urn:nlp-types:place",
    "href": "https://places.ls.hereapi.com/places/v1/places/504evdk1-5f6...",
    "id": "504evdk1-5f61f6fdbb6b4024aeddddf573355bc9"
    },
    {
    "position": [
      31.64752,
      -8.00067
    ],
    "distance": 33,
    "title": "BMCE BANK",
    "averageRating": 0,
    "category": {
      "id": "atm-bank-exchange",
      "title": "ATM/Bank/Exchange",
      "href": "https://places.ls.hereapi.com/places/v1/categories/places/atm-bank-exchange
      ?apiKey={YOUR_API_KEY}",
      "type": "urn:nlp-types:category",
      "system": "places"
    },
    "icon": "https://download.vcdn.data.here.com/p/d/places2/icons/categories/15.icon",
    "vicinity": "شارع علال الفاسي<br/>مراكش, مراكش",
    "having": [],
    "type": "urn:nlp-types:place",
    "href": "https://places.ls.hereapi.com/places/v1/places/504evdk1-7e237...",
    "id": "504evdk1-7e2373b727824041a19c6835cd7b307d"
    }
  ]
  }