---
title: "Search memories"
method: POST
path: "/memory/v1/search"
tags: ["Memory"]
---

# Search memories

`POST /memory/v1/search`

Search memories using semantic similarity. Filter by tag fields to narrow results.

Use tag_1 through tag_12 for filtering - these are generic indexed fields you define:
- Legal app: tag_1=client_id, tag_2=matter_id
- Healthcare: tag_1=patient_id, tag_2=encounter_id

## Request body

- object
  - `query` string, required — Search query for semantic matching
  - `tag_1` string — Filter by tag_1
  - `tag_2` string — Filter by tag_2
  - `tag_3` string — Filter by tag_3
  - `tag_4` string — Filter by tag_4
  - `tag_5` string — Filter by tag_5
  - `tag_6` string — Filter by tag_6
  - `tag_7` string — Filter by tag_7
  - `tag_8` string — Filter by tag_8
  - `tag_9` string — Filter by tag_9
  - `tag_10` string — Filter by tag_10
  - `tag_11` string — Filter by tag_11
  - `tag_12` string — Filter by tag_12
  - `category` string — Filter by category
  - `top_k` integer — Maximum number of results to return

## Response `200`

Search results

- object
  - `results` object[]
    - `id` string — Memory ID
    - `memory` string — Memory content
    - `score` number — Similarity score (0-1)
    - `tags` object — Tag values for this memory
      - `tag_1` string
      - `tag_2` string
      - `tag_3` string
      - `tag_4` string
      - `tag_5` string
      - `tag_6` string
      - `tag_7` string
      - `tag_8` string
      - `tag_9` string
      - `tag_10` string
      - `tag_11` string
      - `tag_12` string
    - `metadata` object — Additional metadata
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400` — Invalid request parameters
- `401` — Invalid API key
- `403` — API key does not have access to Memory service
- `500` — Memory service error

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/versions/5b7e64e6d6f9/schema)
