RoomScope

Cập nhật lần cuối

Xuất dữ liệu

Bản xuất CSV và Excel của các phiên đã ghi.

Mọi thao tác đều xác thực bằng API key (Authorization: Bearer <key>) và lỗi dùng chung envelope được mô tả trong Lỗi. Được tạo từ tài liệu OpenAPI của API.

Liệt kê bản xuất

GET/v1/exports

Các bản xuất của workspace, mới nhất trước. Liệt kê và tải xuống đều miễn phí.

ScopeexportCreditMiễn phí

Request

curl "https://api.next.toktokdata.live/v1/exports" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY"

Response

200 OK
{  "items": [    {      "id": "7d59b188-dc23-4ac5-908f-a3a7aaf89f36",      "dataset": "live_sessions",      "format": "csv",      "status": "ready",      "rowCount": 2,      "filename": "roomscope-live_sessions-2026-11-01.csv",      "downloadUrl": "/v1/exports/7d59b188-dc23-4ac5-908f-a3a7aaf89f36/download",      "error": null,      "createdAt": "2026-11-01T11:15:45.241Z",      "completedAt": "2026-11-01T11:15:45.240Z"    },    {      "id": "a57ddf61-5f71-4fce-82d2-8d50941e0941",      "dataset": "live_sessions",      "format": "csv",      "status": "ready",      "rowCount": 2,      "filename": "roomscope-live_sessions-2026-11-01.csv",      "downloadUrl": "/v1/exports/a57ddf61-5f71-4fce-82d2-8d50941e0941/download",      "error": null,      "createdAt": "2026-11-01T11:11:46.114Z",      "completedAt": "2026-11-01T11:11:46.113Z"    }  ],  "provenance": {    "observedAt": "2026-11-01T11:15:45.240Z",    "freshness": "near_realtime",    "source": "workspace_exports",    "sourceKind": "derived",    "coverageStatus": "observed",    "methodologyVersion": "exports-v1",    "window": null  }}

Lỗi

  • 400 Tham số hoặc body không hợp lệ; code cho biết vấn đề.
  • 401 API key bị thiếu hoặc không xác định.
  • 403 Key thiếu scope, hoặc gói không bao gồm tính năng này.
  • 429 Vượt tốc độ request (theo giây, theo phút hoặc theo ngày); hãy tuân theo Retry-After.

Tạo bản xuất

POST/v1/exports

Tạo một dataset: live_sessions (các phiên được theo dõi trong khoảng), rankings (một bảng xếp hạng chính thức theo gói của bạn, dòng bị che vẫn bị che; cần rank:read), gifters (người tặng quà của các phòng đã ghi, rangeDays tới 7 thì là 7 ngày, ngược lại là 30, region tùy chọn; cần gifter:read và gói Pro), watchlist hoặc recruit_pipeline (các mark tuyển dụng, từ gói Pro; cả hai chỉ phiên đăng nhập). Tới 1.000 dòng job trả về ready (201); nhiều hơn thì là pending (202) và được tạo ở chế độ nền: hỏi lại tới khi ready. Mỗi file kèm nguồn dữ liệu: dòng CSV kết thúc bằng source, observed_at, coverage_status và methodology, workbook có thêm sheet Provenance. Chỉ tính phí khi tạo bằng API key.

ScopeexportCreditXuất dữ liệu

Body của request

Body của request · POST /v1/exports
NameTypeDescription
datasetRequired
"live_sessions" | "rankings" | "watchlist" | "recruit_pipeline" | "gifters"
boardOptional
stringBoard key cho rankings, như trong /v1/rankings/official.
regionOptional
stringKhu vực cho rankings (và cho các creator của gifters).
Default: VN
leagueTierOptional
stringLọc league tier cho rankings (A1 tới D5).
formatRequired
"csv" | "xlsx"xlsx cần gói có bao gồm Excel.
rangeDaysOptional
integer
Default: 30

Request

curl -X POST "https://api.next.toktokdata.live/v1/exports" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY" \  -H "Content-Type: application/json" \  -d '{"dataset":"live_sessions","format":"csv","rangeDays":30}'

Response

201 Created
{  "id": "7d59b188-dc23-4ac5-908f-a3a7aaf89f36",  "dataset": "live_sessions",  "format": "csv",  "status": "ready",  "rowCount": 2,  "filename": "roomscope-live_sessions-2026-11-01.csv",  "downloadUrl": "/v1/exports/7d59b188-dc23-4ac5-908f-a3a7aaf89f36/download",  "error": null,  "createdAt": "2026-11-01T11:15:45.241Z",  "completedAt": "2026-11-01T11:15:45.240Z"}

Lỗi

  • 400 Tham số hoặc body không hợp lệ; code cho biết vấn đề.
  • 401 API key bị thiếu hoặc không xác định.
  • 402 Ví credit của workspace không đủ cho lệnh gọi; resetAt cho biết khi nào credit được reset.
  • 403 Key thiếu scope, hoặc gói không bao gồm tính năng này.
  • 429 Vượt tốc độ request (theo giây, theo phút hoặc theo ngày); hãy tuân theo Retry-After.

Lấy một bản xuất

GET/v1/exports/{job_id}

Trạng thái và liên kết tải xuống của một bản xuất.

ScopeexportCreditMiễn phí

Tham số path

Tham số path · GET /v1/exports/{job_id}
NameTypeDescription
job_idRequired
stringId của bản xuất.

Request

curl "https://api.next.toktokdata.live/v1/exports/109da4de-c958-5e53-9b3d-abd2c89b621e" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY"

Response

200 OK
{  "id": "109da4de-c958-5e53-9b3d-abd2c89b621e",  "dataset": "live_sessions",  "format": "csv",  "status": "ready",  "rowCount": 2,  "filename": "roomscope-live_sessions-2026-11-01.csv",  "downloadUrl": "/v1/exports/109da4de-c958-5e53-9b3d-abd2c89b621e/download",  "error": null,  "createdAt": "2026-11-01T09:51:44.935Z",  "completedAt": "2026-11-01T09:51:44.935Z",  "provenance": {    "observedAt": "2026-11-01T09:51:44.935Z",    "freshness": "near_realtime",    "source": "workspace_exports",    "sourceKind": "derived",    "coverageStatus": "observed",    "methodologyVersion": "exports-v1",    "window": null  }}

Lỗi

  • 400 Tham số hoặc body không hợp lệ; code cho biết vấn đề.
  • 401 API key bị thiếu hoặc không xác định.
  • 403 Key thiếu scope, hoặc gói không bao gồm tính năng này.
  • 429 Vượt tốc độ request (theo giây, theo phút hoặc theo ngày); hãy tuân theo Retry-After.

Tải xuống bản xuất

GET/v1/exports/{job_id}/download

Chính tệp đó (text/csv hoặc Excel), dưới dạng tệp đính kèm. Trả về 409 cho tới khi sẵn sàng.

ScopeexportCreditMiễn phí

Tham số path

Tham số path · GET /v1/exports/{job_id}/download
NameTypeDescription
job_idRequired
stringId của bản xuất.

Request

curl "https://api.next.toktokdata.live/v1/exports/109da4de-c958-5e53-9b3d-abd2c89b621e/download" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY"

Response

200 trả về tệp dưới dạng tệp đính kèm.

Lỗi

  • 400 Tham số hoặc body không hợp lệ; code cho biết vấn đề.
  • 401 API key bị thiếu hoặc không xác định.
  • 403 Key thiếu scope, hoặc gói không bao gồm tính năng này.
  • 429 Vượt tốc độ request (theo giây, theo phút hoặc theo ngày); hãy tuân theo Retry-After.
Trang này có hữu ích không?