Incomplete category query

A user searching for restaurants using an embedded application (in his car or on his cellphone) starts entering the text "restaurant. The application submits /autosuggest queries starting with the 3rd key stroke. For suggestions to a "res" partial query somewhere in Berlin, the call would actually look like the following request:

GET https://autosuggest.search.hereapi.com/v1/
    autosuggest
    ?at=52.93175,12.77165
    &limit=5
    &lang=en
    &q=res

Authorization: Bearer [your token]

The response to the above request looks like the following:

{
  "items": [
    {
      "title": "restaurant",
      "id": "here:cm:ontology:restaurant",
      "resultType": "categoryQuery",
      "href": "http://discover.search.hereapi.com/v1/discover?q=restaurant&_ontology=restaurant&lang=en&at=52.93175%2C12.77165",
      "highlights": { "title": [{ "start": 0, "end": 3 }] }
    },
    {
      "title": "Resort Mark Brandenburg",
      "id": "here:pds:place:276u33j5-6ad49082b9ed4e7bbb88c011d7e8babe",
      "resultType": "place",
      "address": { "label": "Resort Mark Brandenburg, An der Seepromenade 20, 16816 Neuruppin, Germany" },
      "position": { "lat": 52.924, "lng": 12.81321 },
      "access": [{ "lat": 52.9241, "lng": 12.81307 }],
      "distance": 2916,
      "categories": [ ... ],
      "chains": [{ "id": "2106" }],
      "references": [ ... ],
      "highlights": { "title": [{ "start": 0, "end": 3 }], "address": { "label": [{ "start": 0, "end": 3 }] } }
    },
    {
      "title": "Hotel & Restaurant am Alten Rhin",
      "id": "here:pds:place:276u33jh-81e655b8ed9246209bcf978fdbcb7db5",
      "resultType": "place",
      "address": { "label": "Hotel & Restaurant am Alten Rhin, Friedrich-Engels-Straße 12, 16827 Neuruppin, Germany" },
      "position": { "lat": 52.95022, "lng": 12.84247 },
      "access": [{ "lat": 52.95026, "lng": 12.84258 }],
      "distance": 5171,
      "categories": [
        { "id": "500-5000-0053", "name": "Hotel", "primary": true },
        { "id": "100-1000-0000", "name": "Restaurant" },
        { "id": "500-5000-0000", "name": "Hotel/Motel" }
      ],
      "references": [ ... ],
      "foodTypes": [ ... ],
      "highlights": { "title": [ ], "address": { "label": [ ] } }
    },
    {
      "title": "Gut Hesterberg",
      "id": "here:pds:place:276u33hv-99165d9fe2fa40a8abee4db346cd1149",
      "resultType": "place",
      "address": { "label": "Gut Hesterberg, Gutsallee 1, 16818 Neuruppin, Germany" },
      "position": { "lat": 52.8803, "lng": 12.88242 },
      "access": [{ "lat": 52.881, "lng": 12.88239 }],
      "distance": 9376,
      "categories": [
        { "id": "600-6300-0363", "name": "Butcher", "primary": true },
        { "id": "100-1000-0000", "name": "Restaurant" },
        ...
      ],
      "references": [ ... ],
      "foodTypes": [ ... ],
      "highlights": { "title": [ ], "address": { "label": [ ] } }
    },
    {
      "title": "Restaurant Seegarten",
      "id": "here:pds:place:276u33j5-49777259a2fe4c76a37f8387ca702a6a",
      "resultType": "place",
      "address": { "label": "Restaurant Seegarten, Regattastraße 17, 16816 Neuruppin, Germany" },
      "position": { "lat": 52.91976, "lng": 12.80827 },
      "access": [{ "lat": 52.91978, "lng": 12.80808 }],
      "distance": 2793,
      "categories": [{ "id": "100-1000-0000", "name": "Restaurant", "primary": true }],
      "references": [ ... ],
      "foodTypes": [ ... ],
      "highlights": { "title": [{ "start": 0, "end": 3 }], "address": { "label": [{ "start": 0, "end": 3 }] } }
    }
  ],
  "queryTerms": [ ]
}

Autosuggest engine returns the category suggestion "Restaurants", along with a follow-up URI, for the application to use if the user chooses the query suggestion. This follow-up query will return restaurant places at the same user location.

Additionally, the suggestion engine returns a set of relevant restaurant places.

More details about /autosuggest parameters can be found in the API Reference.

results matching ""

    No results matching ""