Search Users
Full-text search across users by name, email, or metadata.
GET
/api/v1/users/searchPerforms a full-text search across all users in your organization. Results are ranked by relevance score.
Tip
Search is case-insensitive and supports partial matches.
"ali" will match "Alice".Relevance Scoring
Results include a score field (0–1) indicating match quality. Matches on email are weighted higher than name, which is higher than metadata.
Rate Limiting
Search endpoints are subject to a stricter rate limit of 100 req/min per token to protect query performance.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| q* | string | ✓ | Search query. Matched against name, email, and metadata values. Minimum 2 characters. |
| limit | integer | — | Maximum number of results to return. Default: 10. Max: 50. |
| role | string | — | Filter results by role. Allowed: member, admin, viewer. |
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization* | string | ✓ | Bearer token. Requires users:read scope. |
Responses
| Status | Description |
|---|---|
| 200 | Search results. |
| 400 | Query too short (less than 2 characters) or invalid filter value. |
| 401 | Unauthorized. |
Examples
curl "https://api.example.com/v1/users/search?q=alice&role=admin" \
-H "Authorization: Bearer YOUR_TOKEN"
const params = new URLSearchParams({ q: 'alice', role: 'admin' });
const { results } = await fetch(`/api/v1/users/search?${params}`, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
}).then(r => r.json());
console.log(`${results.length} results`);
import requests
r = requests.get(
'https://api.example.com/v1/users/search',
params={'q': 'alice', 'role': 'admin'},
headers={'Authorization': 'Bearer YOUR_TOKEN'}
)
print(r.json()['results'])