Documentation Index
Fetch the complete documentation index at: https://docs.memorylake.ai/llms.txt
Use this file to discover all available pages before exploring further.
POST /openapi/memorylake/api/v1/projects/{id}/documents/search
table, paragraph, and figure — each identified by the type field.
Permission required:
project:doc_search · instancePath Parameters
Project ID
Request Body
Search query text
Maximum number of results to return (minimum 1)
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/api/v1/projects/proj-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6/documents/search' \
-H 'Authorization: Bearer sk_xxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"query": "What were the quarterly sales figures in 2024?",
"top_n": 10
}'
Response
Show Search results
Show Search results
Actual number of results returned
Search results ranked by relevance. Each item is a discriminated union —
type decides which variant-only fields are present and which sub-field of highlight is populated. Click to expand the full per-item shape.Show Result item
Show Result item
Discriminator. One of
paragraph, table, or figure.Document ID
Document file name, e.g.
report_2024.xlsxSource file info.
Show source_document properties
Show source_document properties
Original file name
Matched content. The object always has the same three optional fields below — exactly one is populated, selected by the parent item’s
type.Show highlight properties
Show highlight properties
Populated when
type=table. Matched sub-tables within the source table region. Absent otherwise.Show InnerTable properties
Show InnerTable properties
Inner table ID
Cell range covered, e.g.
A1:D50Number of data rows
Internal storage path of the materialized table
Column descriptors.
Show TableColumn properties
Show TableColumn properties
Column ID
Column header name
Inferred data type (e.g.
string, number, date)Column cell range
Non-null value count
Null value count
Approximate number of distinct values
Minimum value (string-encoded)
Maximum value (string-encoded)
Sample raw values from the column
Sample formatted/display values
Model-inferred semantic comment for the column
Whether the column participates in a row hierarchy
Populated when
type=figure. The matched figure descriptor. Absent otherwise.Only when
type=paragraph. Paragraph block ID inside the document.Only when
type=table. Table entity ID.Only when
type=table. Table title.Only when
type=table. Table footnote.Only when
type=table. Worksheet name (workbook tables).Only when
type=table. Model-inferred semantic name for the worksheet.Only when
type=table. Model-inferred semantic comment for the worksheet.Only when
type=table. Table region location, e.g. A1:D50.Only when
type=figure. Figure numeric ID.{
"success": true,
"data": {
"count": 3,
"results": [
{
"type": "paragraph",
"document_id": "doc-123",
"document_name": "report_2024.pdf",
"paragraph_block_id": "blk-456",
"highlight": {
"chunks": [
{
"text": "Q1 2024 sales reached $2.5M...",
"range": "p12"
}
]
},
"source_document": {
"file_name": "report_2024.pdf"
}
},
{
"type": "table",
"document_id": "doc-789",
"document_name": "sales_data.xlsx",
"table_id": "tbl-001",
"title": "Quarterly Sales Summary",
"sheet_name": "Sheet1",
"table_region_info": "A1:D50",
"highlight": {
"inner_tables": [...]
},
"source_document": {
"file_name": "sales_data.xlsx"
}
}
]
}
}