# Search API schemas

> Current Froomle documentation · [View canonical page](https://docs.froomle.com/froomle-doc-main/v2/api_reference/search/schemas.html)

<a id="_search_api_schemas"></a>

## Search API schemas

<a id="_search_item"></a>

### Item

One content item returned by the Search API.

| Name | Description | Schema |
| --- | --- | --- |
| **information\_field**<br>_required_ | Optional metadata field configured per customer. | string |
| **item\_id**<br>_required_ | Identifier of the item in your catalog. | string |
| **type**<br>_required_ | Document type of the returned object. | string |

<a id="_searchrequest"></a>

### SearchRequest

Specification of a search request body.

| Name | Description | Schema |
| --- | --- | --- |
| **autocorrect**<br>_optional_ | Whether the query should be autocorrected (default: `true`). | boolean |
| **filter\_by**<br>_optional_ | Filters that limit which items can appear. | [Filter](https://docs.froomle.com/froomle-doc-main/v2/api_reference/search/schemas.html#_search_filter) |
| **group\_by**<br>_optional_ | Fields used to split results into multiple lists (default: `[]`). | < string > array |
| **limit**<br>_optional_ | Number of items returned per list (default: `4`). | integer |
| **list\_size**<br>_optional_ | Number of items cached per list for later retrieval (default: `100`). | integer |
| **num\_lists**<br>_optional_ | Number of lists requested (default: `4`). | integer |
| **q**<br>_required_ | The search query typed by the user. | string |
| **page\_type**<br>_required_ | Page or surface for which the request is made. | string |
| **channel**<br>_optional_ | Channel identifier (e.g., web, iOS, Android). | string |
| **user\_id**<br>_optional_ | Logged-in user identifier. | string |
| **device\_id**<br>_required_ | Identifier for anonymous users or devices. | string |
| **histories**<br>_optional_ | Behavioral histories that improve personalization. | [Histories](https://docs.froomle.com/froomle-doc-main/v2/api_reference/search/schemas.html#_search_histories) |

<a id="_searchresults"></a>

### SearchResults

Response returned by the search endpoints.

| Name | Description | Schema |
| --- | --- | --- |
| **auto\_suggest**<br>_optional_ | Alternative query if autocorrect was triggered. | string |
| **lists**<br>_required_ | Grouped search results. | < [List](https://docs.froomle.com/froomle-doc-main/v2/api_reference/search/schemas.html#_search_list) > array |
| **num\_lists**<br>_required_ | Number of lists that were requested. | integer |
| **perfect\_match**<br>_optional_ | Exact match for the query, if available. | [Item](https://docs.froomle.com/froomle-doc-main/v2/api_reference/search/schemas.html#_search_item) |
| **request\_id**<br>_required_ | Identifier of the request to log alongside events. | string |
| **user\_group**<br>_optional_ | Experiment group the user belongs to. | string |

<a id="_completionrequest"></a>

### CompletionRequest

Body accepted by the advanced completions endpoint.

| Name | Description | Schema |
| --- | --- | --- |
| **fuzziness**<br>_optional_ | Maximum edit distance when matching queries (default: `0`). | integer |
| **filter\_by**<br>_optional_ | Filters applied before generating completions. | [Filter](https://docs.froomle.com/froomle-doc-main/v2/api_reference/search/schemas.html#_search_filter) |
| **q**<br>_optional_ | Partial query string. | string |
| **user\_id**<br>_optional_ | User identifier. | string |
| **device\_id**<br>_optional_ | Device identifier. | string |
| **histories**<br>_optional_ | Interaction histories used to personalize results. | [Histories](https://docs.froomle.com/froomle-doc-main/v2/api_reference/search/schemas.html#_search_histories) |

<a id="_completion"></a>

### Completion

Payload returned by the completions endpoints.

| Name | Description | Schema |
| --- | --- | --- |
| **completions**<br>_required_ | List of suggested terms. | < [Item](https://docs.froomle.com/froomle-doc-main/v2/api_reference/search/schemas.html#_search_item) > array |
| **request\_id**<br>_required_ | Identifier of the completion request. | integer |
| **user\_group**<br>_optional_ | Experiment group the user belongs to. | string |
