Autocomplete results

Autocomplete results from Constructor are designed to facilitate faster, more efficient searches by offering AI optimized suggestions as users type their queries into a search bar. These suggestions can include specific products, categories, or search terms that will help users find what they're looking for with minimal effort.

The main goal of Autocomplete is to facilitate faster, more efficient searches by offering relevant suggestions based on the initial characters entered by the user. These suggestions can include specific product names, categories, or general search terms that help users refine their queries and find what they're looking for with minimal effort.

API endpoints

Response structure

Sections

By default, the Autocomplete response contains two sections: one for "Search Suggestions" and one for "Products." Search suggestions are recommended search terms based on the user's input, while Products are actual items from the catalog that match the input. These are the typical sections, but we also support suggesting category page results, store locations, etc. You can work with our Integration Engineering team to define and optimize other entities you'd like to search within.

Products

These are the items you sell and want to facilitate discovery for. Constructor's response enables users to jump directly to the product they're interested in from the search bar itself within milliseconds -- even with catalogs containing millions of items.

Search suggestions

These are suggested search terms that are AI optimized to match both user intent and items in the catalog. Suggested search terms help users search more effectively by encouraging more specific, well-formed queries that provide results. Customers can generate and maintain search suggestions themselves, but most customers rely on Constructor's optimization and suggestion algorithms to generate and optimize the list of search suggestions.

{
  "request": {
    ...
  },
  "response": {
    "sections": {
      "Search Suggestions": [
        ...
      ],
      "Products": [
        ...
      ]
    }
  }
}

Value & matched terms

All individual Autocomplete results will include at least two fields:

  • matched_terms: This indicates the terms that were matched within each result and is useful when implementing highlighting of matched values. In this example, imagine the user has typed "doge food." Constructor resolves this to the spell corrected dog food and returns the matched terms to permit match highlighting even for misspellings.
  • value: This is the primary field searched and displayed to the user and generally corresponds to item_name you provided when adding the item.
{
  "sections": {
    "Search Suggestions": [
      {
        "data": [
          ...
        ],
        "is_slotted": false,
        "labels": {},
        "matched_terms": [
          "dog food"
        ],
        "value": "mccormick's farmstand dog food"
      },
      ...
    ],
    "Products": [
      {
        "data": [
          ...
        ],
        "is_slotted": true,
        "labels": {
          "is_sponsored": true
        },
        "matched_terms": [
          "dog food"
        ],
        "value": "McCormick's Farmstand Small Bites Potato & Duck Formula Dog Food"
      },
      ...
    ]
  }
}