getCount()
Retrieves the total number of users.
const totalUsers = await clerkClient.users.getCount();
This can also be flitered down by adding parameters of the type UserCountParams
.
UserCountParams
Name | Type | Description |
---|---|---|
emailAddress? | string[] | The email addresses to filter by. |
phoneNumber? | string[] | The phone numbers to filter by. |
username? | string[] | The usernames to filter by. |
web3wallet? | string[] | The web3wallet to filter by. |
query? | string | A search query to filter users by. |
userId? | string | The user ID's to filter by. |
externalId? | string[] | The external ID's to filter by. |
Example
getCount({ query })
Retrieves the total number of users matching the query.
const totalUsersMatchingTest = await clerkClient.users.getCount({ query: 'test' })