answer_idstringจำเป็น
Answer ID (the numeric id in the page URL .../answer/{answer_id})
https://api.sandbase.ai/v1/api/zhihu/web/answer-detailRetrieves detailed information for a specific Zhihu answer using its numeric ID, including answer text, timestamps, and share links.
[
{
"data": {
"allow_segment_interaction": 1,
"answer_type": "normal",
"author": {
"avatar_url": "https://picx.zhimg.com/v2-497a418999540453d381c2a22d40759c_l.jpg?source=2c26e567",
"avatar_url_template": "https://picx.zhimg.com/v2-497a418999540453d381c2a22d40759c.jpg?source=2c26e567",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": "我不癫 文集搜索:《白泽合集》 天瞳搜:《天瞳大全》"
},
"gender": 0,
"headline": "我不癫 文集搜索:《白泽合集》 天瞳搜:《天瞳大全》",
"id": "974e867264de46d0cab4c9420eb421fc",
"is_advertiser": false,
"is_org": false,
"is_privacy": false,
"name": "白泽丧葬用品店",
"type": "people",
"url": "https://www.zhihu.com/api/v4/people/974e867264de46d0cab4c9420eb421fc",
"url_token": "96-2-51-97",
"user_type": "people"
},
"biz_ext": {
"share_guide": {
"has_positive_bubble": false,
"has_time_bubble": false,
"hit_share_guide_cluster": false
}
},
"content": "<p data-pid=\"JjvPL_Bi\">我哥是万年老二,再一次输给傅寒澈,他说他得了绝症。</p><p data-pid=\"aQhuG9ar\">「妹!哥没多少日子了,哥这辈子就想赢傅寒澈一次,就一次!」</p><p data-pid=\"S3lcPfjP\">看着我哥省吃俭用刚给我买的限量款包包,我咽了咽口水。</p><p data-pid=\"sRocRAeq\">「哥,您说话!」</p><p data-pid=\"4kfMGUn5\">我哥用一种,我就知道没白疼你的眼神,激动的握住了我的手。</p><p data-pid=\"xoiisQ4Q\">「你去勾引他,让他沉迷情爱,无心学习,然后把他无情抛弃,让他痛不欲生。而我,自始至终都修无情道,立于不败之地!」</p><p data-pid=\"I7ymIz_R\">哎呀,好计谋!</p><p data-pid=\"K_GfRpLw\">当晚,我就加上了傅寒澈的微信。</p><p data-pid=\"F1CWqj6v\">「在吗?看看腹肌!」</p><p data-pid=\"IJIG4VCd\">1.</p><p data-pid=\"C7J8HoWg\">我哥再一次考试输给傅寒澈之后,病倒了。</p><p data-pid=\"Cftyhw1l\">他躺在客厅的沙发上,额头贴着降温贴,嘴里插着温度计,抓住我的手,气若游丝。</p><p data-pid=\"S…",
"content_need_truncated": false,
"created_time": 1782526567,
"excerpt": "我哥是万年老二,再一次输给傅寒澈,他说他得了绝症。 「妹!哥没多少日子了,哥这辈子就想赢傅寒澈一次,就一次!」 看着我哥省吃俭用刚给我买的限量款包包,我咽了咽口水。 「哥,您说话!」 我哥用一种,我就知道没白疼你的眼神,激动的握住了我的手。 「你去勾引他,让他沉迷情爱,无心学习,然后把他无情抛弃,让他痛不欲生。而我,自始至终都修无情道,立于不败之地!」 哎呀,好计谋! 当晚,我就加上了傅寒澈的微信。 「…",
"extras": "",
"force_login_when_click_read_more": false,
"id": "2054145988235880002",
"is_collapsed": false,
"is_copyable": false,
"is_jump_native": false,
"podcast_audio_enter": {
"action_url": "zhihu://podcast/audio_player/84497802108?contentId=2054145988235880002&contentType=answer&subType=&entrance=detail_page",
"sub_type": "",
"text": "2 人听过",
"text_color": "MapBrand",
"text_size": 13
},
"question": {
"created": 1733115307,
"id": "5721660615",
"question_type": "normal",
"relationship": {},
"title": "有没有一上来就很刺激的甜文!?",
"type": "question",
"updated_time": 1733115307,
"url": "https://www.zhihu.com/api/v4/questions/5721660615"
},
"relationship": {
"upvoted_followees": []
},
"share_text": "有没有一上来就很刺激的甜文!? - 回答作者: 白泽丧葬用品店 https://zhihu.com/question/5721660615/answer/2054145988235880002 (想看更多?下载 @知乎 App:http://weibo.com/p/100404711598 )",
"type": "answer",
"updated_time": 1782526567,
"url": "https://www.zhihu.com/api/v4/answers/2054145988235880002"
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
Returns the full record for one Zhihu answer: the HTML body, an excerpt, timestamps, the author, the parent question and a share text. It needs one input, the numeric answer_id from the answer page URL.
created_time and updated_time.question.id and question.title.share_text and url values.curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/answer-detail" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"answer_id": "2054145988235880002"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
answer_id | string | Yes | Answer ID (the numeric id in the page URL .../answer/{answer_id}) |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"allow_segment_interaction": 1,
"answer_type": "normal",
"author": {
"avatar_url": "https://picx.zhimg.com/v2-497a418999540453d381c2a22d40759c_l.jpg?source=2c26e567",
"avatar_url_template": "https://pic1.zhimg.com/v2-497a418999540453d381c2a22d40759c.jpg?source=2c26e567",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": "我不癫 文集搜索:《白泽合集》 天瞳搜:《天瞳大全》"
},
"gender": 0,
"headline": "我不癫 文集搜索:《白泽合集》 天瞳搜:《天瞳大全》",
"id": "974e867264de46d0cab4c9420eb421fc",
"is_advertiser": false,
"is_org": false,
"is_privacy": false,
"name": "白泽丧葬用品店",
"type": "people"
},
"biz_ext": {
"share_guide": {
"has_positive_bubble": false,
"has_time_bubble": false,
"hit_share_guide_cluster": false
}
},
"content": "<p data-pid=\"JjvPL_Bi\">我哥是万年老二,再一次输给傅寒澈,他说他得了绝症。</p><p data-pid=\"aQhuG9ar\">「妹!哥没…",
"content_need_truncated": false,
"created_time": 1782526567,
"excerpt": "我哥是万年老二,再一次输给傅寒澈,他说他得了绝症。 「妹!哥没多少日子了,哥这辈子就想赢傅寒澈一次,就一次!」 看着我哥省吃俭用刚给我买的限量款包包,我咽了咽口…",
"extras": "",
"force_login_when_click_read_more": false,
"id": "2054145988235880002",
"is_collapsed": false
}
| Field | Meaning |
|---|---|
content | Full answer body as HTML. Paragraphs are <p> tags with a data-pid attribute. |
excerpt | Plain-text preview of the start of the answer. |
created_time / updated_time | Unix timestamps for when the answer was created and last updated. The values look like seconds. |
id / type / answer_type | The answer ID, the object type (answer) and the answer kind (for example normal). |
author.name / author.headline | Display name and profile headline of the answer author. |
author.id / author.url_token | Identifiers for the author. Use them to look up the author's profile or other answers. |
question.id / question.title | ID and title of the question this answer belongs to. |
question.created / question.updated_time | Unix timestamps for the parent question's creation and last update. |
share_text | Ready-to-post text with the question title, author name and the public answer link. |
podcast_audio_enter.text | Short label for the audio version of the answer, such as the number of listeners. |
answer_id from the number after /answer/ in a Zhihu answer URL.url is an API address. The public page link is inside share_text, in the form zhihu.com/question/{question_id}/answer/{answer_id}.question.id to Zhihu Question Answers.$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/answer-detail" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"answer_id": "2054145988235880002"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
answer_idstringจำเป็นAnswer ID (the numeric id in the page URL .../answer/{answer_id})
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"allow_segment_interaction": 1,
"answer_type": "normal",
"author": {
"avatar_url": "https://picx.zhimg.com/v2-497a418999540453d381c2a22d40759c_l.jpg?source=2c26e567",
"avatar_url_template": "https://picx.zhimg.com/v2-497a418999540453d381c2a22d40759c.jpg?source=2c26e567",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": "我不癫 文集搜索:《白泽合集》 天瞳搜:《天瞳大全》"
},
"gender": 0,
"headline": "我不癫 文集搜索:《白泽合集》 天瞳搜:《天瞳大全》",
"id": "974e867264de46d0cab4c9420eb421fc",
"is_advertiser": false,
"is_org": false,
"is_privacy": false,
"name": "白泽丧葬用品店",
"type": "people",
"url": "https://www.zhihu.com/api/v4/people/974e867264de46d0cab4c9420eb421fc",
"url_token": "96-2-51-97",
"user_type": "people"
},
"biz_ext": {
"share_guide": {
"has_positive_bubble": false,
"has_time_bubble": false,
"hit_share_guide_cluster": false
}
},
"content": "<p data-pid=\"JjvPL_Bi\">我哥是万年老二,再一次输给傅寒澈,他说他得了绝症。</p><p data-pid=\"aQhuG9ar\">「妹!哥没多少日子了,哥这辈子就想赢傅寒澈一次,就一次!」</p><p data-pid=\"S3lcPfjP\">看着我哥省吃俭用刚给我买的限量款包包,我咽了咽口水。</p><p data-pid=\"sRocRAeq\">「哥,您说话!」</p><p data-pid=\"4kfMGUn5\">我哥用一种,我就知道没白疼你的眼神,激动的握住了我的手。</p><p data-pid=\"xoiisQ4Q\">「你去勾引他,让他沉迷情爱,无心学习,然后把他无情抛弃,让他痛不欲生。而我,自始至终都修无情道,立于不败之地!」</p><p data-pid=\"I7ymIz_R\">哎呀,好计谋!</p><p data-pid=\"K_GfRpLw\">当晚,我就加上了傅寒澈的微信。</p><p data-pid=\"F1CWqj6v\">「在吗?看看腹肌!」</p><p data-pid=\"IJIG4VCd\">1.</p><p data-pid=\"C7J8HoWg\">我哥再一次考试输给傅寒澈之后,病倒了。</p><p data-pid=\"Cftyhw1l\">他躺在客厅的沙发上,额头贴着降温贴,嘴里插着温度计,抓住我的手,气若游丝。</p><p data-pid=\"S…",
"content_need_truncated": false,
"created_time": 1782526567,
"excerpt": "我哥是万年老二,再一次输给傅寒澈,他说他得了绝症。 「妹!哥没多少日子了,哥这辈子就想赢傅寒澈一次,就一次!」 看着我哥省吃俭用刚给我买的限量款包包,我咽了咽口水。 「哥,您说话!」 我哥用一种,我就知道没白疼你的眼神,激动的握住了我的手。 「你去勾引他,让他沉迷情爱,无心学习,然后把他无情抛弃,让他痛不欲生。而我,自始至终都修无情道,立于不败之地!」 哎呀,好计谋! 当晚,我就加上了傅寒澈的微信。 「…",
"extras": "",
"force_login_when_click_read_more": false,
"id": "2054145988235880002",
"is_collapsed": false,
"is_copyable": false,
"is_jump_native": false,
"podcast_audio_enter": {
"action_url": "zhihu://podcast/audio_player/84497802108?contentId=2054145988235880002&contentType=answer&subType=&entrance=detail_page",
"sub_type": "",
"text": "2 人听过",
"text_color": "MapBrand",
"text_size": 13
},
"question": {
"created": 1733115307,
"id": "5721660615",
"question_type": "normal",
"relationship": {},
"title": "有没有一上来就很刺激的甜文!?",
"type": "question",
"updated_time": 1733115307,
"url": "https://www.zhihu.com/api/v4/questions/5721660615"
},
"relationship": {
"upvoted_followees": []
},
"share_text": "有没有一上来就很刺激的甜文!? - 回答作者: 白泽丧葬用品店 https://zhihu.com/question/5721660615/answer/2054145988235880002 (想看更多?下载 @知乎 App:http://weibo.com/p/100404711598 )",
"type": "answer",
"updated_time": 1782526567,
"url": "https://www.zhihu.com/api/v4/answers/2054145988235880002"
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Zhihu Answer DetailsAPI นี้ Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.005 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/zhihu/web/answer-detail โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง ทุกองค์กรจะได้รับคำขอฟรี 100 ครั้งต่อวัน UTC โดยใช้ร่วมกันใน SandBase APIs ที่เข้าเงื่อนไขรวมถึงรายการนี้ หลังจากนั้นแต่ละคำขอจะคิดค่าบริการตามราคานี้จากยอดคงเหลือ SandBase ของคุณ ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: answer_id (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Zhihu Answer Details ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Zhihu API แยกต่างหาก