Yext Answers API icon

Yext Answers API

Interact with Yext Answers API

Autocomplete

AI-generated

Summary

Retrieve autocomplete suggestions for a partial search term using Yext Answers API.

Inputs

  • Account Id (required) — The unique identifier for your Yext account.
  • V (required) — A date string in YYYYMMDD format indicating the API version to use.
  • Experience Key (required) — A string key uniquely identifying the search experience to query.
  • Locale (required) — The locale code of the experience, such as 'en_GB'.
  • Input — The partial search term input for which to retrieve autocomplete suggestions.
  • Version — Optional label or version of the experience configuration ('STAGING' or 'PRODUCTION'). Defaults to 'PRODUCTION' if omitted.

Output shape

a JSON object containing autocomplete suggestion results as returned by the Yext Answers API

The response is returned directly from the Yext Answers API endpoint; refer to Yext's documentation for exact response structure. Request options allow configuring batching, SSL settings, proxy, and timeout.

Examples

Example 1: Fetch autocomplete suggestions for input 'elec' in an English UK locale experience.

Provide Account Id, a valid version date in 'V', experience key, locale 'en_GB', and input 'elec'. Optionally set version to 'PRODUCTION' or 'STAGING'.

Discussion