Apple please provide example code to use MapKit JS Autocomplete. You are using MapKit JS Autocomplete on this site on the user profile page!
Should be easy enough to take 5 minutes and cut and past the code into a response.
Another time Apple showed MapKit JS Autocomplete was at WWDC2018, during this presentation: https://developer.apple.com/videos/play/wwdc2018/212/
But the example code they provided was incomplete.