> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/users/llms.txt)
> Source: https://docs.saleor.io/api-reference/users/queries/customers

# customers Query

List of the shop's customers. This list includes all users who registered through the accountRegister mutation. Additionally, staff users who have placed an order using their account will also appear in this list.

Requires one of the following permissions: MANAGE\_ORDERS MANAGE\_USERS

```graphql
customers(
  filter: CustomerFilterInput
  where: CustomerWhereInput
  sortBy: UserSortingInput
  search: String
  before: String
  after: String
  first: Int
  last: Int
): UserCountableConnection
```

Details

```graphql
type UserCountableConnection {
  pageInfo: PageInfo!
  edges: [UserCountableEdge!]!
  totalCount: Int
}
```

<a id="arguments"></a>

### Arguments

<a id="where"></a>

#### [`where`](#where) ● [`CustomerWhereInput`](/api-reference/users/inputs/customer-where-input.md)

Where filtering options for customers.

Added in Saleor 3.22

<a id="sort-by"></a>

#### [`sortBy`](#sort-by) ● [`UserSortingInput`](/api-reference/users/inputs/user-sorting-input.md)

Sort customers.

<a id="search"></a>

#### [`search`](#search) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Search customers.

Added in Saleor 3.22

<a id="before"></a>

#### [`before`](#before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come before the specified cursor.

<a id="after"></a>

#### [`after`](#after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come after the specified cursor.

<a id="first"></a>

#### [`first`](#first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="last"></a>

#### [`last`](#last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

Show deprecatedHide deprecated

<a id="filter"></a>

#### [`filter`](#filter) ● [`CustomerFilterInput`](/api-reference/users/inputs/customer-filter-input.md)

DEPRECATED

Use `where` filter instead.

Filtering options for customers.

<a id="type"></a>

### Type

<a id="usercountableconnection"></a>

#### [`UserCountableConnection`](/api-reference/users/objects/user-countable-connection.md)
