# TikTok Live room API (tiktok.live_room)

- Canonical page: https://everyinfra.com/en/tiktok-api/live_room
- Endpoint: POST /api/v1/social with {"platform": "tiktok", "action": "live_room", "params": {...}}
- Price: $0.000806 per call ($0.81 per 1,000 requests); failed and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=tiktok&action=live_room

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | The TikTok handle to check, such as tiktoklive_latam; a leading @ is removed and a profile link works too. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| username | Username (@handle). |
| display_name | Display name; can differ from username. |
| user_id | User's unique ID on the platform. |
| is_live | platform-native meaning |
| room_id | platform-native meaning |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| viewer_count | platform-native meaning |
| peak_viewer_count | platform-native meaning |
| total_viewer_count | platform-native meaning |
| like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| share_count | Shares. null means not disclosed, not 0. |
| product_count | platform-native meaning |
| started_at | platform-native meaning |
| cover_image_url | platform-native meaning |
| stream_url | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "tiktok",
  "action": "live_room",
  "params": {
    "username": "nasa"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "tiktok",
        "action": "live_room",
        "params": {
            "username": "nasa",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "tiktok",
  "action": "live_room",
  "results": {
    "username": …,
    "display_name": …,
    "user_id": …,
    "is_live": …,
    "room_id": …,
    "url": …,
    "title": …,
    "viewer_count": …,
    "peak_viewer_count": …,
    "total_viewer_count": …,
    "like_count": …,
    "share_count": …,
    "product_count": …,
    "started_at": …,
    "cover_image_url": …,
    "stream_url": …,
    "platform": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=tiktok
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
