Douyin Search Fetch Video Search V1
## Purpose Search Douyin video content by keyword, with sorting, publication-time and duration filters. Results can include video details, author information, playback and cover links, engagement statistics and suggested search terms. ## Inputs Provide a required `request_body` object. All fields inside it have defaults: - `keyword` (string): the query; defaults to `猫咪`. Set it to the topic you want to search. - `cursor` (integer): `0` for the first page; use the preceding response's cursor for later pages. - `search_id`, `backtrace` (strings): default to empty strings for the first request. For pagination, reuse the values supplied by the previous response when available. - `sort_type` (string): `"0"` comprehensive ordering (default), `"1"` most likes, `"2"` latest publication. - `publish_time` (string): `"0"` unrestricted (default), `"1"` last day, `"7"` last week, `"180"` last half year. - `filter_duration` (string): `"0"` unrestricted (default), `"0-1"` within one minute, `"1-5"` one to five minutes, `"5-10000"` over five minutes. - `content_type` (string): `"0"` all (default), `"1"` video, `"2"` picture, `"3"` article. This operation is documented as video search; the presence of picture and article filter options does not guarantee non-video results. Example first request: ```json {"request_body":{"keyword":"人工智能","cursor":0,"search_id":"","backtrace":"","sort_type":"0","publish_time":"0","filter_duration":"0","content_type":"1"}} ``` ## Returned information The tool returns a search response directly. The response envelope contains `code` (HTTP status, with `200` indicating success) and `data` (the search payload). Do not confuse this outer status with the payload's documented `status_code`, where `0` indicates search success. The search payload may include `cursor` for the next page, `has_more` (`1` = more pages, `0` = no more), a `data` result list and `guide_search_words` suggestions. Result items may contain `aweme_info` with video ID, description, publication timestamp, author, music, playback URLs, cover URLs, video duration in milliseconds, and counts such as likes, comments, shares and plays. Fields and availability depend on the actual response; the payload schema does not guarantee all documented fields. Playback links are returned as metadata, not downloaded video files. Continue paging only when more results are indicated and reuse returned pagination values.
Pricing
| Condition | Charge |
|---|---|
| Each call | 20.65 credits/call |
20.65 credits/call Charges are per query. A successful query is billed even if it returns no results.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 抖音关键词视频搜索的请求体对象,包含搜索关键词(keyword)、翻页游标(cursor)、分页标识(search_id、backtrace),以及排序(sort_type)、发布时间(publish_time)、视频时长(filter_duration)和内容类型(content_type)筛选条件。 / Request body object for Douyin keyword video search, containing the search keyword (keyword), pagination cursor (cursor), pagination identifiers (search_id, backtrace), and sorting (sort_type), publication time (publish_time), video duration (filter_duration) and content type (content_type) filters. | — |
request_body.cursor | integer | No | 偏移游标,用于翻页,从上一次请求返回的响应中获取 / Offset cursor for pagination, obtained from the last response | 0 |
request_body.keyword | string | No | 关键词 / Keyword | 猫咪 |
request_body.backtrace | string | No | 翻页回溯标识,用于翻页,从上一次请求返回的响应中获取 / Backtrace for pagination, obtained from the last response | "" |
request_body.search_id | string | No | 搜索ID,用于翻页,从上一次请求返回的响应中获取 / Search ID for pagination, obtained from the last response | "" |
request_body.sort_type | string | No | 排序方式:0=综合排序 1=最多点赞 2=最新发布 / Sort type: 0=Comprehensive, 1=Most Likes, 2=Latest | 0 |
request_body.content_type | string | No | 内容类型:0=不限 1=视频 2=图片 3=文章 / Content type: 0=All, 1=Video, 2=Picture, 3=Article | 0 |
request_body.publish_time | string | No | 发布时间筛选:0=不限 1=最近一天 7=最近一周 180=最近半年 / Publish time filter: 0=Unlimited, 1=Last day, 7=Last week, 180=Last half year | 0 |
request_body.filter_duration | string | No | 视频时长过滤:0=不限 0-1=一分钟以内 1-5=一到五分钟 5-10000=五分钟以上 / Video duration filter: 0=Unlimited, 0-1=Within 1 minute, 1-5=1 to 5 minutes, 5-10000=More than 5 minutes | 0 |
Invocation example
Copy the request and explore its response example.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_douyin_search_fetch_video_search_v1' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"backtrace": "J6aGE6HAjYfQrWVjdpCA4koXHeq2D+xd626XetlNTOcDaD1vfAp9QZlMsoEl42R1WqHHFYJwGEfrOQ51pQjUog==",
"content_type": "1",
"cursor": 8,
"filter_duration": "0",
"keyword": "冬泳怪鸽",
"publish_time": "0",
"search_id": "",
"sort_type": "1"
}
}
}'{
"detail": {
"code": 400,
"docs": "https://api.tikhub.io/#/Douyin-Search-API/fetch_video_search_v1_api_v1_douyin_search_fetch_video_search_v1_post",
"headers": {},
"message": "Request failed. Please retry. Check the docs below to verify your parameters, test with the default demo parameters, and send the response JSON to support. You won't be charged for this request.",
"message_zh": "请求失败,请重试。请查看下方文档核对参数,使用默认演示参数测试,并将响应 JSON 提交给支持团队。本次请求不会被扣费。",
"params": {
"backtrace": "J6aGE6HAjYfQrWVjdpCA4koXHeq2D+xd626XetlNTOcDaD1vfAp9QZlMsoEl42R1WqHHFYJwGEfrOQ51pQjUog==",
"content_type": "1",
"cursor": 8,
"filter_duration": "0",
"keyword": "冬泳怪鸽",
"publish_time": "0"
}
}
}This example shows part of the response. Copied content is valid JSON.
Guides using this tool
See how this tool fits into real workflows

