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

# Semantic search contexts

`GET /contexts/semantic-search`

Vector + BM25 hybrid search over contexts. Returns relevance scores and highlights.

## Query parameters

- `q` string, required — Search query
- `limit` integer — Number of contexts to return
- `include_highlights` boolean — Include match highlights
- `workspace_filter` string, nullable — Filter by specific workspace name

## Response `200`

Successful Response

- ContextSemanticSearchResponse — Response for semantic search in contexts.
  - `results` object[] — Search results with scores
  - `search_query` string, required — The search query used
  - `search_metadata` ContextSemanticSearchMetadata, required — Metadata for semantic search.
    - `search_type` string — Type of search performed
    - `total_results` integer — Number of results
    - `vector_matches` integer — Number of vector matches
    - `mongodb_matches` integer — Number of MongoDB matches
  - `suggestions` ContextSemanticSearchSuggestions, required — Suggestions from semantic search.
    - `related_tags` string[] — Related tags
    - `workspaces` string[] — Related workspaces
    - `tips` string[] — Search tips

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/nozomio-labs/apis/nia-ai-api.md) · [All operations](https://skmtc.net/nozomio-labs/apis/nia-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nozomio-labs/nia-ai-api/versions/dbb602a3ef17/schema)
