Skip to main content

Overview

Returns state and a search function for finding users by natural language query. Matches against user profile text (name, username, bio, etc.) using vector similarity. For integration guidance, see Semantic Search.

Usage Example

Parameters

Call search with:
query
string
required
The natural language query string.
limit
number
Maximum number of results to return.

Returns

results
UserSearchResult[]
Ranked user results.
loading
boolean
true while a search is in progress.
error
string | null
Error message if the last search failed.
Executes the search and updates results.
reset
() => void
Clears results and error.