---
title: "Search Documents"
method: GET
path: "/v1/document/"
tags: ["Documents"]
---

# Search Documents

`GET /v1/document/`

Search for documents that match the provided search terms.

Keywords are searched for in the _name_, _full_path_, _user first name_, and _user last name_ fields.

Note that the `id` field in the search results refers to a document ID or a directory ID depending on the `node_type` attribute.

## Query parameters

- `query` string, nullable
- `skip` integer, nullable
- `limit` integer, nullable
- `sort_direction` 'asc' | 'desc' — Direction to sort the `sort_column` - ascending or descending.
- `date_start` string, date-time, nullable
- `date_cut_off` string, date-time, nullable
- `sort_column` 'updated_at' | 'created_at' | 'full_path' | 'id' — Sort columns for document search.
- `directory_id` integer, nullable
- `is_trashed` boolean, nullable
- `is_offline` boolean, nullable
- `is_recursive` boolean

## Response `200`

Successful Response

- ApiGenericListResponseDocumentSearchModel
  - `error` boolean — A boolean error indicator.
  - `message` string, nullable — Optional message.
  - `data` DocumentSearchModel[], nullable — The response data for any given request.
    - `id` integer, required
    - `fullPath` string, nullable
    - `name` string, nullable
    - `isTrashed` boolean, nullable
    - `isOffline` boolean, nullable
    - `directoryId` integer, nullable
    - `nodeType` string, required
    - `uploadedUserFirstName` string, nullable
    - `uploadedUserLastName` string, nullable
    - `companyId` integer, required
    - `embeddingsDocumentId` integer, nullable
    - `processingStatus` string, nullable
    - `totalPages` integer, nullable
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400` — Business Logic Error
- `403` — Permission Error
- `404` — Records Not Found
- `409` — Integrity Error or Data Conflict
- `422` — Validation Error

---

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