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

---

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