---
title: "Search for context data in the context processor"
method: POST
path: "/api/v1/context/search"
tags: ["context"]
---

# Search for context data in the context processor

`POST /api/v1/context/search`

This endpoint sends a search request to the context processor to retrieve relevant context data based on the provided query.

## Query parameters

- `metadata` 'true' | 'false'
- `mode` 'fast' | 'standard'

## Request body

- object
  - `user_id` string — The ID of the user making the request
  - `query` string, required — The search query used to search for context data
  - `similarity_threshold` number, required — Maximum similarity threshold (must be >= minimum_similarity_threshold)
  - `minimum_similarity_threshold` number, required — Minimum similarity threshold
  - `scope` 'internal' | 'external' — Search scope
  - `body_metadata` object — Additional metadata for the search

## Response `202`

Context search request successfully processed. Response structure varies based on metadata query parameter: if metadata=true, each context includes metadata; if metadata=false or omitted, metadata is excluded from the response.

- object
  - `contexts` object[]
    - `updatedAt` string, date-time
    - `createdAt` string, date-time
    - `metadata` object — Only included when query parameter metadata=true
    - `content` string
    - `score` number

## Other responses

- `400` — Bad Request - Invalid or missing search parameters
- `401` — Unauthorized - User not authenticated
- `402` — Payment Required - User not allowed to perform action
- `403` — Forbidden - User lacks required scope
- `500` — Internal Server Error

## Changes

- **2026-01-06** `a172a1ab25e5` — 3 breaking, 2 info
  - for the `query` request parameter `metadata`, default value was changed from `false` to `false`
  - removed the enum value `false` from the `query` request parameter `metadata`
  - removed the enum value `true` from the `query` request parameter `metadata`
  - added the new enum value `false` to the `query` request parameter `metadata`
  - …1 more
- **2026-01-06** `e8e44e0e972c` — 3 breaking, 2 info
  - for the `query` request parameter `metadata`, default value was changed from `false` to `false`
  - removed the enum value `false` from the `query` request parameter `metadata`
  - removed the enum value `true` from the `query` request parameter `metadata`
  - added the new enum value `false` to the `query` request parameter `metadata`
  - …1 more
- **2026-01-06** `17acc86e90b7` — 3 breaking, 2 info
  - for the `query` request parameter `metadata`, default value was changed from `false` to `false`
  - removed the enum value `false` from the `query` request parameter `metadata`
  - removed the enum value `true` from the `query` request parameter `metadata`
  - added the new enum value `false` to the `query` request parameter `metadata`
  - …1 more
- **2026-01-03** `9edfda1a76b9` — 1 info
  - endpoint added
- **2026-01-03** `510cbb709bed` — 1 breaking
  - api path removed without deprecation

[Full history](https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation/changes/api/v1/context/search/post.md)

---

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