Skip to content

Facet Value Search

GET
View MD

Facet Value Search lets you search inside a single facet’s values instead of searching the full catalog. It is useful when a facet contains many options and the standard facet list is not enough.

The endpoint processes facet_q against the facet given in facets and returns only matching facet values with their hit counts.

Make sure your catalog is indexed before using this endpoint. See Indexing for setup details.

ParameterDescription
tracker_idYour Luigi’s Box site identifier.
facet_qUser input used to search within facet values.
facetsName of the facet to search within, for example brand.

This endpoint supports most optional parameters from the standard Search API, which lets you keep the same search context while searching within facet values.

To get correct results, always include the user’s original q and any active f[] filters. Without the current search context, facet counts may be misleading or irrelevant.

HeaderValueRequiredDescription
Accept-Encodinggzip, deflateRecommendedEnables compressed responses.

Send a GET request to the endpoint, pass tracker_id, the facet you want to search in, the user’s facet_q, and the current search context.

For step-by-step integration guidance, see Quickstart: Search.

The response is a JSON object containing the results of the facet value search.

FieldDescription
queryOriginal search query from q.
corrected_queryCorrected query if Luigi’s Box changed it, otherwise null.
facet_value_queryQuery used to search within facet values.
filtersFilters applied to the search context.
filters_negativeNegative filters applied to the search context.
facetsRequested facet and the matching values.
FieldDescription
nameName of the facet, for example brand.
typeFacet type, for example text, float, or date.
valuesMatching facet values.
FieldDescription
valueThe facet value itself, for example Yamaha.
hits_countNumber of matching items for that value within the current search context.

The API uses standard HTTP status codes to indicate success or failure.

HTTP StatusDescription
200 OKThe request succeeded and results are returned.
400 Bad RequestThe request was malformed — missing parameters or invalid facet count.
404 Not FoundThe tracker_id does not match any known catalog.
500 Server ErrorInternal error. If persistent, contact support.
504 Gateway TimeoutThe request took too long to process. Retrying may succeed.