> ## Documentation Index
> Fetch the complete documentation index at: https://tiktools.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Room Info

> Get comprehensive information about a live stream room including the host's profile, stream title, viewer count, start time, and stream configuration.

## `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

| Parameter   | Type   | Required | Description     |
| ----------- | ------ | -------- | --------------- |
| `unique_id` | string | No       | TikTok username |
| `room_id`   | string | No       | Room ID         |

### Response

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

### Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  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`);
  ```

  ```python Python theme={null}
  import requests
  res = requests.post('https://api.tik.tools/webcast/room_info',
      params={'apiKey': 'YOUR_KEY'},
      json={'unique_id': 'username'})
  data = res.json()['data']
  print(f"{data['title']} - {data['user_count']} viewers")
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.tik.tools/webcast/room_info?apiKey=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"unique_id": "username"}'
  ```

  ```java Java theme={null}
  HttpClient client = HttpClient.newHttpClient();
  String json = "{\"unique_id\": \"username\"}";
  HttpRequest req = HttpRequest.newBuilder()
      .uri(URI.create("https://api.tik.tools/webcast/room_info?apiKey=YOUR_KEY"))
      .header("Content-Type", "application/json")
      .POST(HttpRequest.BodyPublishers.ofString(json))
      .build();
  HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString());
  System.out.println(res.body());
  ```

  ```go Go theme={null}
  payload := bytes.NewBufferString(`{"unique_id":"username"}`)
  resp, err := http.Post(
      "https://api.tik.tools/webcast/room_info?apiKey=YOUR_KEY",
      "application/json", payload)
  if err != nil { log.Fatal(err) }
  defer resp.Body.Close()
  body, _ := io.ReadAll(resp.Body)
  fmt.Println(string(body))
  ```

  ```csharp C# theme={null}
  using var client = new HttpClient();
  var json = new StringContent(
      @"{""unique_id"":""username""}",
      Encoding.UTF8, "application/json");
  var res = await client.PostAsync(
      "https://api.tik.tools/webcast/room_info?apiKey=YOUR_KEY", json);
  Console.WriteLine(await res.Content.ReadAsStringAsync());
  ```
</CodeGroup>
