# 优酷 视频详情 API (youku.video)

- Canonical page: [https://everyinfra.com/youku-api/video](https://everyinfra.com/youku-api/video?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "youku", "action": "video", "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

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| id | not declared | yes | not declared | video 的节目 showId 或视频 vid，可从搜索结果的标识或观看页 id_…html 提取；UGC 编码 ID 与剧集哈希不同，优先使用 UGC 编码 ID。该字段不是作者 UID。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| show_id | 节目 ID。优酷把剧/综艺叫「节目(show)」。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| show_name | 节目名称。 |
| subtitle | 副标题。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| video_type | 视频类型。 |
| duration_seconds | 时长，单位秒。非视频/音频内容为 null。 |
| duration_sec | platform-native meaning |
| episode_total | 总集数。 |
| episode_last | 最新更新到第几集。 |
| is_completed | 是否完结。连载中 episode_last 会小于 episode_total。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| is_vip | 是否需要会员观看。 |
| allow_comment | 是否开放评论。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| show_release_time | 节目上线时间。 |
| thumbnail_url | 缩略图链接，分辨率低于 image_url。 |
| tags | 标签数组。无标签时为空数组，不是 null。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_name | 作者昵称（显示名）。 |
| author_avatar_url | 上传者头像（video）。 |
| author_follower_count | 作者粉丝数。null 表示不公开。 |
| author_url | 作者在原平台的主页链接。 |
| 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": "video",
  "params": {
    "id": "dedc76345e0843deb992"
  }
}'
```

```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": "video",
        "params": {
            "id": "dedc76345e0843deb992",
        },
    },
    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": "video",
  "results": {
    "id": "XNjU0MDQ4ODMzMg==",
    "show_id": "dedc76345e0843deb992",
    "url": "https://v.youku.com/v_show/id_XNjU0MDQ4ODMzMg==.html",
    "title": "寒战1994",
    "show_name": "寒战1994",
    "subtitle": "警界暗战四方势力博弈",
    "category": "电影",
    "video_type": "正片",
    "duration_seconds": 7037,
    "episode_total": 1,
    "episode_last": 1,
    "is_completed": true,
    "comment_count": 972,
    "like_count": 53,
    "is_vip": true,
    "allow_comment": true,
    "posted_at": "2026-07-24T09:41:29+00:00",
    "show_release_time": "2026-07-24T10:00:00+00:00",
    "thumbnail_url": "http://m.ykimg.com/053500006A601EF5140C6E0C371971C9",
    "author_id": "•••",
    "author_url": "https://m.youku.com/•••",
    "platform": "youku"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

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