Container Tag
Container tag is an identifier for your end users, to group memories together.. This can be:- A user using your product
- An organization using a SaaS
user_project_etc
We recommend using single containerTag in all API requests.
The graph is built on top of the Container Tags. For example, each user / tag in your supermemory account will have one single graph built for them.
Metadata
Sometimes, you might want to add metadata and do advanced filtering based on it. Using metadata filtering, you can search based on:- AND and OR conditions
- String matching
- Numeric matching
- Date matching
- Time range queries
Validation Rules & Limits
To ensure optimal performance and security, the filtering system has the following limits:- Metadata keys: Must contain only alphanumeric characters, underscores, and hyphens (
/^[a-zA-Z0-9_-]+$/
) - Metadata key length: Maximum of 64 characters
- Maximum conditions: Up to 200 conditions per query
- Maximum nesting depth: Up to 8 levels of nested AND/OR expressions
- Valid operators:
=
,!=
,<
,<=
,>
,>=
for numeric filtering
These limits help prevent overly complex queries that could impact performance. If you need to filter on more conditions, consider breaking your query into multiple requests or using broader search terms with post-processing.
Array Contains Filtering
You can filter memories by array values using thearray_contains
filter type. This is particularly useful for filtering by participants or other array-based metadata.
First, create a memory with participants in the metadata:
array_contains
filter:
Migration Notes
Breaking Changes: Recent updates to the filtering system have introduced stricter validation rules. If you’re experiencing filter validation errors, please check the following:
- Metadata Key Format: Ensure all metadata keys only contain alphanumeric characters, underscores, and hyphens. Keys with spaces, dots, or other special characters will now fail validation.
- Key Length: Metadata keys must be 64 characters or fewer.
- Filter Complexity: Queries with more than 200 conditions or more than 8 levels of nesting will be rejected.
"user.email"
→"user_email"
"reading time"
→"reading_time"
"category-with-very-long-name-that-exceeds-the-limit"
→"category_name"