Skip to main content
POST
/
api
/
v1
/
vault
/
semantic_search
Semantic search over a vault project
curl --request POST \
  --url https://api.harvey.ai/api/v1/vault/semantic_search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "query": "<string>",
  "include_file_names": false
}
'
{
  "status": "COMPLETED",
  "data": {
    "file_ids": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "chunks": [
      {
        "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "text": "<string>",
        "chunk_id": "<string>",
        "chunk_idx": 123,
        "page_number": 123,
        "start_idx": 123,
        "end_idx": 123,
        "file_name": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for semantic search over a vault project. Returns relevant document chunks for the query; clients can pass these chunks to their own LLM. Access requires Vault API permission; contact Harvey for permissioning needs.

project_id
string<uuid>
required

UUID of the vault project to search in

query
string
required

Natural language search query.

Minimum string length: 1
include_file_names
boolean
default:false

When true, each chunk in the response includes a file_name field (display name of the source file, or null if the file was deleted after indexing). Omit or set to false for backward compatibility.

Response

Search completed successfully

Response from semantic search

status
enum<string>
required

Status of the operation

Available options:
COMPLETED
data
object
required