- Sync
- Async
Parameters
query(str, optional): Search query text. Mutually exclusive withquery_image.filters(Dict[str, Any], optional): Optional metadata filtersk(int, optional): Number of results. Defaults to 4.min_score(float, optional): Minimum similarity threshold. Defaults to 0.0.use_colpali(bool, optional): Whether to use ColPali-style embedding model. Defaults to True.use_reranking(bool, optional): Override workspace reranking configuration for this request.folder_name(str | List[str], optional): Optional folder scope. Accepts canonical paths (e.g.,/projects/alpha/specs) or a list of paths/names.folder_depth(int, optional): Folder scope depth.None/0= exact match,-1= include all descendants,n > 0= include descendants up tonlevels deep.end_user_id(str, optional): Optional end-user scopepadding(int, optional): Number of additional chunks/pages to retrieve before and after matched chunks. Defaults to 0.output_format(str, optional): Controls how image chunks are returned:"base64"(default): Returns base64-encoded image data"url": Returns presigned HTTPS URLs"text": Converts images to markdown text via OCR (faster inference, best for text-heavy documents)
query_image(str, optional): Base64-encoded image for reverse image search. Mutually exclusive withquery. Requiresuse_colpali=True.
Returns
GroupedChunkResponse: Response containing both flat chunks and grouped chunks for UI display
Metadata Filters
Filters follow the same JSON syntax across the API. See the Metadata Filtering guide for supported operators and typed comparisons.Examples
- Sync
- Async
GroupedChunkResponse Properties
TheGroupedChunkResponse object has the following properties:
chunks(List[ChunkResult]): Flat list of all chunks (for backward compatibility)groups(List[ChunkGroup]): Grouped chunks for UI displaytotal_results(int): Total number of unique chunkshas_padding(bool): Whether padding was applied to any results
ChunkGroup Properties
EachChunkGroup in groups has:
main_chunk(ChunkResult): The primary matched chunkpadding_chunks(List[ChunkResult]): Surrounding context chunkstotal_chunks(int): Total number of chunks in this group
Notes
- This method is similar to
retrieve_chunksbut provides additional grouping for UI display. - The
chunkslist provides backward compatibility with flat chunk lists. - The
groupslist organizes results with their padding context, ideal for building search result UIs. - When
paddingis specified, surrounding chunks are included inpadding_chunksfor each group.
Reverse Image Search
You can search using an image instead of text by providingquery_image with a base64-encoded image:
- Sync
- Async
Reverse image search requires documents to be ingested with
use_colpali=True. You must provide either query or query_image, but not both.
