How to make an autocomplete search bar

How can I use the autocomplete API to make a search bar that shows the suggestions as the user types?
For example, if the search bar is for cities, then if someone types in “New”, then it should have a drop down menu under the bar with one of the options as “New York City”.

Thank you!


It depends on which technology you are trying to implement such functionality.

If you want to implement it by using a raw APIs you might want to play with the Fuzzy Search API (and the typeahead parameter). Also it might be good to see the Autocomplete API documentation and read a very nice blog post on that particular topic :slight_smile:

Good luck with coding!



I’m using the nearby search api. Would that still work with the autocomplete api, or would I have to use the fuzzy search api?

Nearby search doesn’t support typeahead param.