---
title: "Search account records"
method: GET
path: "/search"
tags: ["Search"]
---

# Search account records

`GET /search`

## Request

- Base URL: `https://api.whop.com/api/v1`
- URL: `https://api.whop.com/api/v1/search`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Searches one account's records in one call. `account` rows include the account in `account_id`. Use `include_subaccounts` to include its subaccounts. Every other row belongs to one of those accounts.

Each `type` needs its own read permission on the record's account, and rows you can't read are left out without an error: `account` (`biz_`, `company:basic:read`), `member` (`mber_`, `member:basic:read`), `membership` (`mem_`, `member:basic:read`), `payment` (`pay_`, `payment:basic:read`), `affiliate` (`aff_`, `affiliate:basic:read`), `review` (`rev_`, `company:basic:read`), `resolution_center_case` (`reso_`, `payment:resolution_center_case:read`) and `promo_code` (`promo_`, `promo_code:basic:read`). A query containing `@` also needs `member:email:read`, and a phone match `member:phone:read`. An invoice's number finds the invoice as its `payment`.

`query` must be 2 to 250 characters after trimming. A full card number returns a `400`. `data` lists identifier matches first, such as an ID, email address, card digits or invoice number. Within each identifier match type, the newest records appear first. Queries of 3 or more characters also return ranked results after identifier matches, best match first. Each record appears once. `match_reason` explains why a record matched. [Search](/api-reference/search/search) lists the query shapes and match reasons.

`first` limits the response to 20 rows by default and up to 100. Search returns a single page. To filter one resource or page through every match, use its list endpoint, such as `GET /payments?query=`.

## Query parameters

- `query` string, required
- `types` string[]
- `account_id` string, required
- `include_subaccounts` boolean
- `first` integer

## Headers

- `Api-Version-Date` string

## Response `200`

Search results: identifier matches first, then ranked rows, best match first.

- object
  - `data` SearchResult[], required
    - `match_reason` 'id' | 'owner_email' | 'team_member_email' | 'email' | 'customer_email' | 'card' | 'phone' | 'payment_number' | 'link' | 'name' | 'null', nullable, required: Why the row matched, or `null` for a ranked row whose whole ID or whole title isn't the query. `id`: its ID, or a related one such as its user's, its dispute's, or a plan or payout ID for an account. `link`: a whop.com store or product link. `name`: its whole title. `email`: the email of the user it belongs to. `owner_email`, `team_member_email` or `customer_email`: the email of a subaccount's owner, a member of its team, or one of its customers. `card`: its card's first 6 or 8 and last 4 digits, or the last 4 alone. `phone`: the phone number of the user it belongs to. `payment_number`: the number of the invoice a payment collects, so an invoice from `GET /invoices` comes back as its `payment`.
    - `record` union, required: The matched record. Get the full record from its own endpoint by `id`.
      - SearchRecordAccount
        - `banner_image_url` string, nullable, required: Account banner image URL. `null` when there's none.
        - `description` string, nullable, required: Short text about the record, such as an account's headline or a case's reason. Display text in your locale that can change without a version change. `null` when there's none.
        - `id` string, required: Account ID, prefixed `biz_`.
        - `image_url` string, nullable, required: Logo or avatar. `null` when there's none.
        - `parent_account_id` string, nullable, required: Platform account this subaccount belongs to, prefixed `biz_`. `null` when it isn't a subaccount.
        - `subtitle` string, nullable, required: Line shown under the title, such as the account or product the record belongs to. Display text in your locale that can change without a version change. `null` when there's none.
        - `title` string, nullable, required: Record name, such as a customer's name or a promo code. Display text in your locale that can change without a version change, so show it rather than parse it. `null` when the record has no name.
        - `type` 'account', required: Always `account`: `account_id` itself or, when `include_subaccounts` is `true`, one of its subaccounts.
      - SearchRecordMember
        - `account_id` string, required: Account the record belongs to, prefixed `biz_`.
        - `description` string, nullable, required: Short text about the record, such as an account's headline or a case's reason. Display text in your locale that can change without a version change. `null` when there's none.
        - `email` string, nullable, required: The user's email address. `null` without `member:email:read` on the account, when the buyer is another business, or when the user has no assigned email.
        - `id` string, required: Member ID, prefixed `mber_`.
        - `image_url` string, nullable, required: Logo or avatar. `null` when there's none.
        - `status` 'joined' | 'left', required: `joined` while the member is part of the account, `left` after they leave.
        - `subtitle` string, nullable, required: Line shown under the title, such as the account or product the record belongs to. Display text in your locale that can change without a version change. `null` when there's none.
        - `title` string, nullable, required: Record name, such as a customer's name or a promo code. Display text in your locale that can change without a version change, so show it rather than parse it. `null` when the record has no name.
        - `type` 'member', required: Always `member`.
        - `username` string, nullable, required: The user's username. `null` when the buyer is another business.
      - SearchRecordMembership
        - `account_id` string, required: Account the record belongs to, prefixed `biz_`.
        - `description` string, nullable, required: Short text about the record, such as an account's headline or a case's reason. Display text in your locale that can change without a version change. `null` when there's none.
        - `id` string, required: Membership ID, prefixed `mem_`.
        - `image_url` string, nullable, required: Logo or avatar. `null` when there's none.
        - `product_id` string, required: Product the membership is for, prefixed `prod_`.
        - `status` 'trialing' | 'active' | 'past_due' | 'completed' | 'canceled' | 'expired' | 'unresolved' | 'scheduled' | 'null', nullable, required: Billing state of the membership, as on the membership resource. `null` while the membership is a draft: during checkout before its first payment settles, or while its waitlist entry is pending.
        - `subtitle` string, nullable, required: Line shown under the title, such as the account or product the record belongs to. Display text in your locale that can change without a version change. `null` when there's none.
        - `title` string, nullable, required: Record name, such as a customer's name or a promo code. Display text in your locale that can change without a version change, so show it rather than parse it. `null` when the record has no name.
        - `type` 'membership', required: Always `membership`.
      - SearchRecordPayment
        - `account_id` string, required: Account that took the payment, prefixed `biz_`.
        - `created_at` string, required: When the payment was created, as an ISO 8601 timestamp.
        - `description` string, nullable, required: Short text about the record, such as an account's headline or a case's reason. Display text in your locale that can change without a version change. `null` when there's none.
        - `id` string, required: Payment ID, prefixed `pay_`.
        - `image_url` string, nullable, required: Logo or avatar. `null` when there's none.
        - `paid_at` string, nullable, required: When the money was collected, as an ISO 8601 timestamp. `null` while it has not been.
        - `presentment_total` Money, nullable, required
          - `amount` string, required: The amount in major units, as an exact decimal string. For example, `"10.00"` is ten dollars. It is a string so that no float rounds it in transit.
          - `currency` string, required: Three-letter ISO 4217 currency code, lowercase.
          - `decimals` integer, required: How many decimal places the amount carries. This is the precision the charge itself runs at.
          - `display_decimals` integer, required: How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
        - `status` 'draft' | 'open' | 'authorized' | 'paid' | 'pending' | 'uncollectible' | 'unresolved' | 'void', required: Lifecycle state of the charge, as on the payment resource.
        - `substatus` 'succeeded' | 'requires_capture' | 'pending' | 'failed' | 'blocked' | 'past_due' | 'canceled' | 'price_too_low' | 'uncollectible' | 'refunded' | 'auto_refunded' | 'partially_refunded' | 'dispute_warning' | 'dispute_needs_response' | 'dispute_warning_needs_response' | 'resolution_needs_response' | 'dispute_under_review' | 'dispute_warning_under_review' | 'resolution_under_review' | 'dispute_won' | 'dispute_warning_closed' | 'resolution_won' | 'dispute_lost' | 'dispute_closed' | 'resolution_lost' | 'drafted' | 'incomplete' | 'unresolved' | 'open_dispute' | 'open_resolution', required: The dashboard's finer-grained reading of the payment, folding in refunds, disputes and Resolution Center cases.
        - `subtitle` string, nullable, required: Line shown under the title, such as the account or product the record belongs to. Display text in your locale that can change without a version change. `null` when there's none.
        - `title` string, nullable, required: Record name, such as a customer's name or a promo code. Display text in your locale that can change without a version change, so show it rather than parse it. `null` when the record has no name.
        - `total` Money, nullable, required
          - `amount` string, required: The amount in major units, as an exact decimal string. For example, `"10.00"` is ten dollars. It is a string so that no float rounds it in transit.
          - `currency` string, required: Three-letter ISO 4217 currency code, lowercase.
          - `decimals` integer, required: How many decimal places the amount carries. This is the precision the charge itself runs at.
          - `display_decimals` integer, required: How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
        - `type` 'payment', required: Always `payment`.
      - SearchRecordAffiliate
        - `account_id` string, required: Account the record belongs to, prefixed `biz_`.
        - `description` string, nullable, required: Short text about the record, such as an account's headline or a case's reason. Display text in your locale that can change without a version change. `null` when there's none.
        - `id` string, required: Affiliate ID, prefixed `aff_`.
        - `image_url` string, nullable, required: Logo or avatar. `null` when there's none.
        - `subtitle` string, nullable, required: Line shown under the title, such as the account or product the record belongs to. Display text in your locale that can change without a version change. `null` when there's none.
        - `title` string, nullable, required: Record name, such as a customer's name or a promo code. Display text in your locale that can change without a version change, so show it rather than parse it. `null` when the record has no name.
        - `total_referrals_count` integer, required: Referrals credited to the affiliate, as on the affiliate resource.
        - `type` 'affiliate', required: Always `affiliate`.
      - SearchRecordReview
        - `account_id` string, required: Account the record belongs to, prefixed `biz_`.
        - `created_at` string, required: When the review was posted, as an ISO 8601 timestamp.
        - `description` string, nullable, required: Short text about the record, such as an account's headline or a case's reason. Display text in your locale that can change without a version change. `null` when there's none.
        - `id` string, required: Review ID, prefixed `rev_`.
        - `image_url` string, nullable, required: Logo or avatar. `null` when there's none.
        - `subtitle` string, nullable, required: Line shown under the title, such as the account or product the record belongs to. Display text in your locale that can change without a version change. `null` when there's none.
        - `title` string, nullable, required: Record name, such as a customer's name or a promo code. Display text in your locale that can change without a version change, so show it rather than parse it. `null` when the record has no name.
        - `type` 'review', required: Always `review`.
      - SearchRecordResolutionCenterCase
        - `account_id` string, required: Account the record belongs to, prefixed `biz_`.
        - `description` string, nullable, required: Short text about the record, such as an account's headline or a case's reason. Display text in your locale that can change without a version change. `null` when there's none.
        - `id` string, required: Resolution center case ID, prefixed `reso_`.
        - `image_url` string, nullable, required: Logo or avatar. `null` when there's none.
        - `subtitle` string, nullable, required: Line shown under the title, such as the account or product the record belongs to. Display text in your locale that can change without a version change. `null` when there's none.
        - `title` string, nullable, required: Record name, such as a customer's name or a promo code. Display text in your locale that can change without a version change, so show it rather than parse it. `null` when the record has no name.
        - `type` 'resolution_center_case', required: Always `resolution_center_case`.
      - SearchRecordPromoCode
        - `account_id` string, required: Account the record belongs to, prefixed `biz_`.
        - `amount_off` number, required: Discount amount. Percentage discounts are represented as a decimal fraction.
        - `currency` 'usd' | 'sgd' | 'inr' | 'aud' | 'brl' | 'cad' | 'dkk' | 'eur' | 'nok' | 'gbp' | 'sek' | 'chf' | 'hkd' | 'huf' | 'jpy' | 'mxn' | 'myr' | 'pln' | 'czk' | 'nzd' | 'aed' | 'eth' | 'ape' | 'cop' | 'ron' | 'thb' | 'bgn' | 'idr' | 'dop' | 'php' | 'try' | 'krw' | 'twd' | 'vnd' | 'pkr' | 'clp' | 'uyu' | 'ars' | 'zar' | 'dzd' | 'tnd' | 'mad' | 'kes' | 'kwd' | 'jod' | 'all' | 'xcd' | 'amd' | 'bsd' | 'bhd' | 'bob' | 'bam' | 'khr' | 'crc' | 'xof' | 'egp' | 'etb' | 'gmd' | 'ghs' | 'gtq' | 'gyd' | 'ils' | 'jmd' | 'mop' | 'mga' | 'mur' | 'mdl' | 'mnt' | 'nad' | 'ngn' | 'mkd' | 'omr' | 'pyg' | 'pen' | 'qar' | 'rwf' | 'sar' | 'rsd' | 'lkr' | 'tzs' | 'ttd' | 'uzs' | 'rub' | 'btc' | 'cny' | 'usdt' | 'kzt' | 'awg' | 'whop_usd' | 'xau' | 'hnl', required: Currency used for a fixed-amount discount.
        - `description` string, nullable, required: Short text about the record, such as an account's headline or a case's reason. Display text in your locale that can change without a version change. `null` when there's none.
        - `id` string, required: Promo code ID, prefixed `promo_`.
        - `image_url` string, nullable, required: Logo or avatar. `null` when there's none.
        - `promo_duration_months` integer, required: Billing intervals the discount applies to. Never `null`.
        - `promo_type` 'percentage' | 'flat_amount', required: Whether the discount is percentage-based or a fixed amount.
        - `subtitle` string, nullable, required: Line shown under the title, such as the account or product the record belongs to. Display text in your locale that can change without a version change. `null` when there's none.
        - `title` string, nullable, required: Record name, such as a customer's name or a promo code. Display text in your locale that can change without a version change, so show it rather than parse it. `null` when the record has no name.
        - `type` 'promo_code', required: Always `promo_code`.
  - `page_info` object, required
    - `end_cursor` string, nullable, required
    - `has_next_page` boolean, required
    - `has_previous_page` boolean, required
    - `start_cursor` string, nullable, required

## Other responses

- `400`: Invalid Parameters
- `401`: Unauthorized
- `404`: Resource not found

## Changes

- **2026-12-01** `b10d1ab093e8`: 2 info
  - the security scope `company:basic:read` was added to the endpoint's security scheme `bearerAuth`
  - the security scope `promo_code:basic:read` was removed from the endpoint's security scheme `bearerAuth`
- **2026-12-01** `0b014d58cbe4`: 2 info
  - the security scope `company:basic:read` was added to the endpoint's security scheme `bearerAuth`
  - the security scope `promo_code:basic:read` was removed from the endpoint's security scheme `bearerAuth`
- **2026-12-01** `c6a4b64f4c92`: 2 info
  - the security scope `company:basic:read` was added to the endpoint's security scheme `bearerAuth`
  - the security scope `promo_code:basic:read` was removed from the endpoint's security scheme `bearerAuth`
- **2026-12-01** `09b51f08837d`: 2 info
  - the security scope `company:basic:read` was added to the endpoint's security scheme `bearerAuth`
  - the security scope `promo_code:basic:read` was removed from the endpoint's security scheme `bearerAuth`
- **2026-12-01** `c05bd55c400b`: 2 info
  - the security scope `company:basic:read` was added to the endpoint's security scheme `bearerAuth`
  - the security scope `promo_code:basic:read` was removed from the endpoint's security scheme `bearerAuth`

[Operation history](https://skmtc.dev/whop/apis/whop-api/changes/search/get.md)

---

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