---
title: "Get search results"
slug: "get-search-results"
updated: 2024-11-21T17:06:58Z
published: 2024-11-21T17:06:58Z
canonical: "docs.xgen.ai/get-search-results"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xgen.ai/llms.txt
> Use this file to discover all available pages before exploring further.
# Get search results
Post/customers/{customerId}/users/{userId}
SecurityAPI KeyHeader parameter nameaccess_token
Access token Authentication
Path parameterscustomerIdstringRequired
userIdstringRequired
Body parametersExpand Allobject Example{
"deployment_id": "1234",
"query": "sneakers",
"collection": "us",
"page": 1,
"context": {
"gender": "female"
},
"field_sort": "price",
"field_sort_order": "asc"
}deployment_idstring
The deplyment id (which holds the attached behavior settings) to use for the search
behavior_idstring
The bahavior id to use for the search
querystring Required
The search query term
contextobject
The context object used for dynamic filtering/faceting
perform_facetingboolean
Whether to perform and return faceting results
pageinteger
The page number of results to return
use_opensearch_neural_as_primaryboolean
Setting this to true will force DeepSearch results.
collectionstring Required
The collection to search in
field_sortstring
The field to sort results by
Valid values[
"price",
"update_date"
]
field_sort_orderstring
The order to sort results by
Valid values[
"asc",
"desc"
]
Responses200
Successful response
Expand Allobject pageinteger
The page number of the results
total_resultinteger
The total number of results available
text_completionstring
When using Chat, the gateway returns the text completion which allows for a conversational mode
errorstring
When an error occurs, the gateway returns the error message
behavior_idstring
The behavior id used for the search
keywordstring
The keyword matched (if any)
messagestring
Gives details about keyword matches
url_redirectstring
The redirect URL (if any)
response_enginestring
The response engine used
sorted_bystring
The product filter used to sort the results
is_from_cacheboolean
Whether this response was retrieved from cache
is_keyword_config_appliedboolean
Whether the keyword configuration was applied
is_filter_appliedboolean
Whether a filter was applied
is_cached_filter_appliedboolean
Whether a cached filter was applied
is_url_redirectboolean
Whether this matched a URL redirect keyword
products_list Array of object (Product)
List of products
object brandstring ExampleYour brand
colorstring ExampleOrange
currencystring ExampleUSD
currency_symbolstring Example$
custom_string_1string Examplesome string 1
custom_string_2string Examplesome string 2
custom_string_3string Examplesome string 3
custom_string_4string Examplesome string 4
custom_string_5string Examplesome string 5
genderstring Examplefemale
imagestring (uri) Examplehttps://www.example.com/image.jpg
image_altstring (uri) Examplehttps://www.example.com/image-alt.jpg
is_in_stockstring Example1
is_on_salestring Example0
item_typestring Exampleadult
macroCategorystring ExampleDresses
macroColorstring ExampleOrange
microCategorystring ExampleLong Dresses
pricenumber (float) Example11500
prod_codestring Exampleabc123
prod_namestring ExampleYour Prod Name
product_types Array of string Example[
"Woman",
"Dresses",
"Long Dresses"
]string
product_urlstring (uri) Examplehttps://link-to-product.com
sale_pricenumber (float) Example11000
sizestring Example2
product_code_variant_mappingobject
Mapping of product codes to variants
search_term_matches Array of string
List of search term matches
string
user_dataobject (User)
The user object
access_tokenstring
refresh_tokenstring
expiration_datestring
session_idstring
user_idstring
The user id
user_typestring
The user type
facetobject
Facet results
400
Bad request
401
Unauthorized
403
Forbidden
500
Internal server error