---
title: "Search for concepts in the terminology"
method: POST
path: "/terminology/v1/vocabularies/{vocabularyKey}/concepts/query"
tags: ["Vocabularies"]
---

# Search for concepts in the terminology

`POST /terminology/v1/vocabularies/{vocabularyKey}/concepts/query`

Search for concepts in the terminology.

## Path parameters

- `vocabularyKey` string, required

## Request body

- V1SearchParameters
  - `filter` union
    - object
      - `id` string
      - `and` V1Operator[], required
    - object
      - `id` string
      - `or` V1Operator[], required
    - object
      - `id` string
      - `all` object, required
    - object
      - `id` string
      - `any` object, required
    - object
      - `id` string
      - `composite` object, required
    - object
      - `id` string
      - `eq` object, required
    - object
      - `id` string
      - `knn` object, required
    - object
      - `id` string
      - `geoDistance` object, required
    - object
      - `id` string
      - `gt` object, required
    - object
      - `id` string
      - `lt` object, required
    - object
      - `id` string
      - `match` object, required
    - object
      - `id` string
      - `not` V1Operator, required — recursive
  - `query` union
    - object
      - `id` string
      - `and` V1Operator[], required
    - object
      - `id` string
      - `or` V1Operator[], required
    - object
      - `id` string
      - `all` object, required
    - object
      - `id` string
      - `any` object, required
    - object
      - `id` string
      - `composite` object, required
    - object
      - `id` string
      - `eq` object, required
    - object
      - `id` string
      - `knn` object, required
    - object
      - `id` string
      - `geoDistance` object, required
    - object
      - `id` string
      - `gt` object, required
    - object
      - `id` string
      - `lt` object, required
    - object
      - `id` string
      - `match` object, required
    - object
      - `id` string
      - `not` V1Operator, required — recursive
  - `highlighting` string[]
  - `page` integer
  - `perPage` integer
  - `sort` V1Sort
    - `direction` 'DESC' | 'ASC'
    - `path` string, required
  - `ranking` union
    - object
      - `type` 'DEFAULT' | 'SEMANTIC', required
    - object
      - `type` 'DEFAULT' | 'SEMANTIC', required
      - `query` string, required
      - `path` string, required
      - `modelId` string, required
  - `aggregations` V1Aggregation[]
    - `type` 'LEXICAL', required
    - `path` string, required — The path of the property to aggregate.
    - `prefix` string — The prefix is an optional query to filter the values to aggregate (e.g. 'mont' would match 'montreal', 'Montecarlo', etc.).
    - `size` integer — The maximum number of unique values to return in the aggregation.
  - `traversedProperties` string[] — The properties from the relationships or adjacent records that will be returned in the search response. The wildcard '*' can be used in itself or in combination with a prefix - `*` will return all traversed properties. - `@worksAt.*` will return all traversed properties from the relationship 'worksAt'. - `@worksAt.@clinic.*` will return all traversed properties from an adjacent 'clinic' connected with a 'worksAt' relationship.

## Response `200`

A successful response.

- V1QueryResponse
  - `hits` V1Hit[], required
    - `hitType` 'RESOURCE' | 'RELATIONSHIP' | 'OBJECT' | 'CONCEPT' | 'PIPELINE_EXECUTION' | 'RESOLUTION_QUEUED_ITEM', required
    - `score` number, double, required — The score of the hit in the search results, indicating its relevance.
    - `resource` object, required
    - `traversedProperties` unknown
    - `highlighting` unknown
  - `meta` V1QueryResponseMeta, required
    - `numPages` integer, required
    - `page` integer, required
    - `perPage` integer, required
    - `total` integer, required
    - `filter` union
      - object
        - `id` string
        - `and` V1Operator[], required
      - object
        - `id` string
        - `or` V1Operator[], required
      - object
        - `id` string
        - `all` object, required
      - object
        - `id` string
        - `any` object, required
      - object
        - `id` string
        - `composite` object, required
      - object
        - `id` string
        - `eq` object, required
      - object
        - `id` string
        - `knn` object, required
      - object
        - `id` string
        - `geoDistance` object, required
      - object
        - `id` string
        - `gt` object, required
      - object
        - `id` string
        - `lt` object, required
      - object
        - `id` string
        - `match` object, required
      - object
        - `id` string
        - `not` V1Operator, required — recursive
  - `aggregates` V1Aggregate[], required
    - `type` 'LEXICAL', required
    - `path` string, required — The path of the property to aggregate.
    - `aggregate` V1LexicalAggregateItem[], required
      - `value` string, required
      - `count` integer, required

## Other responses

- `400` — Returned when the request is malformed or invalid.
- `404` — Returned when the vocabulary does not exist.
- `413` — Returned when the payload exceeds the max content size (100kB).

---

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