Pirate Tok
GET/@{username}/live

Live Page HTML

Purpose

Fetch https://www.tiktok.com/@{username}/live as HTML and extract room id, owner id, liveness, and profile hints without relying on JSON APIs.

Endpoint

  • host: www.tiktok.com
  • method: GET
  • path pattern: /@{username}/live

Headers

  • User-Agent
  • Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
  • Accept-Language
  • Sec-Ch-Ua
  • Sec-Ch-Ua-Mobile: ?0
  • Sec-Ch-Ua-Platform
  • Sec-Fetch-Dest: document
  • Sec-Fetch-Mode: navigate
  • Sec-Fetch-Site: none
  • Sec-Fetch-User: ?1
  • Upgrade-Insecure-Requests: 1
  • Referer: https://www.tiktok.com/
  • optional Cookie when the route is configured to use auth

Extraction Rules

Room id extraction order:

  1. inline "room_id":"..."
  2. data-room-id="..."
  3. parsed JSON from:
  • window.__sigi_data__
  • __UNIVERSAL_DATA_FOR_REHYDRATION__
  • SIGI_STATE

Owner id extraction:

  • user.id
  • fallback user.idStr

Liveness rule:

  • liveStatus 2 or 4 => live
  • any other status => not live
  • missing status => no_sigi_status

Embedded liveRoomUserInfo Shape

The HTML can also contain an embedded liveRoom.liveRoomUserInfo object from page JSON. Observed field families:

  • liveRoom.liveRoomUserInfo.user.{avatarThumb,avatarMedium,avatarLarger,id,nickname,secUid,secret,uniqueId,verified,roomId,signature,status,followStatus}
  • liveRoom.liveRoomUserInfo.stats.{followingCount,followerCount}
  • liveRoom.liveRoomUserInfo.liveRoom.{coverUrl,squareCoverImg,title,startTime,status,paidEvent.event_id,paidEvent.paid_type,liveSubOnly,liveRoomMode,hashTagId,gameTagId,liveRoomStats.userCount,streamData.pull_data.options.default_quality,streamData.pull_data.options.qualities[],streamData.pull_data.stream_data,streamId,multiStreamScene,multiStreamSource,hevcStreamData.pull_data.stream_data}

This embedded page shape should not be conflated with API Live User Room. It is a separate HTML-rehydration contract.

WAF / Failure Semantics

  • a network failure does not establish whether the room is live
  • HTTP 403 or 429 is treated as blocked
  • configured body markers can also mark a page as WAF-blocked
  • small suspicious body plus WAF markers is treated as blocked