keywordstringจำเป็น
Keyword used to fetch WeChat search suggestions.
https://api.sandbase.ai/v1/api/wechat-mp/search-suggestionsGet WeChat search suggestions for a keyword, optionally scoped by a supported business type. Use it to expand or refine a query before a targeted WeChat search.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns a list of WeChat search suggestion words for a keyword. It needs a keyword and accepts an optional businessType to scope the suggestions to one WeChat search area, such as ARTICLE or MINI_PROGRAM.
人工智能 into longer related search phrases for content research.businessType values such as ARTICLE, ACCOUNT and MINI_PROGRAM to see how the same keyword is searched in each area.curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/search-suggestions" \
-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 | Yes | Keyword used to fetch WeChat search suggestions. |
businessType | string | No | WeChat search business type used to scope suggestion results. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"sug_words": [
"人工智能"
]
}
}
| Field | Meaning |
|---|---|
data | Object that wraps the suggestion result. |
data.sug_words | List of suggested search phrases for the keyword, in the order the API returns them. |
data.sug_words[] | One suggested phrase as a plain string. In the sample, the first item repeats the keyword and the next items are longer related phrases such as 人工智能训练师. |
businessType to one of ALL, ACCOUNT, ARTICLE, CHANNEL, MOMENTS, LIVE, EMOJI, AUDIO, BOOK, WECHAT_INDEX, NEWS, MINI_PROGRAM or ENCYCLOPEDIA. The default is ALL.$0.114286 per successful call. Failed calls are not charged.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/search-suggestions" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "人工智能",
"businessType": "ALL"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
keywordstringจำเป็นKeyword used to fetch WeChat search suggestions.
businessTypestringWeChat search business type used to scope suggestion results.
ค่าเริ่มต้น: "ALL"
ค่าที่เป็นไปได้: ALL, ACCOUNT, ARTICLE, CHANNEL, MOMENTS, LIVE, EMOJI, AUDIO, BOOK, WECHAT_INDEX, NEWS, MINI_PROGRAM, ENCYCLOPEDIA
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
WeChat MP Search SuggestionsAPI นี้ WeChat MP | $0.114286 ต่อการเรียก | JSON |
WeChat MP | $0.142857 ต่อการเรียก | JSON |
WeChat MP | $0.042857 ต่อการเรียก | JSON |
WeChat MP | $0.028571 ต่อการเรียก | JSON |
WeChat MP | $0.021429 ต่อการเรียก | JSON |
WeChat MP | $0.021429 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/wechat-mp/search-suggestions โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.114286 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: keyword (string). ตัวเลือก: businessType (หนึ่งใน ALL, ACCOUNT, ARTICLE, CHANNEL, MOMENTS, LIVE, EMOJI, AUDIO, BOOK, WECHAT_INDEX, NEWS, MINI_PROGRAM, ENCYCLOPEDIA). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น WeChat MP Search Suggestions ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง WeChat MP API แยกต่างหาก