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
MethodPOST
Content typeapplication/json
Retrievallexical
AuthenticationAuthorization: Bearer <Lookeen API key>

Request body

FieldTypeDescription
queryStringLookeen query to execute. Required and non-blank.
topKIntegerMaximum passages to return. Default: 10, minimum: 1, maximum: 100.
userIdIntegerOptional user ID whose document permissions are applied.
groupIdsArray<Integer>Optional group IDs whose document permissions are applied.
filtersArrayOptional structured document filters containing column, op and value.

Filters

FieldDescription
columnSearchable Lookeen column name; required.
opFilter operator; required.
valueFilter 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

FieldDescription
queryNormalized submitted query.
retrievalRetrieval strategy used; currently lexical.
totalMatchesTotal matching documents before topK is applied.
resultsResults ordered by decreasing relevance. One passage is returned per matching document.
elapsedMsServer-side retrieval time in milliseconds.

One results item

FieldDescription
rankOne-based result rank.
scoreRelevance relative to the first result, from 0 to 1; omitted when unavailable.
documentIdStable Lookeen document identifier for citation and later lookup.
titleDocument title.
pathDocument path, when available.
urlDocument URL, when available.
mimeTypeDocument MIME type, when available.
itemTypeLower-case Lookeen item type, when available.
modifiedISO-8601 modification time, when available.
passagePlain-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
}

← Back to Enterprise Search for AI (RAG)