Skip to main content
GET
https://api.memcontext.in
/
api
/
memories
/
search
Search memories
curl --request GET \
  --url https://api.memcontext.in/api/memories/search \
  --header 'X-API-Key: <api-key>'
{
  "found": 123,
  "memories": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "content": "<string>",
      "relevance": 0.5,
      "createdAt": "2023-11-07T05:31:56Z",
      "category": "preference",
      "project": "<string>"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

API key created from the MemContext dashboard. Keys are prefixed with mc_.

Query Parameters

query
string
required

Natural language search query. Use full sentences for best results.

Maximum string length: 1000
limit
integer
default:5

Maximum number of results to return.

Required range: 1 <= x <= 10
category
enum<string>

Filter results to a single category.

  • preference - User likes or dislikes (e.g. "prefers dark mode").
  • fact - Objective information (e.g. "uses macOS").
  • decision - Choices made (e.g. "chose PostgreSQL for DB").
  • context - Background information (e.g. "working on e-commerce app").
Available options:
preference,
fact,
decision,
context
project
string

Filter results to a specific project.

threshold
number

Maximum vector distance. Higher values return more results (broader search). Use 0.2-0.4 for strict matching, 0.6 as default, 0.7-0.8 for broad recall.

Required range: 0 <= x <= 1

Response

200 - application/json

Ranked search results.

found
integer
required

Number of results returned.

memories
object[]
required