Skip to main content
Search Users
Performs vector-similarity search over user profiles in the project using AI embeddings. Returns the most semantically relevant user profiles for the given query. Requires a paid plan with semantic search enabled. Authentication required. Send a user’s access token as Authorization: Bearer <token> — missing token → 401, invalid/expired token → 403 (refresh and retry). A service key is accepted too, and searches as the user named in actingUserId, or with no viewer when it names nobody. When the search has a viewer — the signed-in user, or the user a service key names in actingUserId — users with a block between them and the viewer, in either direction, are left out. Block filtering requires the moderation bundle.

Body Parameters

string
required
The natural language search query (e.g., a name, username, bio text, or description).
number
default:"20"
Maximum number of users to return. Maximum 50.
string
Service key only: the user to search as. The results are exactly what that user’s own access token would get. Leave it out to search with no viewer. A user token always acts as its own user and must not send it (400 search/acting-user-not-allowed).

Response

Returns an array of result objects ordered by similarity:

Error Responses

The endpoint requires an authenticated user. A missing token returns a bare 401; an invalid or expired token returns a bare 403 — refresh the access token and retry.
Returned when a user token, or a request with no credentials, sends actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.