---
title: "Search a dataset for records matching a given search query"
method: POST
path: "/dataset/{datasetId}/search"
tags: ["Dataset"]
---

# Search a dataset for records matching a given search query

`POST /dataset/{datasetId}/search`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/dataset/{datasetId}/search`
- Auth: HTTP bearer

## Path parameters

- `datasetId` string, required: The ID of the dataset to search

## Request body

- object
  - `search` string, required: The keyword/phrase to search for
  - `filter` DatasetFilter

## Response `200`

The search was successful

- object
  - `id` string, required: The ID of the dataset that was searched
  - `records` object[], required: An array of records matching the search query
    - `id` string, required
    - `text` string, required
    - `source` string
    - `meta` object
    - `score` number, required

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
