v46

latestOpenAPI 3.1.0raw.githubusercontent.com2026-04-253903.6 MB
Documents

Search documents

Search memories with advanced filtering

post/v3/search

Request body

chunkThresholdnumber

Threshold / sensitivity for chunk selection. 0 is least sensitive (returns most chunks, more results), 1 is most sensitive (returns lesser chunks, accurate results)

containerTagstring

Optional single container tag. Use this or containerTags.

containerTagsstring[]

Optional tags this search should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to filter documents.

docIdstring

Optional document ID to search within. You can use this to find chunks in a very large document.

documentThresholdnumber

DEPRECATED: This field is no longer used in v3 search. The search now uses chunkThreshold only. This parameter will be ignored.

includeFullDocsboolean

If true, include full document in the response. This is helpful if you want a chatbot to know the full context of the document.

includeSummaryboolean

If true, include document summary in the response. This is helpful if you want a chatbot to know the full context of the document.

limitinteger

Maximum number of results to return

onlyMatchingChunksboolean

If true, only return matching chunks without context. Normally, we send the previous and next chunk to provide more context for LLMs. If you only want the matching chunk, set this to true.

qstring required

Search query string

rerankboolean

If true, rerank the results based on the query. This is helpful if you want to ensure the most relevant results are returned.

rewriteQueryboolean

If true, rewrites the query to make it easier to find documents. This increases the latency by about 400ms

categoriesFilterstring[]

DEPRECATED: Optional category filters

filepathstring

Filter search results by filepath. Exact match for full paths, prefix match if ending with /

Response

Search results

timingnumber required
totalnumber required

Example response

{
  "results": [
    {
      "chunks": [
        {
          "content": "Machine learning is a subset of artificial intelligence...",
          "isRelevant": true,
          "score": 0.85
        }
      ],
      "createdAt": "1970-01-01T00:00:00.000Z",
      "documentId": "doc_xyz789",
      "metadata": {
        "category": "technology",
        "isPublic": true,
        "readingTime": 5,
        "source": "web",
        "tag_1": "ai",
        "tag_2": "machine-learning"
      },
      "score": 0.95,
      "summary": "A comprehensive guide to understanding the basics of machine learning and its applications.",
      "content": "This is the complete content of the document about machine learning concepts...",
      "title": "Introduction to Machine Learning",
      "updatedAt": "1970-01-01T00:00:00.000Z",
      "type": "web"
    }
  ]
}