Answers endpoint for auto complete

Hello Community.

My client is building their Answers UI on their own environment. Answers Back end is built on our platform.

To do so, they are using Yext Live API to call the results from our system.

They would like to know what the end point (API) they should be using to leverage the autocomplete

Thank you.

Lucas B.

Hey Lucas,

In the “Docs” section of Hitchhikers, there is documentation on the Universal Autocomplete and the Vertical Autocomplete endpoints!

Best,
DJ

1 Like

Hi Dj.

Thank you for your reply, it’ very helpful.

Is there however a way to leverage it without hitting the API key?

Thank you.

Lucas B.

Hi Lucas,

The API Key is a required parameter because that is what tells the endpoint which answers backend to refer to when generating the autocomplete options to send back to you. Without that, there is no way of knowing which experience you want the autocomplete options for.

Out of curiosity, could you provide any insight into why the client is looking to leverage autocomplete without using an API Key?

Best,
DJ

Hi DJ.

They want to accomplish auto-complete from Front-End itself. For security reasons they can’t call end-point with apikey from Front-end so, thinking if there is a scope of performing auto-complete from Front-End directly.

Lucas B

Hey Lucas,

Are there any security reasons in particular that are making them not want to expose the experience’s API key?

To be clear, unless they are leveraging Consumer Auth to set up an authorized search experience that uses a secure token to query instead of the API key, that same experience API key is visible on the frontend every time a user makes a query, regardless of whether or not they leverage the autocomplete endpoint.

For more information on Consumer Auth, you can take a look at the Hitchhiker Module as well as this guide and this community post.

Best,
DJ