---
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

---

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