---
title: "Raw stats"
method: GET
path: "/stats/raw"
tags: ["Stats"]
---

# Raw stats

`GET /stats/raw`

Query raw data from a resource. Returns paginated rows with all columns.

Required permissions:
 - `stats:read`

## Query parameters

- `resource` string, required — Resource path using : as separator (e.g., 'members', 'payments:membership').
- `from` string, date-time, nullable — Start of time range (unix timestamp).
- `to` string, date-time, nullable — End of time range (unix timestamp).
- `limit` integer, nullable — Number of records to return (max 10000).
- `cursor` string, nullable — Pagination cursor for next page.
- `sort` string, nullable — Column to sort by.
- `sort_direction` 'asc' | 'desc' — The direction of the sort.
- `company_id` string, nullable — Scope query to a specific company.
- `user_id` string, nullable — Scope query to a specific user.

## Response `200`

A successful response

- object — Result from a stats query (raw, metric, or SQL).
  - `columns` string[], nullable, required — Column names in the order they appear in each data row.
  - `data` object[], nullable, required — Array of data rows, where each row is an array of values matching the columns order.
  - `debug` object, nullable, required — Debug information including engine and SQL.
    - `engine` string, nullable, required — The query engine used.
    - `request_id` string, nullable, required — Unique request identifier for debugging.
    - `sql` string, nullable, required — The generated SQL query (with IDs sanitized).
  - `node` string, nullable, required — The node path that was queried.
  - `pagination` object, nullable, required — Pagination information.
    - `next_cursor` string, nullable, required — Cursor for the next page of results.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Verification required
- `429` — Too many requests
- `500` — Internal server error

---

[API](https://skmtc.net/whop/apis/whop-api.md) · [All operations](https://skmtc.net/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whop/whop-api/versions/db0883548bc5/schema)
