Optionalcountries?: string[]Restrict results to specific countries.
List of country codes in ISO 3166-1 alpha-2 or alpha-3 format.
OptionalgeoBias?: PointGeoBiasThe point to bias suggestions towards, and how far around it to look.
Optionallimit?: numberMaximum number of suggestions to return.
Search query string (partial user input).
The text to autocomplete. Can be incomplete or partial words.
OptionalresultType?: AutocompleteSearchSegmentType[]Filter results by segment type.
Restricts suggestions to specific entity types (brands, categories, or plaintext).
A result is only included if it contains segments of the specified types. Omit this parameter to receive all types.
// Only brand suggestions (e.g., "Starbucks", "McDonald's")
resultType: ['brand']
// Only category suggestions (e.g., "Restaurant", "Hotel")
resultType: ['category']
// Brands and categories, exclude addresses
resultType: ['brand', 'category']
// All types (default)
resultType: ['brand', 'category', 'plaintext']
Key Features:
Use Cases:
// Basic autocomplete
const params: AutocompleteSearchParams = {
key: 'your-api-key',
query: 'pizz',
limit: 5
};
// Autocomplete with position bias
const biasedParams: AutocompleteSearchParams = {
key: 'your-api-key',
query: 'coffee',
position: [4.9041, 52.3676], // Near Amsterdam
radiusMeters: 5000,
limit: 10
};
// Filter by result type
const brandParams: AutocompleteSearchParams = {
key: 'your-api-key',
query: 'mcdon',
resultType: ['brand'], // Only brand suggestions
countries: ['NL', 'BE'] // Netherlands and Belgium only
};
Parameters for autocomplete search suggestions.
Provides real-time search suggestions as users type, recognizing entities like places, addresses, brands, and categories within partial input.