# 优酷 主页或对象详情 API (youku.profile)

- Canonical page: [https://everyinfra.com/youku-api/profile](https://everyinfra.com/youku-api/profile?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "youku", "action": "profile", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

优酷主页或对象详情按编码后的 `user_id` 读取一位优酷创作者的公开资料：昵称、简介、头像、性别、所在地、粉丝数与获赞数、是否认证和认证说明，以及数字 ID 和主页链接。它回答「这个创作者是谁、体量多大」，适合品牌、机构和媒体研究者在合作前评估优酷创作者、按受众规模比较账号，或者为关注的频道保留一份当前资料。

`user_id` 是形如 UMzkwNzY4NzQw 的编码 UID，不是用户名或节目 ID，也不要填完整主页链接。`location` 按优酷页面原样返回，格式并不统一；`follower_count` 或 `like_count` 是 null，说明优酷没有公开这个数，不能按 0 处理。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| user_id | not declared | yes | not declared | profile 的编码态创作者 UID，可取自视频作者信息，不是用户名或节目 ID；不要在此字段放完整主页 URL。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| user_id | 用户在原平台的唯一 ID。 |
| numeric_id | 数字 ID。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| url | 该记录在原平台上的可访问链接。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| gender | 性别。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| follower_count | 粉丝数。null 表示不公开，不等于 0。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| verified_desc | 认证说明。 |
| location | 地理位置描述，原文透传，格式随平台而异。 |
| 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": "youku",
  "action": "profile",
  "params": {
    "user_id": "UMzkwNzY4NzQw"
  }
}'
```

```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": "youku",
        "action": "profile",
        "params": {
            "user_id": "UMzkwNzY4NzQw",
        },
    },
    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": "youku",
  "action": "profile",
  "results": {
    "user_id": "•••",
    "numeric_id": "•••",
    "name": "YKYX0728249",
    "url": "https://m.youku.com/profile?uid=UMzkwNzY4NzQw",
    "avatar_url": "https://static.youku.com/•••",
    "gender": 0,
    "like_count": 0,
    "is_verified": false,
    "platform": "youku"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 这串编码 `user_id` 怎么拿到？

用优酷视频详情读取这位创作者的任意一条视频，返回的作者信息里就有编码 UID，形如 UMzkwNzY4NzQw。把这串字符单独传进来；整条主页链接放进这个字段读不到。

### `user_id` 和 `numeric_id` 有什么区别？

两者指向同一个账号。`user_id` 是这个能力要求传入的编码 UID，`numeric_id` 是对应的纯数字 ID。两个都存下来，以后无论在哪里遇到哪种写法，都能对上同一个账号。

### 怎么判断账号有没有认证？

`is_verified` 表示优酷是否认证了这个账号，为 null 时表示无法判断，不能当成未认证；`verified_desc` 是优酷展示的认证说明，可以用来区分机构官方号和个人创作者。

## Also

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