Search API
Semantic search
Section titled “Semantic search”POST /v1/searchSearch across all indexed repositories using natural language queries. Results are ranked by semantic similarity using Voyage AI embeddings.
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
query |
string | yes | Natural language search query |
workspace_id |
string | yes | Workspace to search within |
limit |
integer | no | Max results (default 10, max 50) |
filters |
object | no | Filter criteria |
Filters
Section titled “Filters”| Field | Type | Description |
|---|---|---|
repo_ids |
string[] | Limit to specific repositories |
file_paths |
string[] | Limit to specific file path prefixes |
languages |
string[] | Filter by programming language |
chunk_kinds |
string[] | Filter by chunk type (function, class, module, etc.) |
is_test |
boolean | Include or exclude test files |
is_exported |
boolean | Filter to exported symbols only |
Example request
Section titled “Example request”{ "query": "user authentication middleware", "workspace_id": "ws_abc123", "limit": 5, "filters": { "languages": ["java", "kotlin"], "is_test": false }}Response
Section titled “Response”{ "items": [ { "id": "chunk_001", "collection": "code_chunks", "score": 0.92, "payload": { "repo_id": "repo_xyz", "file_path": "src/main/java/com/example/AuthMiddleware.java", "chunk_kind": "function", "fqn": "com.example.AuthMiddleware.authenticate", "content": "public void authenticate(HttpRequest req) { ... }", "language": "java", "line_start": 15, "line_end": 42 } } ]}Collections
Section titled “Collections”Search covers seven vector collections:
| Collection | Content |
|---|---|
code_chunks |
Function and class bodies |
module_summaries |
AI-generated module descriptions |
pattern_matches |
Framework and design pattern usage |
git_archaeology_chunks |
Git history context |
debt_vectors |
Technical debt items |
api_contract_chunks |
OpenAPI contract fragments |
event_catalog_vectors |
Event definitions |