> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseplate.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Documents

> Full text search for documents in a dataset. Based on keywords in the query.

### Path Parameters

<ParamField path="id" type="string" required>
  Dataset ID
</ParamField>

### Header

<ParamField path="Authorization" type="string">
  Baseplate API key. Must be in the format "Bearer \$BASEPLATE\_API\_KEY"
</ParamField>

### Body Parameters

<ParamField body="query" type="string" required>
  Query string
</ParamField>

<ParamField body="top_k" type="number" default="3">
  Number of closest matches
</ParamField>

### Responses

<Tab title="🟢 200: OK">
  ```json theme={null}
  {
      "results": [
          {
              "document_id": "fc74e81e-05ac-4df6-936f-ce51cc69a868",
              "dataset_id": "e2fa7f7b-d580-4ecf-8232-a1131938a3fc",
              "content": "",
              "filename": "example.pdf",
              "url": "/928f94ee-4c7c-451a-bf3c-f1baa08c67b0/example.pdf",
              "similarity": 0.0919062
          }
      ]
  }
  ```
</Tab>
