Migrate Autosuggest Requests

This section covers the actions that must be taken to migrate a Places API Autosuggest request to a GS7 Autosuggest request.

For more details about the types or specification of parameters, see the Developer Guide.

Base URL, Version, Resource

Parameter Places API GS7
Public/Automotive Base URL https://places.ls.hereapi.com https://autosuggest.search.hereapi.com
Public Legacy Base URL https://places.ls.hereapi.com https://autosuggest.search.hereapi.com
Public Automotive Base URL https://places.ls.hereapi.com https://autosuggest.search.hereapi.com
Version /places/v1 /v1
Resource / Endpoint /autosuggest /autosuggest

Query flow

Both Autosuggest Places API Entrypoint and Service are meant to support end users with suggestions while they are formulating a textual one box query.

Follow-up category and chain query suggestions returned by Places API Autosuggest Entrypoint through the href attribute can similarly be retrieved from Autosuggest Service through the href response element.

Places API applications retrieving Place Media Type details from Autosuggest entrypoint place or address results through the href attribute can retrieve those details on GS7 using the Lookup service with the id response element returned by the Autosuggest Service. Chapter Place Details describes how Place Media types attributes map to those of a GS7 Lookup result.

Places API
resultType
Places API
follow-up
GS7
resultType
GS7
follow-up
place, address href place, locality, street, administrativeArea, houseNumber, addressBlock id
chain, category href categoryQuery, chainQuery href
query href NA NA

Query parameters

Places API GS7 Comment
q q
Accept-Language lang Multiple values are currently not supported.
See Accept-Language header chapter
at
Geolocation
at cgen and u sub-parameters currently not supported.
See Location Context for more details.
in in cgen and u sub-parameters currently not supported.
See Location Context for more details.
size limit
route route GS7 routes need to be encoded as "HERE flexible-polyline". CW, HW, DW are currently not supported.
See Route And Compressed Route for more details
compressedRoute route GS7 routes need to be encoded as "HERE flexible-polyline". .C, .H, .D are currently not supported.
See Route And Compressed Route and here-polyline-converter for more details
cs=pds Not necessary on GS7: GS7 supports by default cs=pds, the more granular places categories.
addressFilter=countryCode in=countryCode stateCode, county, district, city, zipCode keys are currently not supported.
recd=false Not necessary on GS7: GS7 always calculates distances with respect to the query location context.
urgency=1.0 Not necessary on GS7: GS7 distances are per default for an urgency of 1.0, i.e. calculated from the at position value. Check Route and Compressed Route chapter for more details.
tf=plain Not necessary on GS7: GS7 supports per default this label formatting mode.

Autosuggest Media Type

Places API GS7 Comments
results items

Suggested Place or Location

Places API GS7 Comments
resultType resultType Check result Types for the type values mapping.
title title
id id
highlightedTitle
highlightedVicinity
highlights.title
highlights.address
Highlighting is supported in GS7 through string indices.
position[0]
position[1]
position.lat
position.lon
category
categoryTitle
(with cs=pds)
categories[].id
categories[].name
GS7 supports multiple categories. The primary one has primary field set to true.
bbox[0]
bbox[1]
bbox[2]
bbox[3]
mapView.west
mapView.south
mapView.east
mapView.north
href id id needs to be used against the GS7 /lookup endpoint.
distance distance
chainIds chains[].id

Suggested Search Query

Places API GS7 Comments
resultType resultType Check result Types for the type values mapping.
title title
highlightedTitle
highlightedVicinity
highlights.title
highlights.address
Highlighting is supported in GS7 through string indices.
href href

Suggested query term completion

Places API applications needing query term completions will find them GS7 Autosuggest queryTerms response element, separate from items. The maximum number of term completions need to be set in GS7 Autosuggest queries with a positive value smaller than 10 (default is 0). Check the Query term completion support chapter for more details.

Highlighting

Both Places API and GS7 provide highlighting information in the Autosuggest Entrypoint and Service. While Places API provides highlighting delimiter formatting (through hlStart and hlEnd), GS7 provides a more generic way to enable customers to render highlighting in their applications.

Places API allows customer to specify the start and end tag delimiter that should be placed before each matched token in the Autosuggest entrypoint. GS7 on the other hand, provides the start and end indices in the response elements matching to the query.

For instance a Places API application sending the Autosuggest query "Resta" with hlStart=<i>&hlEnd=</i> can expect to get a result titled "restaurants" with a highlightedTitle response element set to <i>resta</i>urant. Both matching and formating are integrated in the response element.

GS7 Autosuggest Service is expected to return for the very same query "Resta" a result item titled "restaurants" with a highlights response elements only specifying the positions in the title of the parts matching the query value:

highlights: {
      title: [
         {
            start: 0,
            end: 5
         }
      ]
   }

Application developers can easily build highlightedTitle and highlightedVicinity values like Places API is returning by using the value of GS7 title and the related information in highlights.

Place category system

GS7 supports the very precise HERE places categories, available in Places API through the cs=pds query parameter. Refer to the Category systems page for more details.

Currently not supported

Following query parameters or headers are currently not supported in GS7 Autosuggest service:

parameter/header Comment
type The concept of Media type is not supported. resultType field should be used to identify the type of the result.
X-Map-Viewport
hlStart
hlEnd
Not supported.
Highlighting is supported in GS7 through string indices.
cs=places,cuisines Not supported.
GS7 only supports the more granular places categories.
See Category Systems for more details.
recd=true
urgency=0.0
result_types
tf=html

The following Places API attributes are currently not returned in GS7 Autosuggest service:

resultType attribute Comments
all type GS7 does not support the concept of media type.
place, address vicinity
place category
categoryTitle
(without cs=pds)
category category category details of a category suggestion is currently not supported.
category, chain position, distance positions and distance of re-centered category/chain suggestions is currently not supported.

results matching ""

    No results matching ""