Skip to main content

POST /webcast/room_id

Resolve a TikTok username to their current live room ID. The server resolves the unique_id to a room_id on your behalf — no client-side HTML scraping needed. How it works: The server checks its cache first (30-minute TTL). For Pro/Ultra/Admin tiers, resolution uses a residential proxy for reliable results. For other tiers, the server attempts direct resolution (may fail from datacenter IPs). Response data: Returns unique_id, room_id, alive (whether the user is currently live), and cached (whether the result came from server cache). Use the returned room_id with other endpoints like sign_websocket, rankings, gift_info, etc. Use cases: When you only have a username and need the room_id for other API calls. Many endpoints accept unique_id directly, but some (like sign_websocket) require the room ID. This endpoint eliminates the need for client-side TikTok page scraping.

Parameters

ParameterTypeRequiredDescription
unique_idstringYesTikTok username (without @)

Response

{ "status_code": 0, "data": { "unique_id": "username", "room_id": "7123456789", "alive": true, "cached": false } }

Examples

const res = await fetch('https://api.tik.tools/webcast/room_id?apiKey=YOUR_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ unique_id: 'username' })
});
const { data } = await res.json();
console.log(`Room ID: ${data.room_id}, Live: ${data.alive}`);