---
title: "Perform semantic search"
method: POST
path: "/semantic-search"
tags: ["Semantic Search"]
---

# Perform semantic search

`POST /semantic-search`

## Request body

- SemanticSearchRequest
  - `workspaceId` string, required
  - `query` string, required

## Response `200`

response

- union
  - SemanticSearchResponse
    - `workspaceId` string, required
    - `engine` string, required
    - `queryLanguage` string
    - `supportedLanguages` string[]
    - `detectedLanguages` string[]
    - `items` SemanticSearchItem[], required
      - `sources` string[]
      - `chunkId` string
      - `workspaceId` string
      - `documentId` string
      - `documentSubId` string
      - `documentType` string
      - `documentSubType` string
      - `path` string
      - `language` string
      - `title` string
      - `content` string
      - `contentComplement` string
      - `vectorSearchScore` number
      - `keywordSearchScore` number
      - `score` number
    - `vectorSearchMetric` string
    - `vectorSearchItems` SemanticSearchItem[]
      - `sources` string[]
      - `chunkId` string
      - `workspaceId` string
      - `documentId` string
      - `documentSubId` string
      - `documentType` string
      - `documentSubType` string
      - `path` string
      - `language` string
      - `title` string
      - `content` string
      - `contentComplement` string
      - `vectorSearchScore` number
      - `keywordSearchScore` number
      - `score` number
    - `keywordSearchItems` SemanticSearchItem[]
      - `sources` string[]
      - `chunkId` string
      - `workspaceId` string
      - `documentId` string
      - `documentSubId` string
      - `documentType` string
      - `documentSubType` string
      - `path` string
      - `language` string
      - `title` string
      - `content` string
      - `contentComplement` string
      - `vectorSearchScore` number
      - `keywordSearchScore` number
      - `score` number
  - Error
    - `error` boolean
    - `message` string[]

---

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