Unofficial TikTok Last Live API — Most Recent Broadcast
GET/api/v1/last_live
Get a user's most recent live room by username — live now OR already ended — with its stats, duration, and top_fans (top supporters by gift value).
| Parameter | Description | |
|---|---|---|
username | required | TikTok username, @handle, or profile URL. |
Returns
username, is_live_now (bool), room_status (2=live now, 4=ended), room_id, title, started_at/ended_at/duration_seconds, cover_url, share_url, stats (viewers_now, total_entered, replay_viewers, new_followers, shares), owner (identity + followers + bio), pk_battle (rival anchor id or null), and top_fans — an array of {spent, username, nickname, user_id, sec_uid, avatar}.
Example Request
https://dev.omar-thing.site/api/v1/last_live?username=tiktok&key=YOUR_API_KEY
Example Response
{
"data": {
"cover_url": "https://p16-sign.../cover.jpeg",
"duration_seconds": 1349,
"ended_at": 1782642596,
"is_live_now": false,
"owner": {
"avatar": "https://p16-sign.../avatar.jpeg",
"bio": "...",
"followers": 7760045,
"following": 1231,
"nickname": "Some User",
"sec_uid": "MS4wLjABAAAA...",
"user_id": "6923684579661169666",
"username": "someuser",
"verified": false
},
"pk_battle": null,
"room_id": "7656385784412457744",
"room_status": 4,
"share_url": "https://m.tiktok.com/share/live/7656385784412457744/",
"started_at": 1782641247,
"stats": {
"new_followers": 4752,
"replay_viewers": 98227,
"shares": 0,
"total_entered": 131152,
"viewers_now": 7
},
"title": "",
"top_fans": [
{
"avatar": "https://p16-sign.../avatar.jpeg",
"nickname": "Top Fan",
"sec_uid": "MS4wLjABAAAA...",
"spent": 7004,
"user_id": "6...",
"username": "topfan"
}
],
"username": "someuser"
},
"status": "success"
}Sends a live request using your API key above.
More Live endpoints
- Unofficial TikTok Room ID API — Get a user's live room_id by username (null if they're not live right now).
- Unofficial TikTok Live API — Check if a user is live and get the stream URLs (HLS + FLV) per quality.
- Unofficial TikTok Live Audience API — Top viewers currently in a live stream (the online-audience ranking, by contribution). Pass a room_id from /top_live or /live_room.
- Unofficial TikTok Live Chat API — Live chat & events of a LIVE room (comments, gifts, joins, likes). Pass a room_id (get one from /room_id by username). Poll with next_cursor to follow along.
- Unofficial TikTok Live Chat Streaming API (SSE) — LIVE chat pushed to you over one open SSE connection instead of polling. Same events as /live_chat (comments, joins, likes, gifts). Optional alternative — /live_chat polling still works. Duplicate events are removed automatically. Auto-closes after 10 min (or 15000 events), then asks you to reconnect. Each API key may hold up to 3 live streams at once (chat+gifts).
- Unofficial TikTok Live Gifts API — Gifts being sent in a LIVE room right now (sender, gift name, coins, combo). Pass a room_id (get one from /room_id by username). Poll with next_cursor.
- Unofficial TikTok Live Gifts Streaming API (SSE) — LIVE gifts pushed to you over one open SSE connection instead of polling. Same gifts as /live_gifts (sender, gift, coins, combo). Optional alternative — /live_gifts polling still works. Duplicate gifts are removed automatically. Auto-closes after 10 min (or 15000 events), then asks you to reconnect. Each API key may hold up to 3 live streams at once (chat+gifts).