- Prepare your Schema
- Prepare your Catalog
- Upload your Feed
- Full Feed Upload
- Delta Feed Upload
- Single Record Upload
- Check Product Count
- JavaScript Based Integration
- HTML Based Integration
- Introduction to GTM
- Requirements
- Introduction
- Events
- API Integration
- Search Endpoint
- Authentication
- Header
- Request Parameter
- Response Components
- Explanation Request Parameter
- PDP API Format
- Sample Request
- Request Parameters
- Response Parameters
- System Requirements
- Install SDK
- Initialize SDK
- Unbxd Commerce Search
- Integrating Unbxd Autosuggest
- Unbxd Analytics
- Unbxd Browse
- Unbxd Recommendations
- Sample App
- Installation
- Unbxd Analytics
- Unbxd Commerce Search
- Unbxd Autosuggest
- Unbxd Browse
- Unbxd Recommendations
- Sample iOS App
- Quickstart with Unbxd Template
- Quick Integration to your site
- Detailed Guide
- Authentication
- Types of Pages to Render
- Configuring the Page
- Instance Methods
- More Information
- Available Configurations
- Libraries
- QuickStart
- Authentication
- Configuring Autosuggest
- Sample Options Object
- Handlebar Functions
- List of Configs
- Search Template
- Loader Config
- Facet Config
- Pagination
- Spellcheck
- Sort Config
- PageSize Config
- Breadcrumb Config
- Product Views
- Variants
- Quick Integration with Unbxd template
- Quick Integration to your site
- Installation
- Authentication
- Types of pages to render
- Configuring the page
- PageSize Config
- More Info
- Endpoint
- Authentication
- Headers
- Request Parameters
- API Response
- Response Components
- Create an Unbxd Account
- Create an Unbxd Site
- Upload a Catalog
- Setup Search
- Integrate Search
- Create an Unbxd Account
- Create an Unbxd Site
- Upload a Catalog
- Setup Search
- Integrate Search
- Plugin Installation
- Configuration
- Uninstallation
- Test Plugin Installation
- Installation
- Authentication
- Catalog
- Catalog Sync
- Product Integration
- Custom Template
- Indexing Queue View
- Feed View
- Upgrade
- Uninstall
- Installation
- Authentication
- Catalog
- Cron Job
- Product Config
- Uninstall
- Installation
- Configuration
Autosuggest API
The Autosuggest feature provides query suggestions which delivers faster results to your visitors on your site. Unbxd supports autocompleting search queries and showcasing products relevant to query as they type. Usually, this feature comes in-built with the Unbxd Search, but you can also implement Unbxd Autosuggest as a standalone feature in your site. With Autosuggest, your visitors can search their intended products directly from your site’s search bar.
Autosuggest Endpoint
With Autosuggest, your visitors can easily search products directly from your site’s search bar.
Method: GET
Endpoint: https://search.unbxd.io/yourapikey/yoursitekey/autosuggest?
Sample Request
To integrate Unbxd Autosuggest, you need to make the below API call to Unbxd servers:
https://search.unbxd.io/yourapikey/yoursitekey/autosuggest?q=<value>&version=V2&inFields.count=<value>&popularProducts.count=<value>&keywordSuggestions.count=<value>&topQueries.count=<value>&promotedSuggestion.count=<value>&popularProducts.fields=<comma separated list of fields>&variants=<true|false>&filter=<filter_query>
Request Parameters
The table below describes the different API parameters for an autosuggest API call.
Parameter | Description |
inFields.count | Defines number of autosuggest results with doctype IN_FIELD. The default value is 2. |
popularProducts.count | Defines number of autosuggest results with doctype POPULAR_PRODUCTS. The default value is 3. |
keywordSuggestions.count | Defines the number of autosuggest results with doctype KEYWORD_SUGGESTION. The default value is 2. |
topQueries.count | Defines number of autosuggest results with doctype TOP_QUERIES. The default value is 2. |
popularProducts.fields | Returns the fields required for popular products. |
promotedSuggestion.count | Defines the number of autosuggest results with doctype PROMOTED_SUGGESTION. The default value is 2. |
popularProducts.filter | Restrict the Popular Products based on criteria passed (using field name). This applies to only popularProducts in the Autosuggest API response and works similar to the “filter” request parameter for Search and Browse API |
popularProducts.filter-id | Restrict the Popular Products based on criteria passed (using field ID). This applies to only popularProducts in the Autosuggest API response and works similar to the “filter-id” request parameter for Search and Browse API |
filter | Restrict the products based on criteria passed (using field-name). |
spellcheck | Enables spellcheck in autosuggest. When spellcheck=true parameter is passed in the autosuggest API, it returns did-you-mean block with spellcheck suggestion same as the search API. (default=false) |
version | Version of the API. Passing “version” parameter is mandatory in the API. However, V1 is deprecated, please ensure that every API call has “version=V2”. |
variants | Enables or disables variants in the API response. (default=false) |
Response Parameters
Unbxd returns the list of products which match the search criteria. The response would be in application/json or application/xml content type format.
The table below describes the different response keys of an autosuggest call.
Attribute Name | Type | Description |
autosuggest | String | The query string suggested by Unbxd for the autosuggest |
doctype | Enum | The type of autosuggest. Possible values are “POPULAR_PRODUCTS”, “TOP_SEARCH_QUERIES”, “PROMOTED_SUGGESTION” , “IN_FIELD” , “KEYWORD_SUGGESTION” |
unbxdAutosuggestSrc | String | The field on which autosuggest string was generated. It is present only in autosuggest results with doctype IN_FIELD. |
unbxdAutosuggestScore | Float | The relevancy score given to the autosuggest strings by Unbxd. This is not meant to be used by the clients. |
uniqueId | String | The random ID created for each autosuggest string. However, in the case of popular products the uniqueId is “popularProduct_” where PRODUCT_ID is the Unique ID of the product. |
_in | List | All fields containing _in as suffix are a part of autosuggest results for which doctype is “IN_FIELD”. For example, X_in in the autosuggest response contains all the possible values of field X, which is linked to the autosuggest string. |
price | decimal | Price of the of the suggested product. This is only for Popular product. |
imageUrl | link | The URL of the suggested product’s thumbnail image. This is only for Popular product. |
productUrl | link | The URL of the suggested product. This is only for Popular product. |
- Did this answer your question?
In this Section
- To create a Query Rule
- To Edit a Query Rule
- Site Rule