---
title: "POST /v2/memories/search/"
method: POST
path: "/v2/memories/search/"
tags: ["memories"]
deprecated: true
---

# POST /v2/memories/search/

`POST /v2/memories/search/`

> **Deprecated.**

Search memories based on a query and filters.

## Request body

- MemorySearchInputV2
  - `query` string, required — The query to search for in the memory.
  - `version` string — The version of the memory to use. This should always be v2.
  - `filters` object, required — A dictionary of filters to apply to the search. Available fields are: user_id, agent_id, app_id, run_id, created_at, updated_at, categories, keywords. Supports logical operators (AND, OR) and comparison operators (in, gte, lte, gt, lt, ne, contains, icontains). For categories field, use 'contains' for partial matching (e.g., {"categories": {"contains": "finance"}}) or 'in' for exact matching (e.g., {"categories": {"in": ["personal_information"]}}).
    - `user_id` string
    - `agent_id` string
    - `app_id` string
    - `run_id` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `keywords` object
      - `contains` string
      - `icontains` string
    - `categories` object
      - `in` string[]
    - `metadata` object
  - `top_k` integer — The number of top results to return.
  - `fields` string[] — A list of field names to include in the response. If not provided, all fields will be returned.
  - `rerank` boolean — Whether to rerank the memories.
  - `keyword_search` boolean — Whether to search for memories based on keywords.
  - `filter_memories` boolean — Whether to filter the memories.
  - `threshold` number — The minimum similarity threshold for returned results.
  - `org_id` string, nullable — The unique identifier of the organization associated with the memory.
  - `project_id` string, nullable — The unique identifier of the project associated with the memory.

## Response `200`

Successfully retrieved search results.

- object[]
  - `id` string, uuid, required — Unique identifier for the memory.
  - `memory` string, required — The content of the memory
  - `user_id` string, required — The identifier of the user associated with this memory
  - `metadata` object, nullable — Additional metadata associated with the memory
  - `categories` string[] — Categories associated with the memory
  - `expiration_date` string, date, nullable — The date when the memory will expire. Format: YYYY-MM-DD.
  - `created_at` string, date-time, required — The timestamp when the memory was created.
  - `updated_at` string, date-time, required — The timestamp when the memory was last updated.
  - `score` number, float — Combined multi-signal relevance score in [0, 1] (search responses only).
  - `agent_id` string, nullable
  - `app_id` string, nullable
  - `session_id` string, nullable — Run/session the memory is scoped to. Note: this endpoint returns this field as `session_id`, matching `POST /v3/memories/`.

---

[API](https://skmtc.net/mem0/apis/mem0-api-docs.md) · [All operations](https://skmtc.net/mem0/apis/mem0-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mem0/mem0-api-docs/revisions/c86fe9831e7e/schema)
