Access your agents' knowledge
Every document you ingest becomes part of your agents' shared memory: the knowledge your AI workforce answers from. Here's the part people miss: that memory isn't locked inside the agents. The same semantic search they use is an API, so your product, your scripts, and your own AI features can ask it the same questions. Ask in plain language, get back the exact passages, from content your code has never seen.
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, the same search prints a table:
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
- 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