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.cit.api.here.com/places/v1/discover/here
        ?app_id={YOUR_APP_ID}
        &app_code={YOUR_APP_CODE}
        at=31.6473,-8.0009
        &cat=atm-bank-exchange
        &pretty
      

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.cit.api.here.com/places/v1/categories/places/atm-bank-exchange
      ?app_id={YOUR_APP_ID}
      &app_code={YOUR_APP_CODE}",
      "type": "urn:nlp-types:category",
      "system": "places"
    },
    "icon": "https://download.vcdn.cit.data.here.com/p/d/places2_stg/icons/categories/15.icon",
    "vicinity": "شارع علال الفاسي<br/>مراكش, مراكش",
    "having": [],
    "type": "urn:nlp-types:place",
    "href": "https://places.cit.api.here.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.cit.api.here.com/places/v1/categories/places/atm-bank-exchange
      ?app_id={YOUR_APP_ID}
      &app_code={YOUR_APP_CODE}",
      "type": "urn:nlp-types:category",
      "system": "places"
    },
    "icon": "https://download.vcdn.cit.data.here.com/p/d/places2_stg/icons/categories/15.icon",
    "vicinity": "شارع علال الفاسي<br/>مراكش, مراكش",
    "having": [],
    "type": "urn:nlp-types:place",
    "href": "https://places.cit.api.here.com/places/v1/places/504evdk1-7e237...",
    "id": "504evdk1-7e2373b727824041a19c6835cd7b307d"
    }
  ]
  }