Skip to main content
GET
/
companies
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  appID: 'app_xxxxxxxxxxxxxx',
  apiKey: 'My API Key',
});

// Automatically fetches more pages as needed.
for await (const companyListResponse of client.companies.list({ parent_company_id: 'parent_company_id' })) {
  console.log(companyListResponse.id);
}
{
  "data": [
    {
      "id": "biz_xxxxxxxxxxxxxx",
      "title": "<string>",
      "description": "<string>",
      "verified": true,
      "business_type": "education_program",
      "industry_type": "trading",
      "created_at": "2023-12-01T05:00:00.401Z",
      "updated_at": "2023-12-01T05:00:00.401Z",
      "member_count": 42,
      "owner_user": {
        "id": "user_xxxxxxxxxxxxx",
        "name": "<string>",
        "username": "<string>"
      },
      "route": "<string>",
      "logo": {
        "url": "<string>"
      },
      "published_reviews_count": 42,
      "metadata": {}
    }
  ],
  "page_info": {
    "end_cursor": "<string>",
    "start_cursor": "<string>",
    "has_next_page": true,
    "has_previous_page": true
  }
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Query Parameters

after
string | null

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

before
string | null

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

first
integer | null

Returns the first n elements from the list.

Example:

42

last
integer | null

Returns the last n elements from the list.

Example:

42

parent_company_id
string
required

The ID of the parent company to list sub companies for

direction
enum<string> | null

The direction to sort the companies by The direction of the sort.

Available options:
asc,
desc

Response

A successful response

The connection type for PublicCompany.

data
object[]
required

A list of nodes.

page_info
object
required

Information to aid in pagination.