Social

Query Bilibili Live Room

0calls
4 credits / call

Want to know whether your favourite streamer is on air? Or integrate Bilibili live status into your app? This endpoint covers both cases.

GET
uapis.cn
/api/v1/social/bilibili/liveroom
Query parameters
2
mid
string

Streamer user ID (mid). Pass either mid or room_id.

room_id
string

Live-room ID, either the long form (real ID) or the short form (room number). Pass either mid or room_id.

Overview

This is a smart endpoint: you can look up by streamer mid (user ID) or by room_id (the live-room long or short ID). It returns the room's detailed information — including whether the streamer is live, the title, cover, popularity, category, and more.

Response fields

  • live_status: 0 = not live, 1 = live, 2 = looping pre-recorded content.

Query parameters

mid
stringoptional

Streamer user ID (mid). Pass either mid or room_id.

room_id
stringoptional

Live-room ID, either the long form (real ID) or the short form (room number). Pass either mid or room_id.

Response

200 / OK

Success. Returns the live-room details.

JSON
{
  // Streamer user ID (mid).
  "uid": 672328094,
  // Live-room real room number (long form).
  "room_id": 22637261,
  // Live-room short room number. `0` when not configured.
  "short_id": 22625027,
  // Streamer follower count.
  "attention": 1789089,
  // Current popularity value for the live room (matches the on-screen popularity value; not real-time viewer count).
  "online": 3662242,
  // Whether the live stream is blocked.
  "is_portrait": false,
  // Contribution-activity data (returned when `activity=true`).
  "live_status": 1,
  // Category ID.
  "area_id": 372,
  // Parent category name.
  "parent_area_name": "Virtual streamer",
  // Parent category ID.
  "parent_area_id": 9,
  // Subcategory name.
  "area_name": "Virtual idol",
  // Live-room background URL.
  "background": "http://i0.hdslb.com/bfs/live/room_bg/672328094.jpg",
  // Current live-room title.
  "title": "[Limited] Chatting — come hang out",
  // User-set live-stream cover URL.
  "user_cover": "http://i0.hdslb.com/bfs/live/user_cover/672328094.jpg",
  // Live-room announcement, supports line breaks.
  "description": "Sample announcement text",
  // Stream start time, formatted as `YYYY-MM-DD HH:mm:ss`. Empty string when not live.
  "live_time": "2023-10-27 20:00:00",
  // Keyframe image URL.
  "keyframe": "http://i0.hdslb.com/bfs/live-key-frame/keyframe.jpg",
  // Live-room tags, comma-separated.
  "tags": "VUP,Virtual idol,A-SOUL,嘉然",
  // Live-room keywords, typically used in chat interactions.
  "hot_words": [
    "嘉然"
  ],
  // Streamer-equipped badge information.
  "new_pendants": null
}