AutocompleteSegment

fun AutocompleteSegment(    type: String,     value: String,     matches: Matches,     id: String? = null,     matchedAlternativeName: String? = null)

Parameters

type

The type of entity detected.

value

The value of the entity. It may be a category name, brand name, or a piece of unrecognized text. If it's a brand segment, the content of this field can be used to restrict results of other search endpoints to Points Of Interest (POI) for specific brands. See the brandSet parameter in the Fuzzy Search service https://developer.tomtom.com/search-api/search-api-documentation-search/fuzzy-search.

matches

Reports which part of the input query contains the matched segment. Input query matching may not be continuous, so the mapping is defined by an array of matched substrings.

id

Category segment type. Can be used to restrict the results of other search endpoints to Points Of Interest (POI) from specific categories. See the categorySet parameter in the Fuzzy Search service https://developer.tomtom.com/search-api/search-api-documentation-search/fuzzy-search.

matchedAlternativeName

(Optional) category segment type. Present only if a part of the user query matches an alternative name instead of a primary name. For example, for the input query "petrol station" the category segment value is "gas station" and the matchedAlternativeName is "petrol station".