Search API Discovery service REST endpoints for product search, autocomplete, and visual search
The Discovery service is the primary search API for MXP. All endpoints are served from the Discovery pod (default port 8080).
Method Path Description POST/searchMulti-stage semantic/full-text product search GET/searchSearch via query string (browser-friendly, hidden from Swagger) POST/vector-searchDense-embedding approximate nearest-neighbour search POST/images/searchVisual search — upload an image to find visually similar products
Method Path Description GET/itemsList products in the catalog for a tenant GET/item/{id}Fetch a single product by ID
Method Path Description GET/suggestionsRanked autocomplete suggestions by query prefix
Method Path Description POST/recommendationsProduct recommendations (proxied to Recommendation System)
Method Path Description POST/categoriesBrowse categories for a tenant POST/categories/levelsCategory tree by level
Method Path Description GET/tenantsList available tenant identifiers
Executes the full multi-stage pipeline: QUS semantic parsing → merchandising rules → staged Elasticsearch search → facet calculation → optional Google Retail fallback.
{
"query" : "blue running shoes" ,
"tenant" : "my-tenant" ,
"size" : 20 ,
"from" : 0 ,
"filters" : [{ "field" : "brand" , "value" : "Nike" }],
"facets" : [ "brand" , "color" , "price" ],
"sort" : "relevance"
}
Field Type Required Description querystring Yes Natural language search query tenantstring Yes Tenant identifier (must match a GCS config directory) sizeinteger No Number of results to return (default: 20) frominteger No Pagination offset (default: 0) filtersarray No Pre-applied field filters facetsarray No Facets to compute and return sortstring No relevance (default), price_asc, price_desc
{
"products" : [
{
"id" : "SKU-12345" ,
"title" : "Nike Air Zoom Pegasus 40" ,
"price" : 130.00 ,
"brand" : "Nike" ,
"color" : "Blue" ,
"score" : 0.987
}
],
"total" : 142 ,
"facets" : {
"brand" : [{ "value" : "Nike" , "count" : 34 }],
"color" : [{ "value" : "Blue" , "count" : 17 }]
},
"queryGraph" : { ... }
}
Encodes the query string into a dense embedding vector and performs approximate nearest-neighbour search against pre-indexed product embeddings.
Requires the Vector Search service to be running and configured.
Same structure as POST /search. The query field is converted to a dense vector via the configured ML provider (AWS Bedrock Titan/Claude or Google Gemini).
Accepts a multipart image upload and returns visually similar products.
Field Type Description filebinary Product image (JPEG or PNG) tenantstring Tenant identifier (query param)
Returns ranked autocomplete suggestions for a query prefix.
Parameter Type Required Description qStrstring Yes Query prefix (must not be blank) tenantstring No Tenant identifier (defaults to default)
[
{ "suggestion" : "jeans" , "type" : "query" },
{ "suggestion" : "jeans slim fit" , "type" : "query" },
{ "suggestion" : "jean jacket" , "type" : "query" }
]