Skip to main content
GET
/
stats
/
raw
Raw stats
curl --request GET \
  --url https://api.whop.com/api/v1/stats/raw \
  --header 'Authorization: Bearer <token>'
{
  "columns": [
    "<string>"
  ],
  "data": [
    {}
  ],
  "debug": {
    "engine": "<string>",
    "request_id": "<string>",
    "sql": "<string>"
  },
  "node": "<string>",
  "pagination": {
    "next_cursor": "<string>"
  }
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Query Parameters

resource
string
required

Resource path using : as separator (e.g., 'members', 'payments:membership').

from
string<date-time> | null

Start of time range (unix timestamp).

Example:

"2023-12-01T05:00:00.401Z"

to
string<date-time> | null

End of time range (unix timestamp).

Example:

"2023-12-01T05:00:00.401Z"

limit
integer | null

Number of records to return (max 10000).

Example:

42

cursor
string | null

Pagination cursor for next page.

sort
string | null

Column to sort by.

sort_direction
enum<string> | null

Sort direction (asc or desc).

Available options:
asc,
desc
company_id
string | null

Scope query to a specific company.

Example:

"biz_xxxxxxxxxxxxxx"

user_id
string | null

Scope query to a specific user.

Example:

"user_xxxxxxxxxxxxx"

Response

A successful response

Result from a stats query (raw, metric, or SQL).

columns
string[] | null
required

Column names in the order they appear in each data row.

Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.

data
object[] | null
required

Array of data rows, where each row is an array of values matching the columns order.

debug
object
required

Debug information including engine and SQL.

node
string | null
required

The node path that was queried.

pagination
object
required

Pagination information.