Authorizations
Body
application/json
Minimum length:
1Example:
Example:
Required range:
0 <= x <= 1Example:
- Option 1
- Option 2
Required range:
1 <= x <= 100Example:
Example:
Example:
const url = 'https://api.supermemory.ai/v4/search';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: '{"q":"machine learning concepts"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}{
"results": [
{
"id": "mem_abc123",
"memory": "John prefers machine learning over traditional programming",
"metadata": {
"source": "conversation",
"confidence": 0.9
},
"updatedAt": "<string>",
"similarity": 0.89,
"version": 3,
"context": {
"parents": [
{
"relation": "updates",
"version": -1,
"memory": "Earlier version: Dhravya is working on a patent at Cloudflare.",
"metadata": {},
"updatedAt": "<string>"
}
],
"children": [
{
"relation": "extends",
"version": 1,
"memory": "Later version: Dhravya has filed the patent successfully.",
"metadata": {},
"updatedAt": "<string>"
}
]
},
"documents": [
{
"id": "doc_xyz789",
"title": "Introduction to Machine Learning",
"type": "web",
"metadata": {
"category": "technology",
"isPublic": true,
"readingTime": 5,
"source": "web",
"tag_1": "ai",
"tag_2": "machine-learning"
},
"summary": "A comprehensive guide to understanding the basics of machine learning and its applications.",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"chunks": [
{
"content": "This is a chunk of content from the document...",
"score": 0.85,
"position": 0,
"documentId": "doc_xyz789"
}
]
}
],
"timing": 245,
"total": 5
}Search memory entries - Low latency for conversational
const url = 'https://api.supermemory.ai/v4/search';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: '{"q":"machine learning concepts"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}{
"results": [
{
"id": "mem_abc123",
"memory": "John prefers machine learning over traditional programming",
"metadata": {
"source": "conversation",
"confidence": 0.9
},
"updatedAt": "<string>",
"similarity": 0.89,
"version": 3,
"context": {
"parents": [
{
"relation": "updates",
"version": -1,
"memory": "Earlier version: Dhravya is working on a patent at Cloudflare.",
"metadata": {},
"updatedAt": "<string>"
}
],
"children": [
{
"relation": "extends",
"version": 1,
"memory": "Later version: Dhravya has filed the patent successfully.",
"metadata": {},
"updatedAt": "<string>"
}
]
},
"documents": [
{
"id": "doc_xyz789",
"title": "Introduction to Machine Learning",
"type": "web",
"metadata": {
"category": "technology",
"isPublic": true,
"readingTime": 5,
"source": "web",
"tag_1": "ai",
"tag_2": "machine-learning"
},
"summary": "A comprehensive guide to understanding the basics of machine learning and its applications.",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"chunks": [
{
"content": "This is a chunk of content from the document...",
"score": 0.85,
"position": 0,
"documentId": "doc_xyz789"
}
]
}
],
"timing": 245,
"total": 5
}10 <= x <= 1Show child attributes
Show child attributes
1 <= x <= 100Was this page helpful?