Search

Search account records

Changed on

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 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=.

get/search

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Query parameters

query, string required

Text to search for, 2 to 250 characters.

types, string[]

Kinds of records to search. Defaults to every kind. account rows are account_id itself and, with include_subaccounts, its subaccounts.

account_id, string required

The account to search, prefixed biz_. Records other than accounts belong to it, or with include_subaccounts to its subaccounts. Your credential needs read access to at least one kind of record on it that search returns, or the account is a 404.

include_subaccounts, boolean

true also searches the subaccounts of a platform account_id: an ID, an email, card digits or a phone number finds their records, and the subaccounts themselves are found as account rows by name, ID or store link, or by the email of their owner, a team member or a customer. Safe to send for any account: one without subaccounts is searched as if this were false.

first, integer

Number of results to return from the start of the range.

Headers

Api-Version-Date, string
Example:2026-11-30

Pins the request to a dated API version.

Response

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

object required
data, SearchResult[] required
page_info, object required

Example response

{
  "data": [
    {
      "match_reason": "id",
      "record": {
        "type": "account"
      }
    }
  ]
}

Changes

    • info

      the security scope company:basic:read was added to the endpoint's security scheme bearerAuth

    • info

      the security scope promo_code:basic:read was removed from the endpoint's security scheme bearerAuth

    • info

      the security scope company:basic:read was added to the endpoint's security scheme bearerAuth

    1 more change in this revision