---
title: "Search for documents"
method: GET
path: "/search-api/v1/search/{tenant}"
tags: ["search"]
---

# Search for documents

`GET /search-api/v1/search/{tenant}`

Runs a search request for a certain tenant. The tenant should exist at the service and linked to a certain index in the backend. Different tenants may use the same index.

## Path parameters

- `tenant` string, required

## Query parameters

- `searchQuery` SearchQuery, required
  - `limit` integer — The amount of products to return in the result
  - `offset` integer — The amount of products to omit from the whole result to select the returned results.
  - `q` string — the user query
  - `sort` string — Full sorting parameter value. This is the name of the sorting and optionally a dash as prefix, thats means the sorting should be descending. Several sorting criterion can be defined by separating the values using comma.
  - `withFacets` boolean — flag to specify if facets should be returned with the requested response. Should be set to false in case only the next batch of hits is requested (e.g. for endless scrolling).
- `filters` object

## Response `200`

successful found results

## Other responses

- `204` — Optional response code that represents 'no result'
- `403` — tenant can't be accessed or does not exist
- `404` — response code if tenant is unknown or index does not exist

## Changes

- **2025-02-20** `212ade7befc9` — 2 info
  - added `subschema #13` to the `slices/items/hits/items/document/data/additionalProperties/` response property `anyOf` list for the response status `200`
  - added `subschema #13` to the `slices/items/hits/items/document/data/additionalProperties/` response property `anyOf` list for the response status `204`
- **2025-02-20** `1a39d9b9db36` — 2 info
  - added `#/components/schemas/Category, subschema #7, subschema #8, subschema #9, subschema #10, subschema #11, subschema #12` to the `slices/items/hits/items/document/data/additionalProperties/` response property `anyOf` list for the response status `200`
  - added `#/components/schemas/Category, subschema #7, subschema #8, subschema #9, subschema #10, subschema #11, subschema #12` to the `slices/items/hits/items/document/data/additionalProperties/` response property `anyOf` list for the response status `204`
- **2024-10-25** `3452e6f497c9` — 2 breaking
  - the `slices/items/hits/items/document/categories` response's property type/format changed from `array`/`` to ``/`` for status `200`
  - the `slices/items/hits/items/document/categories` response's property type/format changed from `array`/`` to ``/`` for status `204`
- …earlier changes not shown

[Full history](https://skmtc.dev/commerceexperts/apis/open-commerce-search-stack-api/changes/search-api/v1/search/:tenant/get.md)

---

[API](https://skmtc.dev/commerceexperts/apis/open-commerce-search-stack-api.md) · [All operations](https://skmtc.dev/commerceexperts/apis/open-commerce-search-stack-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/commerceexperts/open-commerce-search-stack-api/revisions/456d21198a04/schema)
