POST
/
v1
/
memories
/
search

Authorizations

Authorization
string
header
required

API key authentication. Prefix your Mem0 API key with 'Token '. Example: 'Token your_api_key'

Body

application/json
query
string
required

The query to search for in the memory.

Minimum length: 1
agent_id
string | null

The agent ID associated with the memory.

app_id
string | null

The app ID associated with the memory.

categories
string[]

A list of categories to filter the memories by.

fields
string[]

A list of field names to include in the response. If not provided, all fields will be returned.

filter_memories
boolean
default:
false

Whether to properly filter the memories according to the input.

metadata
object | null

Additional metadata associated with the memory.

Whether to only search for memories based on metadata.

org_id
string | null

The unique identifier of the organization associated with the memory.

org_name
string | null

The name of the organization associated with the memory. Will be deprecated soon use org_id instead.

output_format
string | null

The search method supports two output formats: v1.0 (default) and v1.1.

project_id
string | null

The unique identifier of the project associated with the memory.

project_name
string | null

The name of the project associated with the memory. Will be deprecated soon use project_id instead.

rerank
boolean
default:
false

Whether to rerank the memories.

run_id
string | null

The run ID associated with the memory.

top_k
integer
default:
10

The number of top results to return.

user_id
string | null

The user ID associated with the memory.

Response

200 - application/json
created_at
string
required

The timestamp when the memory was created

hash
string
required

A hash of the memory content

id
string
required

Unique identifier for the memory

input
object[]
required

The conversation input that was used to generate this memory

memory
string
required

The content of the memory

updated_at
string
required

The timestamp when the memory was last updated

user_id
string
required

The identifier of the user associated with this memory

metadata
object | null

Additional metadata associated with the memory