# 抖音 按数字 UID 查主页 API (douyin.profile_by_id)

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| uid | not declared | yes | not declared | 抖音用户的数字 UID，纯数字，取自视频行、评论行的 author_uid，或 profile 返回的 uid。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| user_id | 用户在原平台的唯一 ID。 |
| douyin_id | 抖音号（用户自定义的可搜索 ID）。 |
| nickname | 昵称。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| url | 该记录在原平台上的可访问链接。 |
| follower_count | 粉丝数。null 表示不公开，不等于 0。 |
| following_count | 关注数。null 表示不公开，不等于 0。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| video_count | 视频数：profile、profiles_batch、user_overview、billboard_account_search 是账号的作品数，trending、billboard_rise_list、billboard_challenge_hot 是这个热点下的相关视频数。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| uid | 数字用户 ID（profile / creator_search）；user_id 是 secUid，两者是同一账号的两种 ID。 |

## 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": "profile_by_id",
  "params": {
    "uid": "1929015166249580"
  }
}'
```

```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": "profile_by_id",
        "params": {
            "uid": "1929015166249580",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

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

```text
{
  "id": "req_…",
  "platform": "douyin",
  "action": "profile_by_id",
  "results": {
    "user_id": "•••",
    "douyin_id": "63970939507",
    "nickname": "木•••语",
    "bio": "📚英语爱好者\n🧸努力学习英语中\n❤️好好吃饭💛好好睡觉💚好好生活\n🎇文本群里分享视频的文本，有需要的小伙伴可以进群",
    "url": "https://www.douyin.com/user/MS4wLjABAAAAk1tZ-L085zZf2yW_H5dnVFZWyk8Rt8v4RAvf9KhTyPoVdMDxTs7Q_rvgTJGWXezS",
    "follower_count": 48149,
    "following_count": 21,
    "like_count": 92404,
    "video_count": 212,
    "is_verified": false,
    "avatar_url": "https://p11.douyinpic.com/•••",
    "platform": "douyin",
    "uid": "•••"
  },
  "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
