---
title: "Semantic code search"
method: GET
path: "/search/semantic"
tags: ["search"]
---

# Semantic code search

`GET /search/semantic`

Search code snippets using semantic similarity

## Query parameters

- `query` string, required
- `language` string
- `repository_id` integer
- `limit` integer

## Response `200`

OK

- DtoSearchResponse
  - `data` DtoSnippetData[]
    - `attributes` DtoSnippetAttributes
      - `content` DtoSnippetContentSchema
        - `end_line` integer
        - `language` string
        - `page` integer
        - `start_line` integer
        - `value` string
      - `created_at` string
      - `enrichments` DtoEnrichmentSchema[]
        - `content` string
        - `type` string
      - `original_scores` number[]
      - `updated_at` string
    - `id` string
    - `links` DtoSnippetLinks
      - `commit` string
      - `file` string
      - `repository` string
    - `type` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

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