Live
A live room, on air or not.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
url?stringThe room's link (https://live.douyin.com/80017709309).
id?stringThe number in its link, instead of url.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
One item, as every single-item endpoint answers: { "data": … }.
data*A live room.
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.douyin.live({ url: "https://live.douyin.com/80017709309" });Example Response
{ "data": { "live": false, "roomId": "7712820303966997282", "title": "美好生活,尽在东方甄选", "viewers": null, "startedAt": null, "coverUrl": null, "host": { "id": "2384194153219051", "username": "2384194153219051", "displayName": "东方甄选", "avatarUrl": "https://p11.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_ee06287c378b803c3ce54e33f5b9cfd2.jpeg?from=3067671334", "verified": false, "url": "https://www.douyin.com/user/MS4wLjABAAAAcud_llwUN1kpfpzeb3Xqbq8nsRwU7lxVzg3OSv31hNMPz95UspEw1L53dX-UDrE4" }, "ext": { "webRid": "80017709309", "likes": null, "totalViewers": null, "playbackUrl": null } }}