# Douyin Broadcast viewer ranking API (douyin.live_viewers)

- Canonical page: [https://everyinfra.com/en/douyin-api/live_viewers](https://everyinfra.com/en/douyin-api/live_viewers?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "douyin", "action": "live_viewers", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list
- 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=douyin&action=live_viewers

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| live_id | not declared | yes | not declared | The numeric ID of one broadcast, from the `live_id` of `live_room` or `user_live` rows. It changes each time the host goes live and is not the number in the live-room link. After the broadcast ends only a few viewers remain on the list. |
| limit | integer (1–) | no | not declared | The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | Position from 1: the trending rank on trending, the position on the Xingtu board on xingtu_creator_rankings, the position on the search board on billboard_search_hot, and the suggestion's place in Douyin's search box on search_suggest. |
| user_id | User's unique ID on the platform. |
| douyin_id | Douyin ID: the searchable ID the account holder chooses. |
| nickname | Display name of the account. |
| avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
| is_verified | Whether the platform verified the account. null means it cannot be determined. |
| url | Link to the record on the platform. |
| 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": "douyin",
  "action": "live_viewers",
  "params": {
    "live_id": "7710380709042457398"
  }
}'
```

```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": "douyin",
        "action": "live_viewers",
        "params": {
            "live_id": "7710380709042457398",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:29:45Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 106. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "douyin",
  "action": "live_viewers",
  "results": [
    {
      "rank": 1,
      "user_id": "•••",
      "douyin_id": "•••",
      "nickname": "五•••伟",
      "avatar_url": "https://p11.douyinpic.com/•••",
      "is_verified": false,
      "url": "https://www.douyin.com/•••",
      "platform": "douyin"
    },
    {
      "rank": 2,
      "user_id": "•••",
      "douyin_id": "•••",
      "nickname": "努•••",
      "avatar_url": "https://p11.douyinpic.com/•••",
      "is_verified": false,
      "url": "https://www.douyin.com/•••",
      "platform": "douyin"
    }
  ],
  "count": 106,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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