Get API Key and Include Javascript for Google Map/Places.
const autocompleteService = new google.maps.places.AutocompleteService()const autocompleteRequest = { input: 'ja', // trying autocomplete for "japan"}autocompleteService.getPlacePredictions(autocompleteRequest, (results, status) => { if (status == google.maps.places.PlacesServiceStatus.OK) { results.forEach((item) => { console.log(item.description) }) }})
References: