keywordstring
Input keyword, e.g., "Artificial Intelligence"
默认值:"人工智能"
https://api.sandbase.ai/v1/api/douyin/search/search-suggestGet Douyin search autocomplete suggestions for a keyword: the related queries users see while typing in the Douyin app.
[
{
"data": {
"cache_conf": {
"enable": false
},
"extra": {
"fatal_item_ids": [],
"logid": "20260820174729952B646281EB80F54B18",
"now": 1787219249000,
"search_request_id": ""
},
"log_pb": {
"impr_id": "20260820174729952B646281EB80F54B18"
},
"rid": "20260820174729952B646281EB80F54B18",
"status_code": 0,
"status_msg": "",
"sug_list": [
{
"content": "人工智能",
"extra_info": {
"poi_id": "",
"poi_location_recall_log_id": "20260820174729952B646281EB80F54B18",
"search_params": "{\"sug_poi_id\":\"\"}"
},
"pos": [
{
"begin": 0,
"end": 3
}
],
"sug_type": "",
"word_record": {
"group_id": "6527568579963917582",
"words_content": "人工智能",
"words_position": 0,
"words_source": "sug"
}
},
{
"content": "人工智能机器人",
"extra_info": {
"poi_id": "",
"poi_location_recall_log_id": "20260820174729952B646281EB80F54B18",
"search_params": "{\"sug_poi_id\":\"\"}"
},
"pos": [
{
"begin": 0,
"end": 3
}
],
"sug_type": "",
"word_record": {
"group_id": "6527568579980694798",
"words_content": "人工智能机器人",
"words_position": 1,
"words_source": "sug"
}
},
{
"content": "人工智能龙头股",
"extra_info": {
"poi_id": "",
"poi_location_recall_log_id": "20260820174729952B646281EB80F54B18",
"search_params": "{\"sug_poi_id\":\"\"}"
},
"pos": [
{
"begin": 0,
"end": 3
}
],
"sug_type": "",
"word_record": {
"group_id": "6527570833508930824",
"words_content": "人工智能龙头股",
"words_position": 2,
"words_source": "sug"
}
},
"… 2 more items in the full response"
],
"sug_virtual_list": null,
"time_cost": {
"server_engine_cost": "179",
"stream_inner": "189"
},
"words_lists": [],
"words_query_record": {
"info": "{}",
"query_id": "6527568579963917582",
"words_source": "sug"
}
}
}
]选择一个示例,将其输入和结果加载到 playground 中。
Returns the autocomplete suggestions Douyin shows while a user types a keyword in the search box. It needs one input, keyword, and returns a list of suggested queries in sug_list.
人工智能 for Douyin content planning.curl -X POST "https://api.sandbase.ai/v1/api/douyin/search/search-suggest" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "人工智能"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | No | Input keyword, e.g., "Artificial Intelligence" |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"cache_conf": {
"enable": false
},
"extra": {
"fatal_item_ids": [],
"logid": "20261103153220ABB7B6447CA5FAB75334",
"now": 1793691141000,
"search_request_id": ""
},
"log_pb": {
"impr_id": "20261103153220ABB7B6447CA5FAB75334"
},
"rid": "20261103153220ABB7B6447CA5FAB75334",
"status_code": 0,
"status_msg": "",
"sug_list": [
{
"content": "人工智能",
"extra_info": {
"poi_id": "",
"poi_location_recall_log_id": "20261103153220ABB7B6447CA5FAB75334",
"search_params": "{\"sug_poi_id\":\"\"}"
},
"pos": [
{
"begin": 0,
"end": 3
}
],
"sug_type": "",
"word_record": {
"group_id": "6527568579963917582",
"words_content": "人工智能",
"words_position": 0,
"words_source": "sug"
}
}
],
"sug_virtual_list": null,
"time_cost": {
"server_engine_cost": "108",
"stream_inner": "119"
},
"words_lists": [],
"words_query_record": {
"info": "{}",
"query_id": "6527568579963917582",
"words_source": "sug"
}
}
| Field | Meaning |
|---|---|
sug_list[].content | The suggested search phrase, as a user would see it in the Douyin search box. |
sug_list[].word_record.words_content | The suggestion text again, stored inside the word record for that suggestion. |
sug_list[].word_record.words_position | Zero-based position of the suggestion in the list. 0 is the first suggestion. |
sug_list[].word_record.group_id | ID string for the suggestion word. |
sug_list[].word_record.words_source | Where the word came from. The sample response shows sug for every item. |
sug_list[].pos[].begin / sug_list[].pos[].end | Start and end character positions inside content. In the sample they cover the typed keyword at the start of the phrase. |
words_query_record.query_id | ID of the query record for this request. In the sample it matches the first suggestion's group_id. |
status_code | Request status inside the response body. 0 appears in the sample response, with an empty status_msg. |
keyword. Use the text a person would type into the Douyin search box.content value to Douyin Video Search or Douyin General Search.sug_virtual_list is null and words_lists is empty in the sample response.$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
开始构建
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/douyin/search/search-suggest" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "人工智能"
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
keywordstringInput keyword, e.g., "Artificial Intelligence"
默认值:"人工智能"
这是该 API 保存的示例响应;查看时不会发起实时请求。
[
{
"data": {
"cache_conf": {
"enable": false
},
"extra": {
"fatal_item_ids": [],
"logid": "20260820174729952B646281EB80F54B18",
"now": 1787219249000,
"search_request_id": ""
},
"log_pb": {
"impr_id": "20260820174729952B646281EB80F54B18"
},
"rid": "20260820174729952B646281EB80F54B18",
"status_code": 0,
"status_msg": "",
"sug_list": [
{
"content": "人工智能",
"extra_info": {
"poi_id": "",
"poi_location_recall_log_id": "20260820174729952B646281EB80F54B18",
"search_params": "{\"sug_poi_id\":\"\"}"
},
"pos": [
{
"begin": 0,
"end": 3
}
],
"sug_type": "",
"word_record": {
"group_id": "6527568579963917582",
"words_content": "人工智能",
"words_position": 0,
"words_source": "sug"
}
},
{
"content": "人工智能机器人",
"extra_info": {
"poi_id": "",
"poi_location_recall_log_id": "20260820174729952B646281EB80F54B18",
"search_params": "{\"sug_poi_id\":\"\"}"
},
"pos": [
{
"begin": 0,
"end": 3
}
],
"sug_type": "",
"word_record": {
"group_id": "6527568579980694798",
"words_content": "人工智能机器人",
"words_position": 1,
"words_source": "sug"
}
},
{
"content": "人工智能龙头股",
"extra_info": {
"poi_id": "",
"poi_location_recall_log_id": "20260820174729952B646281EB80F54B18",
"search_params": "{\"sug_poi_id\":\"\"}"
},
"pos": [
{
"begin": 0,
"end": 3
}
],
"sug_type": "",
"word_record": {
"group_id": "6527570833508930824",
"words_content": "人工智能龙头股",
"words_position": 2,
"words_source": "sug"
}
},
"… 2 more items in the full response"
],
"sug_virtual_list": null,
"time_cost": {
"server_engine_cost": "179",
"stream_inner": "189"
},
"words_lists": [],
"words_query_record": {
"info": "{}",
"query_id": "6527568579963917582",
"words_source": "sug"
}
}
}
]探索更多
| API | 价格 | 响应 |
|---|---|---|
Douyin | $0.01 每次调用 | JSON |
Douyin | $0.01 每次调用 | JSON |
Douyin | $0.01 每次调用 | JSON |
Douyin | $0.01 每次调用 | JSON |
Douyin | $0.01 每次调用 | JSON |
Douyin | $0.01 每次调用 | JSON |
问题
向 https://api.sandbase.ai/v1/api/douyin/search/search-suggest 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
每次调用 $0.01,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。
无需参数。 可选:keyword (string)。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。Douyin Search Suggestions 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Douyin API 访问权限。