# TikTok 主页或对象详情 API (tiktok.profile)

- Canonical page: https://everyinfra.com/tiktok-api/profile
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "tiktok", "action": "profile", "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

TikTok 主页详情按 `username` 读一个公开账号的名片：显示名、简介、主页外链、头像、创建时间，是否认证、是否私密，以及粉丝、关注、点赞、视频和好友数。它回答「这个账号是谁、可不可信」，适合合作前背调、建立达人档案，或者给只有用户名的线索补全资料。

`user_id` 是账号在平台上的唯一 ID，`username` 是 @handle，`display_name` 可能和它不同，存档时用 `user_id` 做主键更稳。粉丝数、关注数、点赞数这里也有；`created_at` 给出账号创建时间，和 `video_count` 放在一起看，能粗略估出账号的发片节奏。只想读计数、还要精确度标记，用粉丝数量那一页，它的字段更少。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | 公开 TikTok 用户短名，可带 @，不要把抖音 secUid 或完整主页 URL 塞入此字段。followers 只取粉丝数量；shop_creator 查询指定市场的带货达人信息。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| user_id | 用户在原平台的唯一 ID。 |
| username | 用户名（@handle）。 |
| display_name | 显示名，可能与 username 不同。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| url | 该记录在原平台上的可访问链接。 |
| external_url | 主页外链。 |
| follower_count | 粉丝数。null 表示不公开，不等于 0。 |
| following_count | 关注数。null 表示不公开，不等于 0。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| video_count | 视频数。 |
| friend_count | 好友数。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| is_private | 是否私密账号。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| created_at | 创建时间，格式同 posted_at。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 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": "profile",
  "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": "profile",
        "params": {
            "username": "nasa",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `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": "tiktok",
  "action": "profile",
  "results": {
    "user_id": "•••",
    "username": "nasa",
    "display_name": "NASA",
    "bio": "Making the seemingly impossible, possible.✨",
    "url": "https://www.tiktok.com/@nasa",
    "follower_count": 1800000,
    "following_count": 23,
    "like_count": 9600000,
    "video_count": 48,
    "friend_count": 17,
    "is_verified": true,
    "is_private": false,
    "avatar_url": "https://p19-common-sign.tiktokcdn-us.com/•••",
    "created_at": "2026-07-20T15:55:49+00:00",
    "platform": "tiktok"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `is_verified` 是 null 代表什么？

null 表示无法判定，不能当成未认证。为真是平台认证账号，例如蓝 V；为假才是确认没认证，入库时 null 和假要分开记。账号是否私密由 `is_private` 单独给出，两个字段互不替代。

### `bio` 和 `external_url` 怎么用？

`bio` 是账号自己填写的简介，可能含换行和 emoji，导出成 CSV 或入库前要先处理。`external_url` 是主页外链，可以用来判断账号对外挂的是哪个站点。

### 头像链接和创建时间能长期用吗？

头像链接可能有时效，要长期使用请自己转存。`created_at` 的格式和视频发布时间一样，按 UTC 给出；平台只给非标准字符串时会原样透传，解析前先做容错。

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