| page | No | Page number, 1-based; values below 1 are normalized to page 1. A page above total_pages returns no documents plus a pagination warning. | |
| debug | No | Include ranking debug info. Default false. | |
| limit | No | Max results (1-500) | |
| query | Yes | Search term, at least 2 characters. Use * with workspace_id to list. | |
| date_to | No | Filter: to upload date (YYYY-MM-DD). Filters by created_at (upload date), NOT document issue date. | |
| sort_by | No | Result order. relevance (default for keyword search): best match first (0–100 score). modified_desc / modified_asc: last content/metadata change (date_modified). uploaded_desc / uploaded_asc: upload date (date_uploaded). name_asc / name_desc: display/file name. Browse mode (* or empty query) defaults to uploaded_desc unless sort_by is set. | |
| date_from | No | Filter: from upload date (YYYY-MM-DD). Filters by created_at (upload date), NOT document issue date. | |
| search_mode | No | Search strategy. semantic = embeddings only; similarity_threshold filters the result set (no OCR/fulltext fallback). hybrid/intelligent = fused lexical + semantic; threshold applies only to the semantic channel. fulltext = lexical (filename/OCR/entity), threshold is ignored. | intelligent |
| search_scope | No | Search scope. "current" searches only workspace_id; "all" searches all accessible workspaces while using workspace_id as the security anchor. | current |
| workspace_id | Yes | Workspace ID (>0). Required by the API. Use po_workspaces_list to choose a valid workspace; never use 0. | |
| document_type | No | Filter by type key from po_documents_document_types_list (e.g. invoice, contract) or a type label in any language. Labels such as Rechnung, Facture or Fattura are mapped to the type key automatically. | |
| filename_only | No | Fast lane: only search in file_name (skips OCR, entity, meta_fields subqueries). Use when the user clearly asks for a file by name (e.g. "find Q3-report.pdf", "show me the contract called Acme.docx"). Drastically faster on large tenants. | |
| issued_date_to | No | Filter: to document issue date (YYYY-MM-DD). Filters by the date printed ON the document (e.g. invoice date). | |
| include_summary | No | Include AI summary in results (default: true). Set to false for faster, smaller responses. | |
| issued_date_from | No | Filter: from document issue date (YYYY-MM-DD). Filters by the date printed ON the document (e.g. invoice date). | |
| search_budget_ms | No | Optional per-search soft budget in milliseconds (1-30000, default 8000). When exceeded, expensive sub-sources (OCR/Entity/Semantic) are skipped and _search_quality.partial=true is reported. Use only when explicitly trading latency vs completeness, or in eval scenarios to force the partial path. | |
| signature_status | No | Filter by signature status, not document fulltext. Codes: not_signed, signed, pending, declined, expired. | |
| document_type_hint | No | Optional ranking hint with a type key (e.g. invoice). Set by the agent query analyzer; used as ranking/filter signal, not as hard-only filter. | |
| include_historical | No | Versioning: include older document versions in the results. Default false = only the current version of each document line (older versions are hidden). Each result carries version, version_count, is_latest_version and latest_pofid. | |
| similarity_threshold | No | Optional semantic similarity threshold (0.0-1.0) for semantic/hybrid search. Use with debug=true for reproducible ranking diagnostics. | |