questionIdstringจำเป็น
Question ID
https://api.sandbase.ai/v1/api/zhihu/answer-listGet answers for a Zhihu question with sorting and pagination controls. Use it to browse responses to a known question and continue through additional answer pages.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
This API returns a page of answers for a Zhihu question. It needs the questionId of the question. You can sort the answers with order and continue to the next page with cursor, offset and sessionId.
_updated.curl -X POST "https://api.sandbase.ai/v1/api/zhihu/answer-list" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"questionId": "19550225"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
questionId | string | Yes | Question ID |
cursor | string | No | Pagination cursor from previous result. |
offset | integer | No | Start offset, begins with 0. |
order | string | No | Sorting criteria for answers. |
sessionId | string | No | Session ID from previous result. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"ad_info": {
"ad": {
"ad_verb": "",
"brand": {
"id": 0,
"logo": "https://pic2.zhimg.com/v2-6fe322be1641f689e87bda83a4b359ee_xl.png?source=d6434ca…",
"name": "知乎 · 盐选会员"
},
"category": 1,
"click_tracks": [
"https://sugar.zhihu.com/plutus_adreaper?bn=0&ft=8&btm=1&pdi=1536546700469087&s=0…"
],
"close_track": "https://sugar.zhihu.com/plutus_adreaper?ed=CjEEfR4wM30qEmRRATYqBEYnWn8Bbm4iKxV_X…",
"close_tracks": [
"https://sugar.zhihu.com/plutus_adreaper?ed=CjEEfR4wM30qEmRRATYqBEYnWn8Bbm4iKxV_X…"
],
"conversion_tracks": [
"https://sugar.zhihu.com/plutus_adreaper?pf=4&atp=0&pty=1&anis=0&qmls=0&nt=0&pdi=…"
],
"creatives": [
{
"app_promotion_url": "",
"brand": {
"id": 0,
"logo": "https://pic2.zhimg.com/v2-6fe322be1641f689e87bda83a4b359ee_xl.png?source=d6434ca…",
"name": "知乎 · 盐选会员"
},
"cta": {
"value": "查看详情"
},
"description": "「厚地高天,堪叹古今情不尽;痴男怨女,可怜风月债难偿。」 本期长篇专题精选那些让人又爱又恨的极致拉扯。",
"footer": {
"value": ""
},
"image": "",
"landing_url": "https://www.zhihu.com/render/zda-page/changpian02zhihu?spu=biz%3D0%26ci%3D389804…",
"title": "盐选长篇专题:「恨海情天」必吃榜!"
}
],
"debug_tracks": [
"https://sugar.zhihu.com/plutus_adreaper?ar=3898041&pdi=1536546700469087&ri=de68f…"
],
"display_advertising_tag": true,
"download_silent": false,
"experiment_info": "{}"
},
"adjson": "{\"ads\":[{\"id\":3826269,\"ad_zone_id\":236,\"template\":\"web_word\",\"impression_tracks\"…",
"position": 3
},
"data": [
{
"cursor": "50858d0153c20155399960038c647bfd",
"is_jump_native": false,
"position": 0,
"skip_count": false,
"target": {
"admin_closed_comment": false,
"allow_segment_interaction": 1,
"annotation_action": null,
"answer_type": "normal",
"attached_info": "ogETCAQQAxiS69/Wor7jkh0gkaCpCZICLgoJODAzMzQyMDQ4EhMyMTAwMjQwODcyNDc4NjAyNjQyGAQi…",
"author": {
"avatar_url": "https://picx.zhimg.com/v2-16ca5aba7366c47a58b1f7fd910a83ba_l.jpg?source=1def8aca",
"avatar_url_template": "https://pic1.zhimg.com/v2-16ca5aba7366c47a58b1f7fd910a83ba.jpg?source=1def8aca",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": ""
},
"exposed_medal": {
"avatar_url": "",
"description": "",
"medal_id": "0",
"medal_name": ""
},
"follower_count": 5,
"gender": 0,
"headline": "人文历史建筑景点美食…"
},
"business_type": "normal",
"can_comment": {
"reason": "",
"status": true
}
},
"target_type": "answer",
"type": "question_feed_card"
}
],
"finished_reading_filtered_count": 0,
"paging": {
"is_end": false,
"need_force_login": false,
"next": "https://www.zhihu.com/api/v4/questions/19550225/feeds?cursor=50858d0153c2015508e…",
"page": 1
},
"session": {
"id": "1793692119110262585"
}
}
| Field | Meaning |
|---|---|
data[] | One answer card in the list. Each card holds the answer in target. |
data[].cursor | Cursor value for this card. It marks the position of the answer in the list. |
data[].target_type / data[].type | Kind of item. In this response target_type is answer and type is question_feed_card. |
data[].target.answer_type | Type of answer, for example normal. |
data[].target.author.headline | The author's profile headline. |
data[].target.author.follower_count | Number of followers the answer author has. |
data[].target.author.exposed_medal.medal_name | Name of the medal shown on the author's profile. It is empty when the author shows no medal. |
data[].target.can_comment.status | true when comments are allowed on the answer. |
paging.is_end | true when there are no more pages. |
paging.next | URL of the next page. It contains the cursor value for the next request. |
session.id | Session ID for this listing. Send it back as sessionId when you request the next page. |
ad_info.ad | An advertisement placed in the feed. It is not an answer. Skip it when you process answers. |
questionId from a Zhihu question URL. In https://www.zhihu.com/question/19550225 the ID is 19550225.cursor value from paging.next and the session.id value as sessionId. Stop when paging.is_end is true.order accepts _default or _updated. The default is _updated.$0.014286 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/answer-list" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"order": "_updated",
"offset": 0,
"questionId": "19550225"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
questionIdstringจำเป็นQuestion ID
cursorstringPagination cursor from previous result.
offsetintegerStart offset, begins with 0.
ค่าเริ่มต้น: 0
orderstringSorting criteria for answers.
ค่าเริ่มต้น: "_updated"
ค่าที่เป็นไปได้: _default, _updated
sessionIdstringSession ID from previous result.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Zhihu Answer ListAPI นี้ Zhihu | $0.014286 ต่อการเรียก | JSON |
Zhihu | $0.028571 ต่อการเรียก | JSON |
Zhihu | $0.014286 ต่อการเรียก | JSON |
Zhihu | $0.014286 ต่อการเรียก | JSON |
Zhihu | $0.014286 ต่อการเรียก | JSON |
Zhihu | $0.014286 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/zhihu/answer-list โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.014286 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: questionId (string). ตัวเลือก: cursor (string), offset (integer), order (หนึ่งใน _default, _updated) และ sessionId (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Zhihu Answer List ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Zhihu API แยกต่างหาก