Search API Routes
Search the indexes that your application exposes to the storefront.
An index is only searchable through these API routes once it's allowed with the configureStoreSearch middleware.
POST /store/search#
Search Indexes
Search the indexes that your application exposes to the storefront. An index is only searchable through this route once it's allowed with the configureStoreSearch middleware, and a query for any other index is answered with a 404 error. Pass a single query, or a queries array to run a batch of queries in one round-trip to the search engine. For an index whose entity is product, Medusa also restricts the results to published products in the sales channels of the request's publishable API key.
Authentication: none.
Header parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
localestringOptionalen-USRequest body (application/json)
queriesobject[]OptionalThe queries to run, in the order their results are returned in.
queriesobject[]OptionalentitystringOptionalfieldsstring[]OptionalfiltersobjectOptionalThe filters to apply, including the free-text query as q.
filtersobjectOptionalpaginationobjectOptionalHow a search query's results are paginated and sorted.
paginationobjectOptionalsearch_optionsobjectOptionalThe options changing how a search query is matched, scored, and aggregated.
search_optionsobjectOptionalRequest examples
Responses
200 OK
resultsobject[]The results of the posted queries, in the order they were sent in.
resultsobject[]400, 401, 404, 409, 422, 500: an error response is returned.