Skip to main content

POST /webcast/room_info

Get comprehensive information about a live stream room including the host’s profile, stream title, viewer count, start time, and stream configuration. Response data: Returns owner profile (nickname, uniqueId, profilePictureUrl, follower count), room metadata (title, user_count, like_count, create_time), stream URLs, cover images, and room status. Identification: Provide either unique_id (username) or room_id. Returns an error if the user is not currently live. Use cases: Pre-flight checks before WebSocket connection, building stream info cards/embeds, monitoring dashboards, or extracting the room ID for use with other endpoints like rankings or gift_info.

Parameters

ParameterTypeRequiredDescription
unique_idstringNoTikTok username
room_idstringNoRoom ID

Response

{ "status_code": 0, "data": { "room_id": "...", "alive": true, "title": "...", "user_count": 500, "owner": {...}, "like_count": 1234, "share_count": 56 } }

Examples

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