- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Performs a search.
This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.
HTTP request
POST https://retail.googleapis.com/v2beta/{placement=projects/*/locations/*/catalogs/*/placements/*}:search
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
placement |
Required. The resource name of the Retail Search serving config, such as |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "branch": string, "query": string, "visitorId": string, "userInfo": { object ( |
| Fields | |
|---|---|
branch |
The branch resource name, such as Use "default_branch" as the branch ID or leave this field empty, to search products under the default branch. |
query |
Raw search query. If this field is empty, the request is considered a category browsing request and returned results are based on |
visitorId |
Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This should be the same identifier as The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
userInfo |
User information. |
pageSize |
Maximum number of If this field is negative, an INVALID_ARGUMENT is returned. |
pageToken |
A page token When paginating, all other parameters provided to |
offset |
A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the If this field is negative, an INVALID_ARGUMENT is returned. |
filter |
The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. Filter expression is case-sensitive. For more information, see Filter. If this field is unrecognizable, an INVALID_ARGUMENT is returned. |
canonicalFilter |
The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see |
orderBy |
|