---
title: "Search documents"
method: POST
path: "/v1/documents/search"
tags: ["Documents"]
---

# Search documents

`POST /v1/documents/search`

Searches across the content of documents ingested into Metal, ranked by relevance.

## Request body

- SearchRequest
  - `query` string, required — The search query.
  - `page` integer — Page number, starting at 1.
  - `limit` integer — Results per page.

## Response `200`

Ranked document results.

- object
  - `data` Document[]
    - `id` string
    - `name` string
    - `type` string — The classified document type.
    - `companyId` string — The company the document is attached to, if any.
    - `dealId` string — The deal the document is attached to, if any.
    - `createdAt` string, date-time
  - `metadata` PaginationMetadata — Pagination details returned by search endpoints.
    - `page` integer
    - `limit` integer
    - `totalCount` integer
    - `totalPages` integer

## Other responses

- `401` — Missing or invalid API key credentials.

---

[API](https://skmtc.net/metal/apis/metal-api.md) · [All operations](https://skmtc.net/metal/apis/metal-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metal/metal-api/revisions/afb7b675d5b2/schema)
