---
title: "Search context"
method: POST
path: "/api/v1/search"
---

# Search context

`POST /api/v1/search`

## Request

- Base URL: `https://ctxstore.ai`
- URL: `https://ctxstore.ai/api/v1/search`
- Auth: HTTP bearer

Semantically search conversation history and context across all sessions.

## Request body

- object
  - `query` string, required: Search query
  - `top_k` integer
  - `source` string: Filter by source
  - `days_back` integer: Limit results to last N days

## Response `200`

Context search results

- object
  - `results` ContextResult[]
    - `text` string
    - `score` number
    - `source` string
    - `age` string
    - `conversation_title` string
    - `role` string
    - `category` string
    - `is_permanent` boolean
  - `count` integer

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/ctxstore/apis/ctxstore-ai.md) · [All operations](https://skmtc.dev/ctxstore/apis/ctxstore-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/ctxstore/apis/ctxstore-ai/revisions/0581ff18c0f4?raw)
