# 优酷 关键词搜索 API (youku.search)

- Canonical page: [https://everyinfra.com/youku-api/search](https://everyinfra.com/youku-api/search?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "youku", "action": "search", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 30, max 150 per call
- 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=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | search 的节目、剧集或视频检索词；不包含评论搜索。 |
| limit | integer (1–150) | no | 30 | 这次调用最多返回的条数，整数，1–150；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| subtitle | 副标题。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| source_name | 来源名称。 |
| release_date | 发布日期。 |
| is_completed | 是否完结。连载中 episode_last 会小于 episode_total。 |
| corner_tag | 角标文字（如「VIP」「独播」）。 |
| thumbnail_url | 缩略图链接，分辨率低于 image_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": "search",
  "params": {
    "keyword": "纪录片"
  }
}'
```

```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": "search",
        "params": {
            "keyword": "纪录片",
        },
    },
    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; the list keeps the first 2 of 25. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "youku",
  "action": "search",
  "results": [
    {
      "id": "fecffe95fda24518b7aa",
      "url": "https://v.youku.com/v_show/id_fecffe95fda24518b7aa.html",
      "title": "一路前行 第三季",
      "subtitle": "新老嘉宾助力环保",
      "category": "纪录片",
      "source_name": "优酷",
      "release_date": "2026",
      "is_completed": false,
      "corner_tag": "首播",
      "thumbnail_url": "https://m.ykimg.com/050C00006AD98F171FF128140C50D963",
      "platform": "youku"
    },
    {
      "id": "e5019e8e0b4e11e1a046",
      "url": "https://v.youku.com/v_show/id_e5019e8e0b4e11e1a046.html",
      "title": "地球脉动 第一季",
      "subtitle": "地球壮丽美景",
      "category": "纪录片",
      "source_name": "优酷",
      "release_date": "2006",
      "is_completed": true,
      "corner_tag": "VIP",
      "thumbnail_url": "https://m.ykimg.com/050C000062F9F6BC13F7FF0950BD2E69",
      "platform": "youku"
    }
  ],
  "count": 25,
  "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
