Search Documents By Name

Search documents by filename using full-text search.

Args: request: SearchDocumentsRequest containing: - query: Search query for document names/filenames - limit: Number of documents to return (1-100) - filters: Optional metadata filters for documents - folder_name: Optional folder to scope search - end_user_id: Optional end-user ID to scope search auth: Authentication context

request.filters accepts the same operator set as /retrieve/chunks, including $regex (with optional i flag) and $contains for substring matches.

Returns: List[Document]: List of matching documents ordered by relevance

post/search/documents

Headers

authorizationstring

Request body

querystring required

Search query for document names/filenames

limitinteger

Number of documents to return

filtersobject nullable

Optional metadata filters for documents

end_user_idstring nullable

Optional end-user scope for the search

Response

Successful Response

external_idstring
content_typestring required
filenamestring nullable
metadataobject
storage_infoobject
system_metadataobject
additional_metadataobject
chunk_idsstring[]
folder_namestring nullable
end_user_idstring nullable
app_idstring nullable

Changes