getCount()
Gets the total number of users in your instance.
function getCount(params: UserCountParams): Promise<number>const response = await clerkClient.users.getCount()Filter by query
The following example gets the total number of users matching the query test.
const response = await clerkClient.users.getCount({ query: 'test' })Filter by last sign-in date
Gets the total number of users who signed in within a specific time range.
const response = await clerkClient.users.getCount({
lastSignInAtAfter: 1700690400000,
lastSignInAtBefore: 1700690400010,
})Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint GET/users/count. See the BAPI reference for more information.
Feedback
Last updated on