---
title: "Query signals"
method: POST
path: "/retail/signals/query"
tags: ["Get signals"]
---

# Query signals

`POST /retail/signals/query`

When a user enters text to search your site, a query request is generated and the information is contained in a query signal.

## Request body

- RetailQuery[]
  - `timestamp` integer, required — The event time displayed in epoch time milliseconds.
  - `visitorId` string, required — The unique identifier for the visitor (user) associated with the signal. The field is a UTF-8 encoded string with a maximum of 128 characters. Do not use personally identifiable information (PII) or user data in the value.
  - `sessionId` string, required — The unique identifier that tracks a specific session of a user's activity over a period of time.
  - `queryId` string, required — The unique identifier for the query.
  - `ipAddress` string — This optional parameter is the IP address of the browser or device that generated the signal. The IP address may be passed in the signal. If it is not passed in the signal, it is extracted from the request, and the last octet is dropped to mask the user's location for security purposes.
  - `searchTerms` string, required — The term or phrase entered in the user query that is captured in the signal.
  - `productDetails` ProductDetail[], required
    - `product` Product, required — Description, unique identifier, price, and image information about the product.
      - `productId` string, required — The unique identifier for the product. The field is a UTF-8 encoded string with a maximum of 128 characters.
      - `currencyCode` string, required — The three-letter code that defines the currency type, displayed in ISO-4217 format.
      - `price` number, double, required — The price of the product when the signal was created.
      - `title` string, required — The title of the product when the signal was created.
      - `imageuri` string, required — The canonical URL of the product image. The field is a UTF-8 encoded string with a maximum of 5000 characters.
    - `quantity` integer — Specifies the quantity of the product associated with the user interaction. This field is optional and defaults to 1 when not provided. If provided, the quantity must be at least 1.
  - `sourceId` string, required — A freeform text field used to identify where the API call originates. The value has no effect on search relevancy.
  - `uri` string, required — The canonical URL of the product's detail page. The field is a UTF-8 encoded string with a maximum of 5000 characters.

## Response `202`

ACCEPTED

## Other responses

- `400` — INVALID REQUEST

---

[API](https://skmtc.dev/lucidworks/apis/rules-rewrites-api.md) · [All operations](https://skmtc.dev/lucidworks/apis/rules-rewrites-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lucidworks/rules-rewrites-api/revisions/f2d3747848e8/schema)
