Douyin-Search-API
获取搜索关键词推荐 V2/Fetch search keyword suggestions V2
Changed on[中文]
用途:
- 获取抖音搜索关键词的联想推荐结果(V2 版本)。
- 根据用户已输入的关键词前缀,返回相关搜索词建议,用于实现搜索框实时补全。
备注:
- 返回条数由抖音决定,不支持指定数量。
- history_words 为可选项,传入用户此前搜索过的词(英文逗号分隔)会影响联想词排序。
- 相比 V1,V2 直接给出纯词列表 words,无需再从原始结构中提取。
参数:
- keyword: 已输入的关键词,如 "人工智能"
- history_words: 可选,历史搜索词,如 "猫咪,美食"
请求体示例:
payload = {
"keyword": "人工智能",
"history_words": ""
}
返回(部分常用字段,实际返回字段更多,一切以实际响应为准):
- words[]: 联想词字符串列表(多数场景只需要这个)
- items[]: 联想词完整条目,需要高亮位置或来源信息时使用
- content: 联想词内容
- pos[]: 命中位置(begin 起始字符位置、end 结束字符位置)
- word_record: 词记录(group_id 词组ID、words_source 词来源等)
- extra_info: 附加信息
- virtual[]: 虚拟联想词列表(部分关键词才有)
- empty_reason: 没有联想词时给出的原因(仅在结果为空时返回)
[English]
Purpose:
- Fetch Douyin search keyword suggestions (V2).
- Returns suggested keywords for the entered prefix, for real-time search-box completion.
Notes:
- The number of suggestions is decided by Douyin and cannot be specified.
- history_words is optional; passing the user's previous search words (comma separated) affects the ranking of the suggestions.
- Compared with V1, V2 returns a plain words list directly, no extraction needed.
Parameters:
- keyword: The entered keyword, e.g., "Artificial Intelligence"
- history_words: Optional history search words, e.g., "cat,food"
Request Body Example:
payload = {
"keyword": "Artificial Intelligence",
"history_words": ""
}
Response (common fields, actual response may contain more fields):
- words[]: Plain list of suggested keywords (enough for most use cases)
- items[]: Full suggestion entries, use when highlight positions or sources are needed
- content: Suggested keyword
- pos[]: Matched position (begin / end character positions)
- word_record: Word record (group_id, words_source, etc.)
- extra_info: Extra information
- virtual[]: Virtual suggestion list (only for some keywords)
- empty_reason: Why the suggestion list is empty (only returned when there is no result)
post/api/v1/douyin/search/fetch_search_suggest_v2
Request
- Base URLhttps://api.tikhub.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Request body
Response
Successful Response
Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- info
endpoint added
- info