# getUserListWithoutCount()

> `getUserListWithoutCount()` requires `@clerk/backend` 3.32.0 or later.

Retrieves the list of users in your instance without their total count. It takes the same parameters as `getUserList()` and returns the same users, but makes no request to count them, which can be slow for a search over many users. By default, the list is returned in descending order by creation date (newest first).

There is no total, so page until a page holds fewer users than its `limit`.

Returns an object with a `data` property that contains an array of [`User`](https://clerk.com/docs/reference/backend/types/backend-user.md) objects.

```typescript
function getUserListWithoutCount(params: UserListParams): Promise<{ data: User[] }>
```

## `UserListParams`

| Property                      | Type                                                                                                                                                                                     | Description                                                                                                                                                                            |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `createdAtAfter?`             | `number`                                                                                                                                                                                 | Filters users who were created after the given date (with millisecond precision).                                                                                                      |
| `createdAtBefore?`            | `number`                                                                                                                                                                                 | Filters users who were created before the given date (with millisecond precision).                                                                                                     |
| `emailAddress?`               | `string[]`                                                                                                                                                                    | Filters users with the specified email addresses. Accepts up to 100 email addresses.                                                                                                   |
| `externalId?`                 | `string[]`                                                                                                                                                                    | Filters users with the specified external IDs. Accepts up to 100 external IDs.                                                                                                         |
| ~~`last_active_at_since?`~~   | `number`                                                                                                                                                                                 | **Deprecated.** Use `lastActiveAtAfter` instead. This parameter will be removed in a future version.                                                                                   |
| `lastActiveAtAfter?`          | `number`                                                                                                                                                                                 | Filters users who were last active after the given date (with millisecond precision).                                                                                                  |
| `lastActiveAtBefore?`         | `number`                                                                                                                                                                                 | Filters users who were last active before the given date (with millisecond precision).                                                                                                 |
| `lastSignInAtAfter?`          | `number`                                                                                                                                                                                 | Filters users who were last signed in after the given date (with millisecond precision).                                                                                               |
| `lastSignInAtBefore?`         | `number`                                                                                                                                                                                 | Filters users who were last signed in before the given date (with millisecond precision).                                                                                              |
| <a id="limit"></a> `limit?`   | `number`                                                                                                                                                                                 | Maximum number of items returned per request. Must be an integer greater than zero and less than `501`. Can be used for paginating the results together with offset. Defaults to `10`. |
| <a id="offset"></a> `offset?` | `number`                                                                                                                                                                                 | Skip the first `offset` items when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. Defaults to `0`.                               |
| `orderBy?`                    | `WithSign`<`"created_at" | "updated_at" | "email_address" | "web3wallet" | "first_name" | "last_name" | "phone_number" | "username" | "last_active_at" | "last_sign_in_at"`> | Filters users in a particular order. Prefix a value with `+` to sort in ascending order, or `-` to sort in descending order. Defaults to `-created_at`.                                |
| `organizationId?`             | `string[]`                                                                                                                                                                    | Filters users who are members of the specified Organizations. Accepts up to 100 Organization IDs.                                                                                      |
| `phoneNumber?`                | `string[]`                                                                                                                                                                    | Filters users with the specified phone numbers. Accepts up to 100 phone numbers.                                                                                                       |
| `query?`                      | `string`                                                                                                                                                                                 | Filters users matching the given query across email addresses, phone numbers, usernames, Web3 wallet addresses, user IDs, first names, and last names. Partial matches supported.      |
| `startingAfter?`              | `string`                                                                                                                                                                                 | The ID of the last user on the previous page. Only valid when `orderBy` is omitted, `created_at`, `+created_at`, or `-created_at`, and `offset` is omitted or `0`.                     |
| `userId?`                     | `string[]`                                                                                                                                                                    | Filters users with the specified user IDs. Accepts up to 100 user IDs.                                                                                                                 |
| `username?`                   | `string[]`                                                                                                                                                                    | Filters users with the specified usernames. Accepts up to 100 usernames.                                                                                                               |
| `web3Wallet?`                 | `string[]`                                                                                                                                                                    | Filters users with the specified Web3 wallet addresses. Accepts up to 100 Web3 wallet addresses.                                                                                       |

## Usage

> Using `clerkClient` varies based on the SDK you're using. Refer to the [overview](https://clerk.com/docs/reference/backend/overview.md) for usage details, including guidance on [how to access the `userId` and other properties](https://clerk.com/docs/reference/backend/overview.md#example-get-the-userid-and-other-properties).

### Basic

```tsx
const { data } = await clerkClient.users.getUserListWithoutCount()
```

### Page through users

Gets users who match the query `test`, 100 at a time. Pagination uses `startingAfter`, which works only with `created_at` ordering (the default). See [Retrieve every user](https://clerk.com/docs/reference/backend/user/get-user-list.md#retrieve-every-user).

```tsx
const limit = 100
let startingAfter: string | undefined

while (true) {
  const { data } = await clerkClient.users.getUserListWithoutCount({
    query: 'test',
    limit,
    startingAfter,
  })

  for (const user of data) {
    // Replace this with your own logic.
    console.log(user.id)
  }

  if (data.length < limit) break
  startingAfter = data[data.length - 1].id
}
```

To page in any order, or to filter by metadata, use [`searchUsers()`](https://clerk.com/docs/reference/backend/user/search-users.md).

## Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint `GET/users`. See the [BAPI reference](https://clerk.com/docs/reference/backend-api/tag/users/GET/users) for more information.

---

## Sitemap

[Overview of all docs pages](https://clerk.com/docs/llms.txt)
