Skip to main content
POST

Search Collection

Search within a collection using knowledge search with support for different search types including fulltext, semantic, and hybrid search.

Headers

Authorization
string
Bearer token for authentication
X-API-Key
string
API key for authentication (alternative to Authorization header)
X-Workspace-Id
string
Optional. Derived from API Key, but can be specified if you have access to multiple workspaces

Request Body

query
string
required
Search query string
collection_id
string
required
ID of the collection to search in
search_type
string
default:"hybrid"
Type of search to perform (vector, keyword, hybrid)
max_results
integer
default:"10"
Maximum number of results to return (1-100)
filters
object
Additional filters to apply to the search

Response

results
array
Array of search results
total_results
integer
Total number of results found
query
string
Original search query
search_type
string
Type of search performed
collection_id
string
Collection that was searched
execution_time_ms
number
Search execution time in milliseconds
Search types:
  • vector: Semantic similarity search using embeddings
  • keyword: Traditional keyword-based search
  • hybrid: Combination of vector and keyword search (recommended)