Tiktok Live Recorder
Pricing
from $1.50 / 1,000 recording-seconds
Tiktok Live Recorder
Record TikTok live streams to MP4 with full metadata, all stream quality URLs, and crash-resilient segmented recording, at a fraction of the cost.
Pricing
from $1.50 / 1,000 recording-seconds
Rating
0.0
(0)
Developer

AbotAPI
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
3 days ago
Last modified
Categories
Share
Record TikTok live streams to MP4 with full metadata, all stream quality URLs, and crash-resilient segmented recording, at a fraction of the cost.
Record any TikTok live stream by username, room ID, or live URL. The actor captures the FLV stream at the highest available quality, converts it to MP4, and uploads it to Apify's Key-Value Store. Every run also outputs rich metadata: viewer counts, likes, creator profile, commerce flags, and direct stream URLs at every quality level.
Key Features
Recording
- No login or cookies required. Just provide a username and go
- Records actual MP4 video files, not just metadata
- Automatic FLV-to-MP4 conversion (stream copy, no quality loss)
- Segmented recording: split into time-based chunks, each uploaded immediately
- Duration limit or unlimited recording until the stream ends
- Spending limit support: recording stops automatically when your budget is reached
Stream Intelligence
- All stream quality URLs exposed (Origin, UHD, HD, SD) for use in VLC, ffplay, or custom pipelines
- Real-time viewer count, total viewers, and like count
- Creator profile: ID, handle, nickname, avatar, followers, verified status, region
- Commerce detection (TikTok Shop enabled)
- Replay vs. live broadcast detection
Reliability
- Three input methods: if username resolution fails, fall back to room ID
- Geo-restriction bypass via session cookies
- Apify proxy support for IP-based blocks
- 60-second alive checks with clean exit when stream ends
- Graceful error handling with structured error output
Quick Start
Record by Username
{"username": "sampleuser"}
Record by Room ID
Useful when username resolution is blocked by TikTok's WAF:
{"roomId": "7348921047128372224"}
Record by Live URL
{"liveUrl": "https://www.tiktok.com/@username/live"}
Record with Duration Limit
Stop after 5 minutes:
{"username": "sampleuser","duration": 300}
Segmented Recording
Record in 2-minute segments. Each segment is converted to MP4 and uploaded to the Key-Value Store immediately:
{"username": "sampleuser","duration": 1800,"segmentDuration": 2}
This produces files like:
TK_sampleuser_1709042400_seg001.mp4TK_sampleuser_1709042400_seg002.mp4...TK_sampleuser_1709042400_seg015.mp4
Why use segmented recording?
- Crash resilience: already-uploaded segments survive actor crashes or timeouts
- Manageable file sizes: long streams don't produce multi-GB single files
- Progressive access: download finished segments while the stream is still being recorded
- Streaming workflows: process segments as they become available
Geo-Restricted Access
If TikTok is blocked in your region, provide session cookies:
{"username": "sampleuser","cookies": {"sessionid": "your_session_id","sessionid_ss": "your_session_id_ss"}}
With Apify Proxy
Route requests through residential proxies:
{"username": "sampleuser","proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"apifyProxyCountry": "US"}}
Full Configuration
All options combined:
{"username": "sampleuser","duration": 600,"segmentDuration": 1,"cookies": {"sessionid": "abc123"},"proxyConfiguration": {"useApifyProxy": true}}
Input Reference
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
username | String | No* | TikTok username (without @) | |
roomId | String | No* | TikTok live room ID | |
liveUrl | String | No* | Full TikTok live URL (e.g., https://www.tiktok.com/@user/live) | |
duration | Integer | No | Unlimited | Maximum recording duration in seconds |
segmentDuration | Number | No | 0 (single file) | Segment length in minutes. Accepts decimals (e.g., 0.5 = 30 seconds) |
cookies | Object | No | TikTok session cookies (sessionid, sessionid_ss) | |
proxyConfiguration | Object | No | Apify proxy configuration |
* At least one of username, roomId, or liveUrl is required.
Input priority: When multiple identifiers are provided, liveUrl is resolved first. If username and roomId are both provided, no resolution is needed (fastest startup).
Output
MP4 Recordings (Key-Value Store)
Recordings are stored in the default Key-Value Store as MP4 files:
| Mode | File naming |
|---|---|
| Single file | TK_{username}_{timestamp}.mp4 |
| Segmented | TK_{username}_{timestamp}_seg001.mp4, _seg002.mp4, ... |
Download via the Apify API:
https://api.apify.com/v2/key-value-stores/{STORE_ID}/records/{FILE_KEY}
Dataset Record
Every run pushes a metadata record to the default Dataset:
{"username": "sampleuser","roomId": "7348921047128372224","startedAt": "2026-02-27T12:00:00.000000+00:00","endedAt": "2026-02-27T12:05:30.000000+00:00","durationSeconds": 330.5,"fileKey": "TK_sampleuser_1709042400.mp4","fileSizeBytes": 52428800,"status": "completed","roomTitle": "live gaming session!","viewerCount": 1523,"totalViewers": 8420,"likeCount": 34500,"hasCommerce": false,"isReplay": false,"author": {"id": "6812345678","uniqueId": "sampleuser","nickname": "Sample User","avatarUrl": "https://p16-sign.tiktokcdn-us.com/...","followerCount": 155000000,"isVerified": true,"region": "US"},"streamUrls": [{ "quality": "Origin", "level": 4, "url": "https://pull-flv-f1-va01.tiktokcdn.com/..." },{ "quality": "UHD", "level": 3, "url": "https://pull-flv-f1-va01.tiktokcdn.com/..." },{ "quality": "HD", "level": 2, "url": "https://pull-flv-f1-va01.tiktokcdn.com/..." },{ "quality": "SD", "level": 1, "url": "https://pull-flv-f1-va01.tiktokcdn.com/..." }],"segments": [{ "fileKey": "TK_sampleuser_1709042400_seg001.mp4", "fileSizeBytes": 15000000, "segmentIndex": 1 },{ "fileKey": "TK_sampleuser_1709042400_seg002.mp4", "fileSizeBytes": 14800000, "segmentIndex": 2 }]}
The
segmentsfield only appears whensegmentDurationis set.
Output Field Reference
| Field | Type | Description |
|---|---|---|
username | string | TikTok username |
roomId | string | Live room ID |
startedAt | string | ISO 8601 recording start time (UTC) |
endedAt | string | ISO 8601 recording end time (UTC) |
durationSeconds | number | Total recording duration |
fileKey | string | Key of MP4 file in Key-Value Store |
fileSizeBytes | integer | Total file size in bytes |
status | string | completed, not_live, or error |
roomTitle | string | Stream title set by the creator |
viewerCount | integer | Current viewers at recording time |
totalViewers | integer | Cumulative unique viewers |
likeCount | integer | Total likes on the stream |
hasCommerce | boolean | TikTok Shop enabled |
isReplay | boolean | Replay vs. live broadcast |
author | object | Creator profile (see below) |
streamUrls | array | All quality stream URLs (see below) |
segments | array | Segment metadata (segmented mode only) |
Author object: id, uniqueId, nickname, avatarUrl, followerCount, isVerified, region
Stream URL object: quality (name), level (numeric, higher = better), url (direct FLV URL)
Segment object: fileKey, fileSizeBytes, segmentIndex
Using Stream URLs
The streamUrls array gives you direct access to the live FLV streams at every quality level. These URLs are valid for the duration of the live stream. Use cases:
Play in VLC:
$vlc "https://pull-flv-f1-va01.tiktokcdn.com/stage/stream-123.flv"
Record with ffmpeg:
$ffmpeg -i "https://pull-flv-f1-va01.tiktokcdn.com/stage/stream-123.flv" -c copy output.mp4
Monitor availability: Check if a stream is still live by requesting the URL. A 200 response means it's active.
How to Get Session Cookies
If TikTok blocks access from your IP or country:
- Open tiktok.com in Chrome/Firefox and log in
- Press F12 to open Developer Tools
- Go to Application tab (Chrome) or Storage tab (Firefox)
- Click Cookies >
https://www.tiktok.com - Find and copy the values of:
sessionidsessionid_ss
- Paste them into the actor's
cookiesinput as a JSON object
Cookies expire after some time. If recordings start failing, refresh your cookies.
How to Find a Room ID
If username resolution fails (TikTok WAF blocking), you can provide the room ID directly:
- Open the creator's live stream at
https://www.tiktok.com/@username/live - Press F12 > Network tab
- Filter for
webcast.tiktok.com - Look for any request containing
room_id=in the URL parameters - Copy that numeric value into the
roomIdinput
Alternatively, the room ID is often visible in the page source. Search for "roomId" in the HTML.
Troubleshooting
| Problem | Solution |
|---|---|
status: "not_live" | The user isn't streaming right now. Schedule the actor to run periodically and check. |
Captcha required or country blocked | Provide cookies from an authenticated browser session, or use proxyConfiguration with a residential proxy. |
WAF blocked | Your IP is flagged. Use roomId directly (bypasses username resolution) or add a proxy. |
Account is private | The creator requires followers. Provide cookies from a following account. |
| Recording is empty / 0 bytes | The stream may have ended between the alive check and recording start. Try again. |
| Large file / out of memory | Use segmentDuration to split into smaller chunks. The default 128 MB is enough for most recordings. Increase to 256-512 MB only for very long single-file recordings. |