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

# POST /v1/memories/search/

`POST /v1/memories/search/`

> **Deprecated.**

Perform a semantic search on memories.

## Request body

- MemorySearchInput
  - `query` string, required — The query to search for in the memory.
  - `agent_id` string, nullable — The agent ID associated with the memory.
  - `user_id` string, nullable — The user ID associated with the memory.
  - `app_id` string, nullable — The app ID associated with the memory.
  - `run_id` string, nullable — The run ID associated with the memory.
  - `metadata` object, nullable — Additional metadata associated with the memory.
  - `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.
  - `output_format` string, nullable — The search method supports two output formats: `v1.0` (default) and `v1.1`. We recommend using `v1.1` as `v1.0` will be deprecated soon.
  - `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.
  - `filter_memories` boolean — Whether to properly filter the memories according to the input.
  - `categories` string[] — A list of categories to filter the memories by.
  - `only_metadata_based_search` boolean — Whether to only search for memories based on metadata.

## Response `200`

Successfully retrieved search results.

- union
  - object[] — Default response shape. Returned when `output_format` is omitted or set to `v1.0`.
    - `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
    - `score` number — Relevance score of the memory for the search query.
    - `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.
  - object — Returned when `output_format=v1.1` is requested.
    - `results` object[], required
      - `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
      - `score` number — Relevance score of the memory for the search query.
      - `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.
    - `relations` unknown[], required
      - unknown

## Other responses

- `400` — Bad Request.

## Changes

> 4 revisions in range; 1 could not be searched.

- **2026-08-04** `d8043b07769d` — 2 breaking, 2 info
  - added `subschema #1, subschema #2` to the response body `oneOf` list for the response status `200`
  - the response's body type/format changed from `array`/`` to ``/`` for status `200`
  - endpoint deprecated
  - the `output_format` request property default value changed from `v1.1` to `v1.0`

[Change history](https://skmtc.dev/mem0/apis/mem0-api-docs/changes/v1/memories/search/post.md)

---

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