---
title: "Search"
method: POST
path: "/v1/users/search"
tags: ["User"]
---

# Search

`POST /v1/users/search`

## Request

- Base URL: `https://api.stytch.com`
- URL: `https://api.stytch.com/v1/users/search`
- Auth: HTTP basic

**Warning**: This endpoint is not recommended for use in login flows. Scaling issues may occur, as search performance may vary from ~150 milliseconds to 9 seconds depending on query complexity and rate limits are set to 150 requests/minute.

Search for Users within your Stytch Project.

Use the `query` object to filter by different fields. See the `query.operands.filter_value` documentation below for a list of available filters.

### Export all User data

Submit an empty `query` in your Search Users request to return all of your Stytch Project's Users.

[This Github repository](https://github.com/stytchauth/stytch-node-export-users) contains a utility that leverages the Search Users endpoint to export all of your User data to a CSV or JSON file.

## Request body

- ApiUserV1SearchRequest: Request type
  - `cursor` string: The `cursor` field allows you to paginate through your results. Each result array is limited to 1000 results. If your query returns more than 1000 results, you will need to paginate the responses using the `cursor`. If you receive a response that includes a non-null `next_cursor` in the `results_metadata` object, repeat the search call with the `next_cursor` value set to the `cursor` field to retrieve the next page of results. Continue to make search calls until the `next_cursor` in the response is null.
  - `limit` integer: The number of search results to return per page. The default limit is 100. A maximum of 1000 results can be returned by a single search request. If the total size of your result set is greater than one page size, you must paginate the response. See the `cursor` field.
  - `query` ApiUserV1SearchUsersQuery
    - `operator` 'OR' | 'AND', required
    - `operands` object[], required: An array of operand objects that contains all of the filters and values to apply to your search search query.

## Response `200`

Successful response

- ApiUserV1SearchResponse
  - `request_id` string, required: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
  - `results` ApiUserV1User[], required: An array of results that match your search query.
    - `user_id` string, required: The unique ID of the affected User.
    - `emails` ApiUserV1Email[], required: An array of email objects for the User.
      - `email_id` string, required: The unique ID of a specific email address.
      - `email` string, required: The email address.
      - `verified` boolean, required: The verified boolean denotes whether or not this send method, e.g. phone number, email address, etc., has been successfully authenticated by the User.
    - `status` string, required: The status of the User. The possible values are `pending` and `active`.
    - `phone_numbers` ApiUserV1PhoneNumber[], required: An array of phone number objects linked to the User.
      - `phone_id` string, required: The unique ID for the phone number.
      - `phone_number` string, required: The phone number.
      - `verified` boolean, required: The verified boolean denotes whether or not this send method, e.g. phone number, email address, etc., has been successfully authenticated by the User.
    - `webauthn_registrations` ApiUserV1WebAuthnRegistration[], required: An array that contains a list of all Passkey or WebAuthn registrations for a given User in the Stytch API.
      - `webauthn_registration_id` string, required: The unique ID for the Passkey or WebAuthn registration.
      - `domain` string, required: The `domain` on which Passkey or WebAuthn registration was started. This will be the domain of your app.
      - `user_agent` string, required: The user agent of the User.
      - `verified` boolean, required: The verified boolean denotes whether or not this send method, e.g. phone number, email address, etc., has been successfully authenticated by the User.
      - `authenticator_type` string, required: The `authenticator_type` string displays the requested authenticator type of the Passkey or WebAuthn device. The two valid types are "platform" and "cross-platform". If no value is present, the Passkey or WebAuthn device was created without an authenticator type preference.
      - `name` string, required: The `name` of the Passkey or WebAuthn registration.
    - `providers` ApiUserV1OAuthProvider[], required: An array of OAuth `provider` objects linked to the User.
      - `provider_type` string, required: Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Facebook, GitHub etc.
      - `provider_subject` string, required: The unique identifier for the User within a given OAuth provider. Also commonly called the "sub" or "Subject field" in OAuth protocols.
      - `profile_picture_url` string, required: If available, the `profile_picture_url` is a url of the User's profile picture set in OAuth identity the provider that the User has authenticated with, e.g. Facebook profile picture.
      - `locale` string, required: If available, the `locale` is the User's locale set in the OAuth identity provider that the user has authenticated with.
      - `oauth_user_registration_id` string, required: The unique ID for an OAuth registration.
    - `totps` ApiUserV1TOTP[], required: An array containing a list of all TOTP instances for a given User in the Stytch API.
      - `totp_id` string, required: The unique ID for a TOTP instance.
      - `verified` boolean, required: The verified boolean denotes whether or not this send method, e.g. phone number, email address, etc., has been successfully authenticated by the User.
    - `crypto_wallets` ApiUserV1CryptoWallet[], required: An array contains a list of all crypto wallets for a given User in the Stytch API.
      - `crypto_wallet_id` string, required: The unique ID for a crypto wallet
      - `crypto_wallet_address` string, required: The actual blockchain address of the User's crypto wallet.
      - `crypto_wallet_type` string, required: The blockchain that the User's crypto wallet operates on, e.g. Ethereum, Solana, etc.
      - `verified` boolean, required: The verified boolean denotes whether or not this send method, e.g. phone number, email address, etc., has been successfully authenticated by the User.
    - `biometric_registrations` ApiUserV1BiometricRegistration[], required: An array that contains a list of all biometric registrations for a given User in the Stytch API.
      - `biometric_registration_id` string, required: The unique ID for a biometric registration.
      - `verified` boolean, required: The verified boolean denotes whether or not this send method, e.g. phone number, email address, etc., has been successfully authenticated by the User.
    - `is_locked` boolean, required: Whether the User is temporarily locked due to too many failed authentication attempts. See the [User Locking Guide](https://stytch.com/docs/resources/platform/user-locks) for more information.
    - `roles` string[], required: Roles assigned to this User. See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment.
    - `name` ApiUserV1Name
      - `first_name` string: The first name of the user.
      - `middle_name` string: The middle name(s) of the user.
      - `last_name` string: The last name of the user.
    - `created_at` string: The timestamp of the User's creation. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`.
    - `password` ApiUserV1Password
      - `password_id` string, required: The unique ID of a specific password
      - `requires_reset` boolean, required: Indicates whether this password requires a password reset
    - `trusted_metadata` object: The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
    - `untrusted_metadata` object: The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critical information.** See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
    - `external_id` string: An identifier that can be used in most API calls where a `member_id` is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters. External IDs must be unique within the project.
    - `lock_created_at` string: When the user lock was created, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`.
    - `lock_expires_at` string: When the user lock expires, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`.
  - `results_metadata` ApiUserV1ResultsMetadata, required
    - `total` integer, required: The total number of results returned by your search query. If totals have been disabled for your Stytch Workspace to improve search performance, the value will always be -1.
    - `next_cursor` string: The `next_cursor` string is returned when your search result contains more than one page of results. This value is passed into your next search call in the `cursor` field.
  - `status_code` integer, required: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `429`: Too Many Requests
- `500`: Internal server error

## Changes

- **2026-03-07** `110f26a94e5b`: 1 info
  - endpoint added
- **2026-03-06** `9cab20b8eca7`: 1 breaking
  - api path removed without deprecation
- **2026-01-09** `7dfcc14e566c`: 3 breaking
  - the `query/operands/items/` request property type changed from `string` to `object`
  - the `results/items/trusted_metadata` response's property type changed from `string` to `object` for status `200`
  - the `results/items/untrusted_metadata` response's property type changed from `string` to `object` for status `200`
- **2025-09-24** `d1a2040cf009`: 1 info
  - added the required property `results/items/roles` to the response with the `200` status
- **2025-09-17** `8270cf3a3d4c`: 3 info
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `500`
  - added the non-success response with the status `429`

[Operation history](https://skmtc.dev/stytch/apis/stytch-api/changes/v1/users/search/post.md)

---

[API](https://skmtc.dev/stytch/apis/stytch-api.md) - [All operations](https://skmtc.dev/stytch/apis/stytch-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stytch/apis/stytch-api/revisions/6d1ff7474803?raw)
