Searching Through API responses dropdown

I need to take the users input on each key press (ideally debounced in some way), use that to send an HTTP request that queries an external API and then populates the drop down contents with the results from the HTTP request. This value needs to be updated when the user input changes so the results in the dropdown correspond to the most up to date suggestions.

Essentially I need to provide search suggestions based on the user input dynamically from an API call