Coming soon
The Lookeen RAG API and MCP integration are not yet available. The information below describes planned functionality.
Lookeen RAG API
The retrieval API returns ranked Lookeen passages for grounding an agent or language model. It does not generate an answer or invoke an LLM. This page renders the GET /v1/rag contract as HTML.
Self-describing endpointCall
GET /v1/rag on your Lookeen Server to receive this information as machine-readable JSON. Send retrieval requests with POST /v1/rag.Endpoint
| URI | /v1/rag |
|---|---|
| Method | POST |
| Content type | application/json |
| Retrieval | lexical |
| Authentication | Authorization: Bearer <Lookeen API key> |
Request body
| Field | Type | Description |
|---|---|---|
query | String | Lookeen query to execute. Required and non-blank. |
topK | Integer | Maximum passages to return. Default: 10, minimum: 1, maximum: 100. |
userId | Integer | Optional user ID whose document permissions are applied. |
groupIds | Array<Integer> | Optional group IDs whose document permissions are applied. |
filters | Array | Optional structured document filters containing column, op and value. |
Filters
| Field | Description |
|---|---|
column | Searchable Lookeen column name; required. |
op | Filter operator; required. |
value | Filter value; optional only for operators such as EMPTY and NOT_EMPTY. |
Supported operators: IN, NOT_IN, EQUALS, LARGER, NOT_EQUALS, LIKE, NOT_LIKE, SMALLER, STARTS_WITH, DOES_NOT_START_WITH, DOES_NOT_END_WITH, ENDS_WITH, NOT_EMPTY, EMPTY, RANGE, NOOP, CONTAINS and COMPLEX.
Example request
curl -X POST https://lookeen.example/v1/rag \
-H 'Authorization: Bearer <api-key>' \
-H 'Content-Type: application/json' \
-d '{
"query": "Project Phoenix risks",
"topK": 5,
"userId": 42,
"groupIds": [3, 8],
"filters": [
{"column": "extension", "op": "EQUALS", "value": "pdf"}
]
}'
Response
| Field | Description |
|---|---|
query | Normalized submitted query. |
retrieval | Retrieval strategy used; currently lexical. |
totalMatches | Total matching documents before topK is applied. |
results | Results ordered by decreasing relevance. One passage is returned per matching document. |
elapsedMs | Server-side retrieval time in milliseconds. |
One results item
| Field | Description |
|---|---|
rank | One-based result rank. |
score | Relevance relative to the first result, from 0 to 1; omitted when unavailable. |
documentId | Stable Lookeen document identifier for citation and later lookup. |
title | Document title. |
path | Document path, when available. |
url | Document URL, when available. |
mimeType | Document MIME type, when available. |
itemType | Lower-case Lookeen item type, when available. |
modified | ISO-8601 modification time, when available. |
passage | Plain-text passage selected for this query and suitable for grounding. |
Example response
{
"query": "Project Phoenix risks",
"retrieval": "lexical",
"totalMatches": 18,
"results": [
{
"rank": 1,
"score": 1.0,
"documentId": "project-status~12~42",
"title": "Project status Q3",
"path": "S:\\Projects\\Phoenix\\Project-status_Q3.pdf",
"mimeType": "application/pdf",
"itemType": "file",
"modified": "2026-10-14T08:30:00Z",
"passage": "The API release is delayed. Two data protection reviews remain open."
}
],
"elapsedMs": 34
}