Search Memories
Search your stored memories using natural language. Uses semantic vector search to find the most relevant memories, even when the query doesn't exactly match the stored text.
Endpoint
POST https://api.memory.audaxic.com/search
Request Body
{
"query": "What editor does the user prefer?",
"limit": 10
}
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Natural language search query |
limit | number | No | Maximum number of results (default: 10) |
Response
{
"results": [
{
"id": "mem_abc123",
"memory": "User prefers dark mode and uses VS Code",
"metadata": {}
}
]
}
| Field | Type | Description |
|---|---|---|
results | MemoryItem[] | Matching memories, sorted by relevance |
results[].id | string | Unique memory identifier |
results[].memory | string | The stored memory text |
results[].metadata | object | Associated metadata |
Examples
cURL
curl -X POST https://api.memory.audaxic.com/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ak_your_api_key" \
-d '{
"query": "What editor does the user prefer?",
"limit": 5
}'
JavaScript
const response = await fetch("https://api.memory.audaxic.com/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer ak_your_api_key",
},
body: JSON.stringify({
query: "What editor does the user prefer?",
limit: 5,
}),
});
const data = await response.json();
console.log(data.results);
Python
import requests
response = requests.post(
"https://api.memory.audaxic.com/search",
headers={"Authorization": "Bearer ak_your_api_key"},
json={"query": "What editor does the user prefer?", "limit": 5},
)
data = response.json()
print(data["results"])
How Search Works
Audaxic uses semantic vector search, not keyword matching. This means:
- "What IDE does the user like?" will find "User prefers VS Code"
- "Where does the person live?" will find "User lives in New York"
- "What does the user enjoy?" will find "User loves cats"
The search understands meaning and context, so you can ask questions in natural language.