Alokai

findItemsByKeyword

Search product items by the search term (text) with the pagination input and the optional queryHint (see QueryHintInput for detail)

This method sends a GET request to the search endpoint of the Vue Storefront API Middleware. In turn, it receives data from the Bloomreach GraphQL Commerce API using findItemsByKeyword query.

Signature

declare function findItemsByKeyword(
	params: QueryParams<QueryFindItemsByKeywordArgs>
): Promise<ItemsPageResult>;

Parameters

NameRequiredTypeDescription
paramsRequiredQueryParams<QueryFindItemsByKeywordArgs>Check the type for more information

Returns

List of matching items

Referenced Types

Examples

Getting products by keyword

const data = await sdk.brd.findItemsByKeyword({
  text: 'Greenlee'
});
data.items // matching products

Getting products by keyword

const data = await sdk.brd.findItemsByKeyword({
  text: 'Greenlee',
  expect: `items { displayName }`
});
data.items // matching products

On this page