Places (Search) API Developer's Guide

Explore by Category

User Story

The user of an application on a mobile device is in Quay Street, Galway, Ireland, and wants to find out what museums lie within a radius of 150 meters of his location.

Request

The request based on the above user story needs to be made against the endpoint named discover/explore. In this example, we use an explicit location context (the parameter in) and we name the search category (the type of place to find) through the parameter named cat.

Here is the complete request:

https://places.sit.ls.hereapi.com/places/v1/discover/explore
?apiKey={YOUR_API_KEY}
&in=53.2711,-9.0541;r=150
&cat=sights-museums
&pretty
Note: This example uses a HERE API Key to authenticate your request. For information on other possible options, see Authentication Guide. For examples of how to use the other authentication options with the Places (Search) API, see Authentication Examples.

Response

The response identifies one museum, the Galway City Museum, which is shown in "results" element below. Note that parts of the response have been modified as described in the introduction to Examples.

"results": {
  "items": [
    {
    "position": [
      53.26996,
      -9.05336
    ],
    "distance": 136,
    "title": "Galway City Museum",
    "averageRating": 0,
    "category": {
      "id": "museum",
      "title": "Museum",
      "href": "https://places.cit.api.here.com/places/v1/categories/places/museum
      ?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/10.icon",
    "vicinity": "Spanish Parade<br/>Galway, County Galway",
    "having": [],
    "type": "urn:nlp-types:place",
    "href": "https://places.cit.api.here.com/places/v1/places/372gc3x1-9da51...",
    "id": "372gc3x1-9da511eec5cb49f3968815878eff56eb"
    }
  ]
  }