Cập nhật lần cuối
Live
Recorded LIVE sessions, per-creator performance and the LIVE video source.
Every operation authenticates with an API key (Authorization: Bearer <key>) and errors use the shared envelope described in Errors. Generated from the API's OpenAPI document.
Get a creator's LIVE performance
/v1/live/creators/{uid}/performanceOne row per recorded session: duration, peak viewers, gifts, diamonds and distinct gifters.
Path parameters
| Name | Type | Description |
|---|---|---|
uidRequired | string | Creator handle without @ (linh.live) or numeric TikTok user id. |
Query parameters
| Name | Type | Description |
|---|---|---|
cursorOptional | string | Opaque cursor from nextCursor of the previous page. |
limitOptional | integer | Rows per page. Range 1–100. Default: 50 |
Request
curl "https://api.toktokdata.live/v1/live/creators/linh.live/performance" \ -H "Authorization: Bearer $ROOMSCOPE_API_KEY"Response
{ "data": { "items": [ { "sessionId": "f18eaa3e-a762-543d-9ea5-178271dc43f9", "sessionStartedAt": "2026-11-01T07:51:44.935Z", "creatorUniqueId": "linh.live", "roomKey": "room:linh.live", "durationSeconds": 7200, "peakViewerCount": 2000, "eventCount": 1000, "chatCount": 600, "giftCount": 80, "totalGiftDiamonds": 5000, "distinctGifterCount": 2 }, { "sessionId": "278f3a86-af07-5768-85d2-6dfff8efee7d", "sessionStartedAt": "2026-10-31T07:51:44.935Z", "creatorUniqueId": "linh.live", "roomKey": "room:linh.live", "durationSeconds": 7200, "peakViewerCount": 1000, "eventCount": 500, "chatCount": 300, "giftCount": 40, "totalGiftDiamonds": 2500, "distinctGifterCount": 2 } ], "nextCursor": null, "historyWindowDays": 365, "historyTruncated": false }, "provenance": { "observedAt": "2026-11-01T07:51:44.935Z", "freshness": "historical", "source": "platform_observed_live_stream", "sourceKind": "derived", "coverageStatus": "observed", "methodologyVersion": "live-history-v1", "window": null }}Errors
400Invalid parameter or body;codenames the problem.401Missing or unknown API key.402The workspace's credit wallet cannot cover the call;resetAtsays when the credits reset.403The key lacks the scope, or the plan does not include the feature.429Request rate exceeded; honourRetry-After.
Get a creator's LIVE video source
/v1/live/creators/{uid}/playbackThe signed, expiring video URL of the creator's current LIVE room. Your player loads it directly from TikTok's CDN (source: tiktok-cdn); RoomScope never proxies the video. hlsUrl is preferred; flvUrl is the source of FLV-only rooms (play it with an MSE engine such as mpegts.js); at least one is set on status: live, and expiresAt is when that URL stops working. renditions is often empty. avatarUrl, followerCount and region are null when unknown. Other answers: status: offline (not live), status: no_playback (live, but TikTok exposes no playable source), 202 status: resolving (poll the same URL after Retry-After), 503 collection_saturated or live_playback_upstream_unavailable (retry), and 503 live_playback_not_configured while the feature is off on this deployment (do not retry). Needs the live:stream scope, not live:read.
Path parameters
| Name | Type | Description |
|---|---|---|
uidRequired | string | Creator handle (linh.live); a leading @ is ignored. |
Request
curl "https://api.toktokdata.live/v1/live/creators/linh.live/playback" \ -H "Authorization: Bearer $ROOMSCOPE_API_KEY"Response
{ "status": "live", "roomId": "7665709659185105682", "title": "Friday night karaoke", "nickname": "Linh", "hlsUrl": "https://pull-hls-l1-sg01.tiktokcdn.com/stage/stream-7665709727191485202_hd/index.m3u8?expire=1786024940&sign=ea92cabbf90993d50a0e3d50ee9ed526", "flvUrl": "https://pull-flv-l1-sg01.tiktokcdn.com/stage/stream-7665709727191485202_hd.flv?expire=1786024940&sign=ea92cabbf90993d50a0e3d50ee9ed526", "expiresAt": "2026-08-06T14:02:20.000Z", "startedAt": "2026-07-23T09:46:40.000Z", "renditions": [], "avatarUrl": "https://p16-sign-sg.tiktokcdn.com/avatar.jpeg", "verified": true, "followerCount": 894314, "region": "VN", "source": "tiktok-cdn", "cached": false}Errors
401Missing or unknown API key.402The workspace's credit wallet cannot cover the call;resetAtsays when the credits reset.403The key lacks the scope, or the plan does not include the feature.429Request rate exceeded; honourRetry-After.503Temporarily unavailable; retry afterRetry-Afterwhenretryableis true.
Queue a live-status refresh
/v1/live/creators/{uid}/refreshAsks the workers to check now whether the creator is live. Billed at the refresh rate.
Path parameters
| Name | Type | Description |
|---|---|---|
uidRequired | string | Creator handle without @ (linh.live) or numeric TikTok user id. |
Request
curl -X POST "https://api.toktokdata.live/v1/live/creators/linh.live/refresh" \ -H "Authorization: Bearer $ROOMSCOPE_API_KEY"Response
{ "queued": true, "jobId": "1761994604935-0"}Errors
400Invalid parameter or body;codenames the problem.401Missing or unknown API key.402The workspace's credit wallet cannot cover the call;resetAtsays when the credits reset.403The key lacks the scope, or the plan does not include the feature.429Request rate exceeded; honourRetry-After.
List recorded LIVE sessions
/v1/live/sessionsSessions RoomScope recorded for the workspace's creators, newest first. A session still running has endedAt: null.
Query parameters
| Name | Type | Description |
|---|---|---|
creatorUniqueIdOptional | string | Only this creator's sessions (handle without @). |
cursorOptional | string | Opaque cursor from nextCursor of the previous page. |
limitOptional | integer | Sessions per page. Range 1–100. Default: 50 |
Request
curl "https://api.toktokdata.live/v1/live/sessions" \ -H "Authorization: Bearer $ROOMSCOPE_API_KEY"Response
{ "data": { "items": [ { "id": "f18eaa3e-a762-543d-9ea5-178271dc43f9", "roomKey": "room:linh.live", "roomId": "7990000000000000001", "creatorUniqueId": "linh.live", "creatorAvatarUrl": null, "startedAt": "2026-11-01T07:51:44.935Z", "endedAt": "2026-11-01T09:51:44.935Z", "peakViewerCount": 2000, "eventCount": 1000, "chatCount": 600, "giftCount": 80, "totalGiftDiamonds": 5000, "durationSeconds": 7200 }, { "id": "278f3a86-af07-5768-85d2-6dfff8efee7d", "roomKey": "room:linh.live", "roomId": "7990000000000000001", "creatorUniqueId": "linh.live", "creatorAvatarUrl": null, "startedAt": "2026-10-31T07:51:44.935Z", "endedAt": "2026-10-31T09:51:44.935Z", "peakViewerCount": 1000, "eventCount": 500, "chatCount": 300, "giftCount": 40, "totalGiftDiamonds": 2500, "durationSeconds": 7200 } ], "nextCursor": null, "historyWindowDays": 365, "historyTruncated": false }, "provenance": { "observedAt": "2026-11-01T09:51:44.935Z", "freshness": "historical", "source": "platform_observed_live_stream", "sourceKind": "derived", "coverageStatus": "observed", "methodologyVersion": "live-history-v1", "window": null }}Errors
400Invalid parameter or body;codenames the problem.401Missing or unknown API key.402The workspace's credit wallet cannot cover the call;resetAtsays when the credits reset.403The key lacks the scope, or the plan does not include the feature.429Request rate exceeded; honourRetry-After.
Get a LIVE session
/v1/live/sessions/{session_id}One session with gift and gifter rollups.
Path parameters
| Name | Type | Description |
|---|---|---|
session_idRequired | string | Session id from the list. |
Request
curl "https://api.toktokdata.live/v1/live/sessions/f18eaa3e-a762-543d-9ea5-178271dc43f9" \ -H "Authorization: Bearer $ROOMSCOPE_API_KEY"Response
{ "data": { "id": "278f3a86-af07-5768-85d2-6dfff8efee7d", "roomKey": "room:linh.live", "roomId": "7990000000000000001", "creatorUniqueId": "linh.live", "creatorAvatarUrl": null, "startedAt": "2026-10-31T07:51:44.935Z", "endedAt": "2026-10-31T09:51:44.935Z", "peakViewerCount": 1000, "eventCount": 500, "chatCount": 300, "giftCount": 40, "totalGiftDiamonds": 2500, "durationSeconds": 7200, "giftRollups": [ { "giftId": "5269", "giftName": "TikTok", "giftType": 1, "giftCount": 10, "diamondTotal": 2470, "senderCount": 2 }, { "giftId": "5655", "giftName": "Rose", "giftType": 1, "giftCount": 30, "diamondTotal": 30, "senderCount": 2 } ], "gifterRollups": [ { "gifterUserId": "991000000000000001", "gifterUniqueId": "gifter.1", "gifterNickname": "Gifter 1", "giftCount": 20, "diamondTotal": 1500 }, { "gifterUserId": "991000000000000002", "gifterUniqueId": "gifter.2", "gifterNickname": "Gifter 2", "giftCount": 20, "diamondTotal": 1000 } ] }, "provenance": { "observedAt": "2026-10-31T09:51:44.935Z", "freshness": "stale", "source": "platform_observed_live_stream", "sourceKind": "derived", "coverageStatus": "stale", "methodologyVersion": "live-history-v1", "window": null }}Errors
400Invalid parameter or body;codenames the problem.401Missing or unknown API key.402The workspace's credit wallet cannot cover the call;resetAtsays when the credits reset.403The key lacks the scope, or the plan does not include the feature.429Request rate exceeded; honourRetry-After.