---
title: "Query capsule"
method: POST
path: "/query"
tags: ["Query"]
---

# Query capsule

`POST /query`

## Request body

- QueryRequest
  - `query` string, required — The search query string
  - `limit` integer — Maximum number of results to return
  - `wishlist` object — Additional filtering criteria for the query

## Response `200`

Successful response

- QueryResult[]
  - `item_id` string — Unique identifier for the item
  - `idx` integer — Index of the chunk within the item
  - `content` string — Content of the chunk
  - `uri` string — URI associated with the item
  - `kind` string — Type of the item (e.g., 'file' or 'text')
  - `file_name` string — Name of the file (for file items)
  - `file_type` string — MIME type of the file (for file items)
  - `time_added` string, date-time — Timestamp when the item was added to the capsule
  - `time_authored` string, date-time — Timestamp when the item was originally authored
  - `score` number, float — Relevance score of the result
  - `metadata` object — Additional metadata associated with the item

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.dev/sidhq/apis/capsules-api.md) · [All operations](https://skmtc.dev/sidhq/apis/capsules-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sidhq/capsules-api/revisions/ab766386b0d2/schema)
