Search API
POSTOverview
Section titled “Overview”The POST search endpoint is designed for advanced use cases where filters need complex nested boolean logic or where the request body would become too large for URL parameters alone.
Request parameters
Section titled “Request parameters”The POST endpoint uses a hybrid approach: standard identification parameters stay in the URL, while the complex boolean logic is sent in the JSON body.
URL parameters
Section titled “URL parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
tracker_id | string | ✓ | Your unique Luigi’s Box tracker identifier. |
q | string | The user’s search query. | |
size | integer | Number of hits to return. Default: 10. | |
page | integer | Result page number. Default: 1. |
Request body
Section titled “Request body”| Parameter | Type | Required | Description |
|---|---|---|---|
filters | object | ✓ | Structured boolean filter definition. Each top-level key is a content type such as item, and the value can contain nested and, or, and not arrays made of filter objects. |
Request headers
Section titled “Request headers”| Header | Value | Required | Description |
|---|---|---|---|
Accept-Encoding | gzip, deflate | Recommended | Enables compressed responses. |
Content-Type | application/json | ✓ | Indicates that the request body is JSON. |
Request construction
Section titled “Request construction”Execute a POST request with Content-Type: application/json.
- Keep
tracker_id,q, pagination, and other standard request parameters in the query string. - Put only the complex
filtersobject into the JSON payload. - Use nested
and,or, andnotarrays when you need logic that cannot be expressed comfortably with repeatedf[]values.
HTTP Response
Section titled “HTTP Response”The response structure matches the GET /search endpoint and contains top-level results and next_page fields.
Results fields
Section titled “Results fields”| Field | Description |
|---|---|
query | Requested query string. |
corrected_query | Query correction markup when the query was altered. |
total_hits | Total number of hits for the requested type. |
hits | Result objects for the requested type. |
facets | Facets and their counts. |
filters | Filters applied to the results. |
quicksearch_hits | Results for secondary types requested via quicksearch_types. |
suggested_facet | Optional facet suggested for narrowing the result set. |
suggested_url | Optional redirect URL for direct-match or fixit behavior. |
campaigns | Banner campaigns associated with the query. |
Hit fields
Section titled “Hit fields”| Field | Description |
|---|---|
url | Unique identifier of the result object. |
attributes | Catalog fields stored for the hit, such as title, brand, or price. |
pinned | Present when the result was added by customization. |
type | Result type, for example item. |
nested | Nested objects associated with the hit, such as variants. |
Error handling
Section titled “Error handling”The API uses standard HTTP status codes to indicate success or failure. The POST search endpoint accepts the same query parameters as the GET endpoint, so all parameter validation errors from the Search API (GET) apply here as well.
| HTTP Status | Description |
|---|---|
200 OK | The request succeeded and results are returned. |
400 Bad Request | The request was malformed — missing parameters or invalid JSON body. |
404 Not Found | The tracker_id does not match any known catalog. |
500 Server Error | Internal error. If persistent, contact support. |
504 Gateway Timeout | The request took too long to process. Retrying may succeed. |
Was this page helpful?
Thanks.