Access your agents' knowledge
Search an application's connected knowledge from your own code. Ask a question in plain language and retrieve relevant passages from processed documents the caller can access. Employees use the same application and collection boundaries, so your integration can retrieve evidence from the sources assigned to the employee.
Match the employee's knowledge scope
Use the employee ID as applicationId to search its application's collections. An agent can apply narrower retrieval rules within that application. A search call does not prove that every agent in the application uses every returned source.
For an inventory of connected files, open Knowledge in the employee overview or use the paginated employee knowledge API. Semantic search returns relevant matches, not a complete file inventory. A preparation brief is a conversation attachment rather than an automatic addition to all connected collections.
Set up once
export DOCANA_API_KEY=your_api_key_here # see Generating API Keys
The search call
curl -X POST "https://platform.docana.com/api/v1/search/" \
-H "Authorization: ApiKey ${DOCANA_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"query": "termination clause in vendor contracts",
"applicationId": 42
}'
The query is natural language, up to 1000 characters. Results come back as knowledge chunks grouped by document, most relevant first:
[
{
"document": { "id": 12345, … },
"knowledge": [
{ "id": 9001, "content": "Either party may terminate with 30 days written notice…" }
],
"summary": "Services agreement with Acme Corp…"
}
]
From the terminal, search prints a table. This example searches all sources your key can access. Use the applicationId request above to restrict the query to an employee:
docana documents search "termination clause in vendor contracts"
Document ID Title Collection Summary
12345 contract-2026-08.pdf Contracts Services agreement with Acme Corp…
Scope it
Search everything your key can see, or narrow down:
applicationId: only the collections of one applicationcollectionIds: only specific collectionsdocumentIds: only specific documents, useful for "search within this contract"
Tune it
Three knobs control the result set:
take(default 50): maximum documents in the responsemaxK(default 50): how many chunks are retrieved before grouping by documentscore(default 0.6): minimum similarity, 0 to 1. Raise it for precision, lower it for recall.
And one switch changes what's searched: type is CHUNK (the default, original document text) or SUMMARIZED (document summaries). Summaries are the better target when the question is "which documents are about X"; chunks win when it's "what exactly does the document say".
Typeahead
For search-as-you-type, the GET variant runs the same search with small defaults (10 results):
curl "https://platform.docana.com/api/v1/search/quick/?query=vendor+contracts&applicationId=42" \
-H "Authorization: ApiKey ${DOCANA_API_KEY}"
Or from the terminal:
docana api GET '/api/v1/search/quick/?query=vendor+contracts&applicationId=42'
Feed your own pipelines
A search result identifies the document. The content API gets you its full extracted text or transcription. Together they're the retrieval half of any RAG-style feature you're building on your own models: the memory your agents work from, powering your pipelines too. Search for the chunks, read the content, feed your model.
Next steps
-
Employees: inspect the connected sources in the product
-
Read Document Content: Pull the full text behind a search hit
-
Automate Document Ingestion: Get documents into the index
-
Enterprise Search: The same search, in the UI