Skip to main content

Method

client.users.list(args: ListUsersParameters): Promise<ListUsersResponse>

Parameters

start_cursor
string
If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.
page_size
number
The number of items from the full list desired in the response. Maximum: 100.
auth
string
Bearer token for authentication. If not provided, the client-level auth is used.

Response

object
string
Always "list".
type
string
Always "user".
results
array
An array of User objects.
next_cursor
string | null
A cursor to use in the next request to get the next page of results. If null, there are no more results.
has_more
boolean
Whether there are more results to fetch.

Example

const response = await client.users.list({
  page_size: 10,
})

console.log(response.results)

Pagination

Use the pagination helpers for easy iteration:
import { iteratePaginatedAPI } from "@notionhq/client"

for await (const user of iteratePaginatedAPI(client.users.list, {})) {
  console.log(user.name)
}

Build docs developers (and LLMs) love