---
title: "Search for documents"
method: POST
path: "/api/v0/documents/search"
tags: ["Documents"]
---

# Search for documents

`POST /api/v0/documents/search`

Searches for documents based on the provided query and optional filters.

## Request body

- DocumentSearchRequest
  - `query` string, required — The query to search for
  - `folder_id` string, uuid, nullable — The ID of the folder to search in
  - `tag_name` string, nullable — The name of the tag to search for
  - `owner_id` string, uuid, nullable — The ID of the owner to search for

## Response `200`

Successful Response

- DocumentSearchPostResponse
  - `job_status_id` string, uuid, required — The ID of the job status.
  - `search_id` string, uuid, required — The ID of the search.
  - `status` string, required — The status of the job. Options: `pending`, `done`, `error`.
  - `error_message` string, nullable, required — The error message if the job failed.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) · [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/outerport/outerport-api/revisions/f565b46daaea/schema)
