diff --git a/docs/api-reference/memory/v2-get-memories.mdx b/docs/api-reference/memory/v2-get-memories.mdx
index 885d853e8e..1da3036bba 100644
--- a/docs/api-reference/memory/v2-get-memories.mdx
+++ b/docs/api-reference/memory/v2-get-memories.mdx
@@ -3,7 +3,7 @@ title: 'Get Memories (v2)'
openapi: post /v2/memories/
---
-The v2 get memories API is powerful and flexible, allowing for more precise memory listing without the need for a search query. It supports complex logical operations (AND, OR) and comparison operators for advanced filtering capabilities. The comparison operators include:
+The v2 get memories API is powerful and flexible, allowing for more precise memory listing without the need for a search query. It supports complex logical operations (AND, OR, NOT) and comparison operators for advanced filtering capabilities. The comparison operators include:
- `in`: Matches any of the values specified
- `gte`: Greater than or equal to
- `lte`: Less than or equal to
diff --git a/docs/api-reference/memory/v2-search-memories.mdx b/docs/api-reference/memory/v2-search-memories.mdx
index a7959ec40f..f0526869c8 100644
--- a/docs/api-reference/memory/v2-search-memories.mdx
+++ b/docs/api-reference/memory/v2-search-memories.mdx
@@ -3,7 +3,7 @@ title: 'Search Memories (v2)'
openapi: post /v2/memories/search/
---
-The v2 search API is powerful and flexible, allowing for more precise memory retrieval. It supports complex logical operations (AND, OR) and comparison operators for advanced filtering capabilities. The comparison operators include:
+The v2 search API is powerful and flexible, allowing for more precise memory retrieval. It supports complex logical operations (AND, OR, NOT) and comparison operators for advanced filtering capabilities. The comparison operators include:
- `in`: Matches any of the values specified
- `gte`: Greater than or equal to
- `lte`: Less than or equal to
diff --git a/docs/platform/quickstart.mdx b/docs/platform/quickstart.mdx
index b2fbb8f0fe..81bd0d9b1c 100644
--- a/docs/platform/quickstart.mdx
+++ b/docs/platform/quickstart.mdx
@@ -694,6 +694,77 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
+Example 4: Search using NOT filters
+
+```python Python
+query = "What do you know about me?"
+filters = {
+ "NOT": [
+ {
+ "categories": {
+ "contains": "food_preferences"
+ }
+ }
+ ]
+}
+client.search(query, version="v2", filters=filters)
+```
+
+```javascript JavaScript
+const query = "What do you know about me?";
+const filters = {
+ "NOT": [
+ {
+ "categories": {
+ "contains": "food_preferences"
+ }
+ }
+ ]
+};
+
+client.search(query, { version: "v2", filters })
+ .then(results => console.log(results))
+ .catch(error => console.error(error));
+```
+
+```bash cURL
+curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
+ -H "Authorization: Token your-api-key" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "query": "What do you know about me?",
+ "filters": {
+ "NOT": [
+ {
+ "categories": {
+ "contains": "food_preferences"
+ }
+ }
+ ]
+ }
+ }'
+```
+
+```json Output
+{
+ "results": [
+ {
+ "id": "123abc-d456-7890-efgh-ijklmnopqrst",
+ "memory": "Lives in San Francisco",
+ "user_id": "alex",
+ "metadata": null,
+ "categories": ["location"],
+ "immutable": false,
+ "expiration_date": null,
+ "created_at": "2024-07-20T01:30:36.275141-07:00",
+ "updated_at": "2024-07-20T01:30:36.275172-07:00"
+ }
+ ]
+}
+```
+
+
+
### 4.3 Get All Users
@@ -1311,6 +1382,121 @@ curl -X GET "https://api.mem0.ai/v1/memories/?version=v2&page=1&page_size=50" \
+Example 3: Get all memories using NOT filters
+
+```python Python
+filters = {
+ "NOT": [
+ {
+ "categories": {
+ "contains": "food_preferences"
+ }
+ }
+ ]
+}
+
+# Default (No Pagination)
+client.get_all(version="v2", filters=filters)
+
+# Pagination (You can also use the page and page_size parameters)
+client.get_all(version="v2", filters=filters, page=1, page_size=50)
+```
+
+```javascript JavaScript
+const filters = {
+ "NOT": [
+ {
+ "categories": {
+ "contains": "food_preferences"
+ }
+ }
+ ]
+};
+
+// Default (No Pagination)
+client.getAll({ version: "v2", filters })
+ .then(memories => console.log(memories))
+ .catch(error => console.error(error));
+
+// Pagination (You can also use the page and page_size parameters)
+client.getAll({ version: "v2", filters, page: 1, page_size: 50 })
+ .then(memories => console.log(memories))
+ .catch(error => console.error(error));
+```
+
+```bash cURL
+# Default (No Pagination)
+curl -X GET "https://api.mem0.ai/v1/memories/?version=v2" \
+ -H "Authorization: Token your-api-key" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "filters": {
+ "NOT": [
+ {
+ "categories": {
+ "contains": "food_preferences"
+ }
+ }
+ ]
+ }
+ }'
+
+# Pagination (You can also use the page and page_size parameters)
+curl -X GET "https://api.mem0.ai/v1/memories/?version=v2&page=1&page_size=50" \
+ -H "Authorization: Token your-api-key" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "filters": {
+ "NOT": [
+ {
+ "categories": {
+ "contains": "food_preferences"
+ }
+ }
+ ]
+ }
+ }'
+```
+
+```json Output
+[
+ {
+ "id": "789xyz-e012-3456-fghi-jklmnopqrstu",
+ "memory": "Works as a software engineer",
+ "user_id": "alex",
+ "metadata": {"job": "tech"},
+ "categories": ["work"],
+ "immutable": false,
+ "expiration_date": null,
+ "created_at": "2024-07-20T01:30:36.275141-07:00",
+ "updated_at": "2024-07-20T01:30:36.275172-07:00"
+ }
+]
+```
+
+```json Output (Paginated)
+{
+ "count": 1,
+ "next": null,
+ "previous": null,
+ "results": [
+ {
+ "id": "789xyz-e012-3456-fghi-jklmnopqrstu",
+ "memory": "Works as a software engineer",
+ "user_id": "alex",
+ "metadata": {"job": "tech"},
+ "categories": ["work"],
+ "immutable": false,
+ "expiration_date": null,
+ "created_at": "2024-07-20T01:30:36.275141-07:00",
+ "updated_at": "2024-07-20T01:30:36.275172-07:00"
+ }
+ ]
+}
+```
+
+
+
### 4.5 Memory History