keywordstring
The keyword to be suggested
ค่าเริ่มต้น: "人工智能"
https://api.sandbase.ai/v1/api/douyin/search/search-suggest-v2Fetch search keyword suggestions V2 on Douyin. Returns the platform data as structured JSON.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns search keyword suggestions from Douyin for a given keyword. It needs one input, keyword, and accepts an optional history_words list to influence the ranking.
人工智能.history_words changes the order of suggestions for the same keyword.curl -X POST "https://api.sandbase.ai/v1/api/douyin/search/search-suggest-v2" \
-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 |
|---|---|---|---|
history_words | string | No | Optional, the user's history search words (comma separated), affects the ranking of suggestions |
keyword | string | No | The keyword to be suggested |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"items": [
{
"content": "人工智能比赛",
"extra_info": {
"poi_id": "",
"poi_location_recall_log_id": "202611031532215E8A160EA19863E55352",
"search_params": "{\"sug_poi_id\":\"\"}"
},
"pos": [
{
"begin": 0,
"end": 3
}
],
"sug_type": "",
"word_record": {
"group_id": "6596440824983065859",
"words_content": "人工智能比赛",
"words_position": 0,
"words_source": "sug"
}
}
],
"raw_key": "sug_list",
"words": [
"人工智能比赛"
]
}
| Field | Meaning |
|---|---|
items[].content | The suggested search phrase as shown to the user. |
items[].pos[].begin / items[].pos[].end | Start and end character positions in content. In the sample they cover the part of the phrase that matches the input keyword. |
items[].word_record.words_content | The suggestion text inside the word record. It matches content in the sample. |
items[].word_record.words_position | Zero-based rank of the suggestion in the list. |
items[].word_record.words_source | Where the suggestion came from. The sample shows sug. |
items[].word_record.group_id | Numeric ID string for the suggestion word group. |
items[].sug_type | Type label of the suggestion. It is an empty string in the sample. |
items[].extra_info.search_params | JSON string with extra search parameters, such as sug_poi_id. The sample value has an empty POI ID. |
words | Plain list of the suggestion phrases, in the same order as items. |
words array is the quickest way to get just the phrases. Use items when you need rank, match positions or IDs.search_params is a JSON-encoded string, so parse it before reading its keys.$0.01 per successful call. Failed calls are not charged.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/douyin/search/search-suggest-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "人工智能"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
keywordstringThe keyword to be suggested
ค่าเริ่มต้น: "人工智能"
history_wordsstringOptional, the user's history search words (comma separated), affects the ranking of suggestions
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| 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 |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/douyin/search/search-suggest-v2 โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.01 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ไม่ต้องระบุพารามิเตอร์ ตัวเลือก: keyword (string) และ history_words (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Douyin Search keyword suggestions V2 ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Douyin API แยกต่างหาก