Tiktok Live Recorder avatar

Tiktok Live Recorder

Pricing

from $1.50 / 1,000 recording-seconds

Go to Apify Store
Tiktok Live Recorder

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

AbotAPI

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

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.mp4
TK_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

ParameterTypeRequiredDefaultDescription
usernameStringNo*TikTok username (without @)
roomIdStringNo*TikTok live room ID
liveUrlStringNo*Full TikTok live URL (e.g., https://www.tiktok.com/@user/live)
durationIntegerNoUnlimitedMaximum recording duration in seconds
segmentDurationNumberNo0 (single file)Segment length in minutes. Accepts decimals (e.g., 0.5 = 30 seconds)
cookiesObjectNoTikTok session cookies (sessionid, sessionid_ss)
proxyConfigurationObjectNoApify 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:

ModeFile naming
Single fileTK_{username}_{timestamp}.mp4
SegmentedTK_{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 segments field only appears when segmentDuration is set.

Output Field Reference

FieldTypeDescription
usernamestringTikTok username
roomIdstringLive room ID
startedAtstringISO 8601 recording start time (UTC)
endedAtstringISO 8601 recording end time (UTC)
durationSecondsnumberTotal recording duration
fileKeystringKey of MP4 file in Key-Value Store
fileSizeBytesintegerTotal file size in bytes
statusstringcompleted, not_live, or error
roomTitlestringStream title set by the creator
viewerCountintegerCurrent viewers at recording time
totalViewersintegerCumulative unique viewers
likeCountintegerTotal likes on the stream
hasCommercebooleanTikTok Shop enabled
isReplaybooleanReplay vs. live broadcast
authorobjectCreator profile (see below)
streamUrlsarrayAll quality stream URLs (see below)
segmentsarraySegment 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:

  1. Open tiktok.com in Chrome/Firefox and log in
  2. Press F12 to open Developer Tools
  3. Go to Application tab (Chrome) or Storage tab (Firefox)
  4. Click Cookies > https://www.tiktok.com
  5. Find and copy the values of:
    • sessionid
    • sessionid_ss
  6. Paste them into the actor's cookies input 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:

  1. Open the creator's live stream at https://www.tiktok.com/@username/live
  2. Press F12 > Network tab
  3. Filter for webcast.tiktok.com
  4. Look for any request containing room_id= in the URL parameters
  5. Copy that numeric value into the roomId input

Alternatively, the room ID is often visible in the page source. Search for "roomId" in the HTML.

Troubleshooting

ProblemSolution
status: "not_live"The user isn't streaming right now. Schedule the actor to run periodically and check.
Captcha required or country blockedProvide cookies from an authenticated browser session, or use proxyConfiguration with a residential proxy.
WAF blockedYour IP is flagged. Use roomId directly (bypasses username resolution) or add a proxy.
Account is privateThe creator requires followers. Provide cookies from a following account.
Recording is empty / 0 bytesThe stream may have ended between the alive check and recording start. Try again.
Large file / out of memoryUse 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.