---
document_id: agent.collection.task.douyin_search_videos_v1
schema_version: 2
parent_document_id: agent.querying
section: querying
---

<!-- Generated by scripts.build_agent_guide; do not edit. -->

# Search videos / 搜索视频

Search Douyin videos by keyword. For one video's full data use douyin_video_detail_v1; for its comments use douyin_video_comments_v1.

按关键词搜索抖音视频。要取某个视频的完整数据用 douyin_video_detail_v1,要取它的评论用 douyin_video_comments_v1。

Task / 任务: `douyin_search_videos_v1`
Platform / 平台: Douyin / 抖音
Billing / 计费: 12 Credits per successful task / 每个成功任务 12 Credits
Estimate / 估价: call `estimate_collection`; start directly when `approval_required=false`, otherwise obtain approval for `upper_bound_credits`.
估价：调用 `estimate_collection`；`approval_required=false` 时直接启动，否则请用户确认 `upper_bound_credits`。

## Limitations / 限制

- 游标翻页:首次不传 cursor,之后把返回的 next_cursor 原样传回。每页固定 10 条,最多可翻 20 页。
- cursor 是不透明串,不要自行构造或修改;上游要求四个值成套带回,缺一个就会被当成一次全新搜索并重复计费。
- 返回摘要字段,完整数据需要 douyin_video_detail_v1。
- 结果顺序由上游定义，不承诺按发布时间排序。
- 本任务成本高于其他抖音任务,计 12 Credits。

## Inputs / 输入

- `source` — Search source / 搜索来源; kind=text; required=True; default='douyin'; bounds=min_length=2, max_length=64
- `search_mode` — Search mode / 搜索模式; kind=select; required=True; default='text'; allowed=text
- `query` — Query / 搜索词; kind=text; required=False; default=None; bounds=min_length=1, max_length=100
- `filters` — Filters / 筛选条件; kind=object; required=False; default={}
- `page` — Page / 页码; kind=integer; required=False; default=1; bounds=min=1, max=50
- `page_size` — Page size / 每页条数; kind=integer; required=False; default=None; bounds=min=1, max=50
- `page_token` — Page token / 续页令牌; kind=cursor; required=False; default=''; bounds=max_length=8192

## Minimal call / 最小调用

`estimate_collection`

```json
{
  "task_query": "搜索抖音上关于防晒的视频",
  "task_code": "douyin_search_videos_v1",
  "input": {
    "source": "douyin",
    "search_mode": "text",
    "query": "防晒",
    "page": 1,
    "page_token": ""
  }
}
```


## Result and pagination / 结果与分页

- mode=cursor
- input: `page_token`; continuation: `data.has_more` → `data.next_cursor`

Only the fields listed below are part of the stable result contract. /
只有下方列出的字段属于稳定结果契约。

## Result fields / 结果字段

- `meta.request_id` — type=string; Asklear request identifier for tracing. / 用于追踪的 Asklear 请求 ID。
- `meta.api_name` — type=string; Executed collection operation name. / 实际执行的采集操作名称。
- `meta.latency_ms` — type=integer; Collection execution latency in milliseconds. / 采集执行耗时（毫秒）。
- `meta.credits_charged` — type=integer; Asklear user-side Credits settled for this task after completion. / 任务完成后 Asklear 用户侧实际结算的 Credits。
- `data.items` — type=array<object>; Douyin videos returned by this page. / 本页返回的抖音视频。
- `data.item_count` — type=integer; Number of videos in this response page. / 本页返回的视频数。
- `data.has_more` — type=boolean; Whether another page is available. / 是否还有下一页。
- `data.next_cursor` — type=string|null; Cursor for the next page when has_more is true. / has_more 为 true 时下一页使用的游标。
- `data.items[].video_id` — type=string|integer; Douyin video identifier. / 抖音视频 ID。
- `data.items[].title` — type=string|null; Video title or description. / 视频标题或描述。
- `data.items[].published_at` — type=integer|null; Publication time as Unix seconds. / 以 Unix 秒表示的发布时间。
- `data.items[].published_at_text` — type=string|null; Original publication-time text when supplied. / 上游提供的原始发布时间文本。
- `data.items[].share_url` — type=string|null; Public video share URL when supplied. / 如上游提供则返回视频公开分享链接。
- `data.items[].play_count` — type=integer|null; Play count. / 播放数。
- `data.items[].digg_count` — type=integer|null; Like count. / 点赞数。
- `data.items[].comment_count` — type=integer|null; Comment count. / 评论数。
- `data.items[].share_count` — type=integer|null; Share count. / 分享数。
- `data.items[].author_id` — type=string|null; Author identifier. / 作者 ID。
- `data.items[].author_sec_id` — type=string|null; Author sec_uid. / 作者 sec_uid。
- `data.items[].author_name` — type=string|null; Author display name. / 作者名称。

Use `list_collection_tasks` as the runtime authority, then `describe_collection_task` for one task's full input contract, examples and limits. Collection access is entitlement-gated. /
以 `list_collection_tasks` 返回为运行时准据，再用 `describe_collection_task` 取单个任务的完整入参契约、示例与限制；采集能力受 entitlement 控制。
