tenant~ attribute names) when you send real requests.
Choose an Endpoint
The two search endpoints accept the same query, filter, sort, paging, facet, and Merchandizing parameters. They differ in what they return and in how page size limits apply (see Page Size Limits):
siteSearchreturns only the fields you request, so responses stay small. It uses the keyword search page size limit whether or not you passquery.searchruns as a keyword search when you pass aqueryvalue, and as a listing (browse) request when you do not. The page size limit depends on which one it is.
Core Parameters
query
The shopper’s search terms. Whenquery is present, Kibo applies your search settings, synonyms, spell correction, and search term redirects.
searchRedirect URL and no product results. Send the shopper to that URL.
filter
A filter expression that limits results, using the same operators as other Kibo APIs:eq, ne, gt, ge, lt, le, sw, cont, in[...], between[...], and and/or with parentheses for grouping. Custom attributes use their fully qualified name, such as tenant~color.
locationsInStock filter, see Sorting and Filtering APIs and Product Storefront Location Filter.
Use filter for conditions your page sets (such as the current category). Use facetValueFilter for values the shopper picks from the facet list, so the facet keeps showing the other values the shopper can add.
sortBy
A field name followed byasc or desc, for example sortBy=price desc or sortBy=createDate desc. Separate multiple sorts with commas. If you omit sortBy, Kibo uses its default ordering, including any Merchandizing rule that applies.
Passing sortBy turns off Merchandizing rule matching for that request, including a rule you name with merchandizingRuleCode. See Merchandizing Rules.
Paging with startIndex and pageSize
startIndex is the zero-based offset of the first result. pageSize is the number of results to return. To show page 3 with 24 products per page:
totalCount, startIndex, pageSize, and pageCount for building pagination controls.
Deep paging with cursorMark
To walk through a large result set, such as when exporting every product in a category, usecursorMark instead of startIndex:
- Send the first request with
cursorMark=*. - Read
nextCursorMarkfrom the response. - Send the same request again with
cursorMarkset to that value. - Stop when the response has no
nextCursorMark.
cursorMark works on both siteSearch and search.
Page Size Limits
The 10,000 maximum for keyword searches is a tenant setting. Kibo can raise or lower it for your tenant with the
search-sitesearch-pagesize-limit tenant attribute. Contact Kibo Support to change it.
Large pages are slower to build and return. For storefront pages, keep pageSize close to the number of products you display. For exports, use cursorMark with a moderate page size.
Facets
Facets let shoppers narrow results by category, price, brand, or any attribute that is set up for faceting in the search schema. The same request that returns products also returns afacets array, so you do not need a separate call.
Each facet in the response has a label, a field, a facetType, and a values array. Each value has a label, a value, a count, an isApplied flag, and a filterValue. Category facets also include childrenFacetValues.
facetTemplate
Loads the facets configured in the Admin for a category (see Facets). The format iscategoryCode:{code} or categoryId:{id}.
categoryCode:_root. This loads the root template, which holds the facets configured for search results.
facet
A comma-separated list of extra fields to facet on, in addition to the template. Use the attribute’s fully qualified name for custom attributes.omitNamespace=true to pass and receive attribute names without the tenant~ prefix.
facetTemplateSubset and facetTemplateExclude
Both take a comma-separated list of facet field names from the template:facetTemplateSubsetreturns only the listed facets.facetTemplateExcludereturns every template facet except the listed ones.
facetTemplateExclude and ignores facetTemplateSubset.
Apply a Facet Value
When a shopper selects a facet value, pass that value’sfilterValue from the response in facetValueFilter. The format is field:value. Separate multiple values with commas.
isApplied: true.
Range Facets and facetFieldRangeQuery
A range facet groups numeric values, such as price, into buckets. Ranges set up in the facet template are used automatically. To build a range facet on the fly, passfacetFieldRangeQuery with one or more field:[start TO end] ranges. Use * for an open end.
facetValueFilter. The range does not have to match one of the defined buckets, so you can support a price slider:
Category Facets: facetHierValue and facetHierDepth
The category facet is hierarchical. Two parameters control which part of the category tree it returns:facetHierValuesets the category to start from, ascategoryCode:{code}orcategoryId:{id}. The facet then returns that category and its subcategories instead of the whole tree. UsecategoryCode:_rootto start from the top of the tree.facetHierDepthlimits how many levels of subcategories are returned, ascategoryCode:{levels}orcategoryId:{levels}. With0, only the starting category is returned. With1, its direct subcategories are included.
categoryCode or categoryId) as the category facet in your template.
Facet Value Sort and Prefix
facetValueSortsorts the values of a facet, asfield:sortType. Valid sort types areCountAscending,CountDescending,ValuesAscending,ValuesDescending,AttributeDefinition,AttributeDefinitionDescending,Count, andIndex. Facets from a template use the sort set in the template. The default for other facets isCountDescending.facetPrefixreturns only values that start with a prefix, asfield:prefix.
Spell Correction
When spell correction is turned on in your search configuration, keyword searches can correct misspelled queries:- Autocorrect: if the query returns no results and a correction exists, Kibo runs the corrected query instead. The response
spellcheckobject hasautoCorrected: true, theoriginalQuery, and thecorrectedQuery. - Did you mean: the response
spellcheck.candidateCorrectionslists suggested queries you can offer to the shopper.
spellcorrectOverride to turn these off for a single request:
Merchandizing Rules
Merchandizing rules boost, bury, pin, or block products for a search term or category. Kibo picks the matching rule for you:- For a keyword search, Kibo matches the rule by the
queryvalue. - For a request without a
queryvalue, Kibo matches the rule by category whenfilterlimits results to a single category.
merchandizingRuleCode:
sortBy value. The named rule also needs a search term or a single-category filter on the request. When a Merchandizing rule applies, personalization ranking is not applied to that request.
Choose the Response Fields
fieldList (siteSearch)
siteSearch returns only productCode for each item unless you list more fields in fieldList. Common fields include productName, priceL, priceH, productImageUrls, categoryCode, productShortDescription, and custom attribute names. See Site Search API for more examples.
responseFields
responseFields trims the JSON response on any Kibo API, including both search endpoints. For example, responseFields=totalCount,items(productCode,content(productName)),facets on search. See Limit Data Returned from API Calls for the syntax.
Worked Examples
Keyword Search Results Page
Category Listing Page with a Selected Facet and Sort
Price Slider
In Stock at a Store
Export Every Product in a Category
cursorMark set to each nextCursorMark until the response has none.

