Zhihu Preset Search
https://api.sandbase.ai/v1/api/zhihu/web/preset-searchRetrieves preset search recommendations and default placeholder queries from Zhihu Web. Returns trending search terms without requiring input parameters.
- ราคา
- $0.001USD / คำขอ
- Method
- POST
- การตอบกลับ
- JSON
- พารามิเตอร์
- 0 จำเป็น · 0 ไม่บังคับ
Playground
[
{
"data": {
"attached_info": "OmsSIDY3YTAzM2I4OTAwZDFmNDJlNWEyZTYzMzUyZjYyNGVhggMgNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWHyAyA4ODc4OThmMDU3YjIzMWFmNmViYTBlNWQwNWViOGNlMvAEAQ==",
"preset_words": {
"NextRequestTs": 1786091540,
"words": [
{
"ad_commercial_json": "",
"attached_info": "OmsSIDY3YTAzM2I4OTAwZDFmNDJlNWEyZTYzMzUyZjYyNGVhggMgNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWHyAyA4ODc4OThmMDU3YjIzMWFmNmViYTBlNWQwNWViOGNlMvAEAfICbAogNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWEaADoq6Iez5bCK5a6d5Li65LuA5LmI56qB54S25LiN54ix55m95pm25pm25LqGQOjHicfli/Lb/QFIAFIIcTJxX2xlYWRdAAAAAA==",
"begin_ts": 1786090940,
"end_ts": 1786094540,
"id": "-164442553832021016",
"is_force": false,
"preset_word_ad_commercial_json": "",
"query": "至尊宝为什么突然不爱白晶晶了",
"real_query": "至尊宝为什么突然不爱白晶晶了",
"recall_source": "q2q_lead",
"score": 0,
"source": "",
"type": "general",
"uuid": "45a5274b-d7de-425b-ae9d-d44cf1930d48",
"valid": 1,
"weight": 1
},
{
"ad_commercial_json": "",
"attached_info": "OmsSIDY3YTAzM2I4OTAwZDFmNDJlNWEyZTYzMzUyZjYyNGVhggMgNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWHyAyA4ODc4OThmMDU3YjIzMWFmNmViYTBlNWQwNWViOGNlMvAEAfICcAogNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWEaADoq572R5oGL5a+56LGh5piv6aG25aS05LiK5Y+45oiR6L+e5aSc6LeR6LevQIjg7Iu0mbT6UUgBUg1xMnFfa29jMnF1ZXJ5XQAAAAA=",
"begin_ts": 1786090940,
"end_ts": 1786094540,
"id": "5905574582785093640",
"is_force": false,
"preset_word_ad_commercial_json": "",
"query": "网恋对象是顶头上司我连夜跑路",
"real_query": "网恋对象是顶头上司我连夜跑路",
"recall_source": "q2q_koc2query",
"score": 0,
"source": "",
"type": "general",
"uuid": "10686e13-315e-4e52-96a2-f7a45e35bce0",
"valid": 1,
"weight": 1
},
{
"ad_commercial_json": "",
"attached_info": "OmsSIDY3YTAzM2I4OTAwZDFmNDJlNWEyZTYzMzUyZjYyNGVhggMgNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWHyAyA4ODc4OThmMDU3YjIzMWFmNmViYTBlNWQwNWViOGNlMvAEAfICaAogNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWEaADon5aSn6K+d6KW/5ri45Li65L2V5LuO54OC54mH5oiQ5Li656We5L2cQPKD88qvvPGha0gCUghxMnFfbGVhZF0AAAAA",
"begin_ts": 1786090940,
"end_ts": 1786094540,
"id": "7729238964134789618",
"is_force": false,
"preset_word_ad_commercial_json": "",
"query": "大话西游为何从烂片成为神作",
"real_query": "大话西游为何从烂片成为神作",
"recall_source": "q2q_lead",
"score": 0,
"source": "",
"type": "general",
"uuid": "327ac762-d18d-44a9-864e-0e77469aa349",
"valid": 1,
"weight": 1
},
"… 27 more items in the full response"
]
},
"request_hash_id": "67a033b8900d1f42e5a2e63352f624ea"
}
}
]ตัวอย่าง
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
API README
Zhihu Preset Search API
Returns the preset search words Zhihu Web shows in its search box, with the query text, a display window, and tracking IDs for each word. It takes no input, so you send an empty JSON object.
Use cases
- Read the current placeholder queries shown in the Zhihu search box.
- Log the
preset_words.words[].queryvalues on a schedule to see which suggested searches Zhihu rotates in and out. - Feed the returned queries into a keyword search to see what content they lead to.
- Use
begin_tsandend_tsto see how long each preset word stays active.
Request
curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/preset-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
The result is returned in outputs[0].data.
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"attached_info": "OmsSIDQ3Zjc5OTUxMWU1OGY5YzZlNzZhMGRiODM0OTQ0YmZjggMgNDdmNzk5NTExZTU4ZjljNmU3NmEw…",
"preset_words": {
"NextRequestTs": 1793692733,
"words": [
{
"ad_commercial_json": "",
"attached_info": "OmsSIDQ3Zjc5OTUxMWU1OGY5YzZlNzZhMGRiODM0OTQ0YmZjggMgNDdmNzk5NTExZTU4ZjljNmU3NmEw…",
"begin_ts": 1793692133,
"end_ts": 1793695733,
"id": "5759959305996362580",
"is_force": false,
"preset_word_ad_commercial_json": "",
"query": "大学英语六级历年真题含答案",
"real_query": "大学英语六级历年真题含答案",
"recall_source": "q2q_co_click",
"request_click_id": "e28295c4-4e69-486f-9164-08294ded32d2",
"score": 0
}
]
},
"request_hash_id": "47f799511e58f9c6e76a0db834944bfc"
}
Response fields
| Field | Meaning |
|---|---|
preset_words.words[].query | The preset search text shown to the user. It matches real_query in the sample response. |
preset_words.words[].real_query | The query text used when the word is searched. |
preset_words.words[].begin_ts / preset_words.words[].end_ts | Start and end of the window in which the word is active. Both are Unix timestamps in seconds, and the sample window is 3600 seconds long. |
preset_words.NextRequestTs | A Unix timestamp in seconds. It appears to mark when to request the preset words again. |
preset_words.words[].id | Numeric ID of the preset word, returned as a string. It can be negative. |
preset_words.words[].recall_source | Label for the method that picked the word, such as q2q_co_click or preset_recall_dssm. |
preset_words.words[].type | Type of the preset word. The sample shows general. |
preset_words.words[].uuid / preset_words.words[].request_click_id | Unique IDs for the word and the request click. Use them to tell entries apart. |
preset_words.words[].weight / preset_words.words[].score | Numeric ranking values for the word. The sample shows weight as 1 and score as 0. |
request_hash_id | Hash ID for this request. |
Notes
- Send
{}as the body. The API has no request parameters. - Each word has its own
attached_infostring, and there is also one at the top level. Treat these as opaque tracking values. - To search a returned word, pass its
queryto Zhihu Article Search. - For more query ideas, see Zhihu Search Suggestions or Zhihu Hot List.
Pricing
$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
ส่งคำขอแรกของคุณ
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/preset-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'2. การยืนยันตัวตน
ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
3. พารามิเตอร์
ยังไม่มีการเผยแพร่ schema ของพารามิเตอร์สำหรับ API นี้
4. การตอบกลับ
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"attached_info": "OmsSIDY3YTAzM2I4OTAwZDFmNDJlNWEyZTYzMzUyZjYyNGVhggMgNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWHyAyA4ODc4OThmMDU3YjIzMWFmNmViYTBlNWQwNWViOGNlMvAEAQ==",
"preset_words": {
"NextRequestTs": 1786091540,
"words": [
{
"ad_commercial_json": "",
"attached_info": "OmsSIDY3YTAzM2I4OTAwZDFmNDJlNWEyZTYzMzUyZjYyNGVhggMgNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWHyAyA4ODc4OThmMDU3YjIzMWFmNmViYTBlNWQwNWViOGNlMvAEAfICbAogNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWEaADoq6Iez5bCK5a6d5Li65LuA5LmI56qB54S25LiN54ix55m95pm25pm25LqGQOjHicfli/Lb/QFIAFIIcTJxX2xlYWRdAAAAAA==",
"begin_ts": 1786090940,
"end_ts": 1786094540,
"id": "-164442553832021016",
"is_force": false,
"preset_word_ad_commercial_json": "",
"query": "至尊宝为什么突然不爱白晶晶了",
"real_query": "至尊宝为什么突然不爱白晶晶了",
"recall_source": "q2q_lead",
"score": 0,
"source": "",
"type": "general",
"uuid": "45a5274b-d7de-425b-ae9d-d44cf1930d48",
"valid": 1,
"weight": 1
},
{
"ad_commercial_json": "",
"attached_info": "OmsSIDY3YTAzM2I4OTAwZDFmNDJlNWEyZTYzMzUyZjYyNGVhggMgNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWHyAyA4ODc4OThmMDU3YjIzMWFmNmViYTBlNWQwNWViOGNlMvAEAfICcAogNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWEaADoq572R5oGL5a+56LGh5piv6aG25aS05LiK5Y+45oiR6L+e5aSc6LeR6LevQIjg7Iu0mbT6UUgBUg1xMnFfa29jMnF1ZXJ5XQAAAAA=",
"begin_ts": 1786090940,
"end_ts": 1786094540,
"id": "5905574582785093640",
"is_force": false,
"preset_word_ad_commercial_json": "",
"query": "网恋对象是顶头上司我连夜跑路",
"real_query": "网恋对象是顶头上司我连夜跑路",
"recall_source": "q2q_koc2query",
"score": 0,
"source": "",
"type": "general",
"uuid": "10686e13-315e-4e52-96a2-f7a45e35bce0",
"valid": 1,
"weight": 1
},
{
"ad_commercial_json": "",
"attached_info": "OmsSIDY3YTAzM2I4OTAwZDFmNDJlNWEyZTYzMzUyZjYyNGVhggMgNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWHyAyA4ODc4OThmMDU3YjIzMWFmNmViYTBlNWQwNWViOGNlMvAEAfICaAogNjdhMDMzYjg5MDBkMWY0MmU1YTJlNjMzNTJmNjI0ZWEaADon5aSn6K+d6KW/5ri45Li65L2V5LuO54OC54mH5oiQ5Li656We5L2cQPKD88qvvPGha0gCUghxMnFfbGVhZF0AAAAA",
"begin_ts": 1786090940,
"end_ts": 1786094540,
"id": "7729238964134789618",
"is_force": false,
"preset_word_ad_commercial_json": "",
"query": "大话西游为何从烂片成为神作",
"real_query": "大话西游为何从烂片成为神作",
"recall_source": "q2q_lead",
"score": 0,
"source": "",
"type": "general",
"uuid": "327ac762-d18d-44a9-864e-0e77469aa349",
"valid": 1,
"weight": 1
},
"… 27 more items in the full response"
]
},
"request_hash_id": "67a033b8900d1f42e5a2e63352f624ea"
}
}
]สำรวจเพิ่มเติม
APIs ที่เกี่ยวข้อง
| API | ราคา | การตอบกลับ |
|---|---|---|
Zhihu Preset SearchAPI นี้ Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.005 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
คำถาม
คำถามที่พบบ่อย
ฉันจะใช้ Zhihu Preset Search API ได้อย่างไร?
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/zhihu/web/preset-search โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
Zhihu Preset Search API ราคาเท่าไร?
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
Zhihu Preset Search API รับพารามิเตอร์อะไรบ้าง?
Zhihu Preset Search ไม่รับพารามิเตอร์อินพุต ส่ง JSON body ว่างเปล่า
Zhihu Preset Search API ส่งคืนอะไร?
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Zhihu ไหม?
ไม่จำเป็น Zhihu Preset Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Zhihu API แยกต่างหาก
