# 优酷 视频文稿 API (youku.transcript)

- Canonical page: [https://everyinfra.com/youku-api/transcript](https://everyinfra.com/youku-api/transcript?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "youku", "action": "transcript", "params": {...}}
- Price: $0.002778 per call ($2.78 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: async by default (202 + job_id, poll GET /api/v1/jobs/{job_id})

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | transcript 的真实公开视频 URL；转录是异步任务，需等待任务完成，不支持受会员权限限制的正片。video 可从 id_…html 链接提取标识，但公开必填 id 仍需提供。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| language | 内容语言代码（如 zh、en），由平台判定，可能不准。 |
| translated_text | 翻译文本。 |
| translated_language | 翻译目标语言。 |
| duration_seconds | 时长，单位秒。非视频/音频内容为 null。 |
| duration_sec | platform-native meaning |
| author_name | 作者昵称（显示名）。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_url | 作者在原平台的主页链接。 |
| thumbnail_url | 缩略图链接，分辨率低于 image_url。 |
| tags | 标签数组。无标签时为空数组，不是 null。 |
| 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": "transcript",
  "params": {
    "url": "https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html"
  }
}'
```

```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": "transcript",
        "params": {
            "url": "https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `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": "transcript",
  "results": {
    "title": "Minecraft我的世界：建造超大巨型航空飞机，菜鸟vs高手vs黑客",
    "text": "哈囉觀眾老爺們大家好我是小舊子Z 其實影片給大家帶來的是Minecraft我的世界那麼作為機長的菜鳥那麼 他現在要開始建造他屬於他自己的飛機那麼我們來看一下我們的餐鳥是否能造好一個完美的飛機 那麼彩鳥的飛機已經馬上完工了這個機翼並且發動機OK那麼 材料的飞机完成了也是非常大的一架飞机啊非常的棒那么到我们的高手了高手呢在远处的这个池汤里面呢游泳 上岸之后呢却看到了菜鸟的飞机然后呢自己又找了一片非常非常大的一个空地摇摄一遍变成机长那么机长 就一定要有自己的飛機那麼我們的高手呢開始建造自己屬於自己的一架巨型的飛機那咱們看到這裡之後呢我們的高手的飛機呢也快 建造…",
    "language": "Chinese",
    "duration_seconds": 542,
    "author_name": "•••",
    "author_id": "•••",
    "author_url": "https://www.youku.com/•••",
    "thumbnail_url": "https://m.ykimg.com/054101016001F5EA07937EACA8E0510A",
    "tags": [
      "高手",
      "飞机",
      "黑客"
    ],
    "platform": "youku",
    "duration_sec": 542
  },
  "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
