- Sync
- Async
Parameters
query(str): Search query textfilters(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 (single name or list of names)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. Set to"url"for presigned URLs or"base64"(default) for base64 content.graph_name(str, optional): Name of the graph to use for knowledge graph-enhanced retrievalhop_depth(int, optional): Number of relationship hops to traverse in the graph. Defaults to 1.include_paths(bool, optional): Whether to include relationship paths in the response. Defaults to False.
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. - Knowledge graph parameters (
graph_name,hop_depth,include_paths) enable graph-enhanced retrieval.

