user_url_tokenstringจำเป็น
User ID
https://api.sandbase.ai/v1/api/zhihu/web/user-answersReturns answers posted by a specific Zhihu user based on their user token. Supports pagination and sorting results by creation date or upvote count.
[
{
"data": {
"data": [
{
"admin_closed_comment": false,
"annotation_action": [],
"answer_type": "normal",
"attachment": {
"attachment_id": "",
"type": "answer"
},
"author": {
"avatar_url": "https://pica.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980_l.jpg?source=c8b7c179",
"avatar_url_template": "https://picx.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980.jpg?source=c8b7c179",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": ""
},
"gender": -1,
"headline": "python 人工智能 深度学习 机器学习",
"id": "66ae4cef372d990cba4e8b9179233fc2",
"is_advertiser": false,
"is_org": false,
"kvip_info": {
"is_vip": false,
"target_url": "",
"vip_icon": {
"night_mode_url": "",
"url": ""
}
},
"name": "人工智能",
"type": "people",
"url": "http://www.zhihu.com/api/v4/people/66ae4cef372d990cba4e8b9179233fc2",
"url_token": "ren-gong-zhi-neng-90",
"user_type": "people",
"vip_info": {
"is_vip": false
}
},
"biz_ext": {
"creation_relationship": {}
},
"can_comment": {
"reason": "",
"status": true
},
"collapse_reason": "",
"collapsed_by": "nobody",
"comment_count": 0,
"comment_permission": "all",
"content": "<p data-pid=\"pmLFr5WS\">文本识别</p>",
"content_need_truncated": false,
"created_time": 1456553324,
"editable_content": "",
"excerpt": "文本识别",
"extras": "",
"force_login_when_click_read_more": false,
"id": "88321598",
"is_collapsed": false,
"is_copyable": true,
"is_labeled": false,
"is_navigator": false,
"is_normal": true,
"navigator_vote": false,
"question": {
"created": 1456282404,
"has_publishing_draft": false,
"id": "40699477",
"question_type": "normal",
"relationship": {},
"title": "Waston 是如何通过书写识别人的情绪的?",
"type": "question",
"updated_time": 1456282404,
"url": "http://www.zhihu.com/api/v4/questions/40699477"
},
"reaction": {
"relation": {
"faved": false,
"liked": false
},
"statistics": {
"favorites": 0,
"like_count": 1
}
},
"reaction_instruction": {},
"relationship": {
"is_author": false,
"is_authorized": false,
"is_nothelp": false,
"is_thanked": false,
"voting": 0
},
"reshipment_settings": "allowed",
"reward_info": {
"can_open_reward": false,
"is_rewardable": false,
"reward_member_count": 0,
"reward_total_money": 0,
"tagline": ""
},
"same_video_answers": [],
"suggest_edit": {
"reason": "",
"status": false,
"tip": "",
"title": "",
"unnormal_details": {},
"url": ""
},
"thumbnail": "",
"type": "answer",
"updated_time": 1456553324,
"url": "http://www.zhihu.com/api/v4/answers/88321598",
"vote_next_step": "vote",
"voteup_count": 2
},
{
"admin_closed_comment": false,
"annotation_action": [],
"answer_type": "normal",
"attachment": {
"attachment_id": "",
"type": "answer"
},
"author": {
"avatar_url": "https://pic1.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980_l.jpg?source=c8b7c179",
"avatar_url_template": "https://picx.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980.jpg?source=c8b7c179",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": ""
},
"gender": -1,
"headline": "python 人工智能 深度学习 机器学习",
"id": "66ae4cef372d990cba4e8b9179233fc2",
"is_advertiser": false,
"is_org": false,
"kvip_info": {
"is_vip": false,
"target_url": "",
"vip_icon": {
"night_mode_url": "",
"url": ""
}
},
"name": "人工智能",
"type": "people",
"url": "http://www.zhihu.com/api/v4/people/66ae4cef372d990cba4e8b9179233fc2",
"url_token": "ren-gong-zhi-neng-90",
"user_type": "people",
"vip_info": {
"is_vip": false
}
},
"biz_ext": {
"creation_relationship": {}
},
"can_comment": {
"reason": "",
"status": true
},
"collapse_reason": "",
"collapsed_by": "nobody",
"comment_count": 0,
"comment_permission": "all",
"content": "<p data-pid=\"A4JnV1Tr\">deep learning这是个方向</p>",
"content_need_truncated": false,
"created_time": 1456553279,
"editable_content": "",
"excerpt": "deep learning这是个方向",
"extras": "",
"force_login_when_click_read_more": false,
"id": "88321493",
"is_collapsed": false,
"is_copyable": true,
"is_labeled": false,
"is_navigator": false,
"is_normal": true,
"navigator_vote": false,
"question": {
"created": 1454912375,
"has_publishing_draft": false,
"id": "40214698",
"question_type": "normal",
"relationship": {},
"title": "为什么说机器智能才是现实之路,而真正意义上的人工智能很可能是水中花镜中月?",
"type": "question",
"updated_time": 1454912375,
"url": "http://www.zhihu.com/api/v4/questions/40214698"
},
"reaction": {
"relation": {
"faved": false,
"liked": false
},
"statistics": {
"favorites": 0,
"like_count": 1
}
},
"reaction_instruction": {},
"relationship": {
"is_author": false,
"is_authorized": false,
"is_nothelp": false,
"is_thanked": false,
"voting": 0
},
"reshipment_settings": "allowed",
"reward_info": {
"can_open_reward": false,
"is_rewardable": false,
"reward_member_count": 0,
"reward_total_money": 0,
"tagline": ""
},
"same_video_answers": [],
"suggest_edit": {
"reason": "",
"status": false,
"tip": "",
"title": "",
"unnormal_details": {},
"url": ""
},
"thumbnail": "",
"type": "answer",
"updated_time": 1456553279,
"url": "http://www.zhihu.com/api/v4/answers/88321493",
"vote_next_step": "vote",
"voteup_count": 0
},
{
"admin_closed_comment": false,
"annotation_action": [],
"answer_type": "normal",
"attachment": {
"attachment_id": "",
"type": "answer"
},
"author": {
"avatar_url": "https://picx.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980_l.jpg?source=c8b7c179",
"avatar_url_template": "https://picx.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980.jpg?source=c8b7c179",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": ""
},
"gender": -1,
"headline": "python 人工智能 深度学习 机器学习",
"id": "66ae4cef372d990cba4e8b9179233fc2",
"is_advertiser": false,
"is_org": false,
"kvip_info": {
"is_vip": false,
"target_url": "",
"vip_icon": {
"night_mode_url": "",
"url": ""
}
},
"name": "人工智能",
"type": "people",
"url": "http://www.zhihu.com/api/v4/people/66ae4cef372d990cba4e8b9179233fc2",
"url_token": "ren-gong-zhi-neng-90",
"user_type": "people",
"vip_info": {
"is_vip": false
}
},
"biz_ext": {
"creation_relationship": {}
},
"can_comment": {
"reason": "",
"status": true
},
"collapse_reason": "",
"collapsed_by": "nobody",
"comment_count": 1,
"comment_permission": "all",
"content": "<p data-pid=\"zpoeTnuS\">人与机器结合,促成自身的进步</p>",
"content_need_truncated": false,
"created_time": 1456553204,
"editable_content": "",
"excerpt": "人与机器结合,促成自身的进步",
"extras": "",เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
Returns the answers a Zhihu user has posted, looked up by the user's URL token. The response holds a list of answers plus paging details. You can sort by creation date or upvote count.
sort_type set to voteups.created.paging.totals before fetching them all.curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/user-answers" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_url_token": "excited-vczh"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
user_url_token | string | Yes | User ID |
limit | string | No | Number of answers per page |
offset | string | No | Offset |
sort_type | string | No | Sort Type |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": [],
"need_force_login": false,
"paging": {
"is_end": true,
"is_start": true,
"next": "http://www.zhihu.com/api/v4/members/excited-vczh/answers?user_url_token=excited-…",
"previous": "http://www.zhihu.com/api/v4/members/excited-vczh/answers?user_url_token=excited-…",
"totals": 7
}
}
| Field | Meaning |
|---|---|
data | List of answers for the requested page. It is an empty list in the sample response, even though paging.totals is 7. |
paging.totals | Total count of answers the API reports for this user. |
paging.is_end | true when the current page is the last page. |
paging.is_start | true when the current page is the first page. |
paging.next | URL for the next page. It carries the limit and offset values to use next. |
paging.previous | URL for the previous page, with its limit and offset values. |
need_force_login | Flag that shows whether the request needs a logged-in session. It is false in the sample. |
user_url_token from the Zhihu profile URL of the user, for example excited-vczh.limit and offset. The paging.next URL in the sample uses limit=20 and offset=20.paging.is_end is true.$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/user-answers" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_url_token": "ren-gong-zhi-neng-90"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
user_url_tokenstringจำเป็นUser ID
limitstringNumber of answers per page
offsetstringOffset
sort_typestringSort Type
ค่าที่เป็นไปได้: created, voteups
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"data": [
{
"admin_closed_comment": false,
"annotation_action": [],
"answer_type": "normal",
"attachment": {
"attachment_id": "",
"type": "answer"
},
"author": {
"avatar_url": "https://pica.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980_l.jpg?source=c8b7c179",
"avatar_url_template": "https://picx.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980.jpg?source=c8b7c179",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": ""
},
"gender": -1,
"headline": "python 人工智能 深度学习 机器学习",
"id": "66ae4cef372d990cba4e8b9179233fc2",
"is_advertiser": false,
"is_org": false,
"kvip_info": {
"is_vip": false,
"target_url": "",
"vip_icon": {
"night_mode_url": "",
"url": ""
}
},
"name": "人工智能",
"type": "people",
"url": "http://www.zhihu.com/api/v4/people/66ae4cef372d990cba4e8b9179233fc2",
"url_token": "ren-gong-zhi-neng-90",
"user_type": "people",
"vip_info": {
"is_vip": false
}
},
"biz_ext": {
"creation_relationship": {}
},
"can_comment": {
"reason": "",
"status": true
},
"collapse_reason": "",
"collapsed_by": "nobody",
"comment_count": 0,
"comment_permission": "all",
"content": "<p data-pid=\"pmLFr5WS\">文本识别</p>",
"content_need_truncated": false,
"created_time": 1456553324,
"editable_content": "",
"excerpt": "文本识别",
"extras": "",
"force_login_when_click_read_more": false,
"id": "88321598",
"is_collapsed": false,
"is_copyable": true,
"is_labeled": false,
"is_navigator": false,
"is_normal": true,
"navigator_vote": false,
"question": {
"created": 1456282404,
"has_publishing_draft": false,
"id": "40699477",
"question_type": "normal",
"relationship": {},
"title": "Waston 是如何通过书写识别人的情绪的?",
"type": "question",
"updated_time": 1456282404,
"url": "http://www.zhihu.com/api/v4/questions/40699477"
},
"reaction": {
"relation": {
"faved": false,
"liked": false
},
"statistics": {
"favorites": 0,
"like_count": 1
}
},
"reaction_instruction": {},
"relationship": {
"is_author": false,
"is_authorized": false,
"is_nothelp": false,
"is_thanked": false,
"voting": 0
},
"reshipment_settings": "allowed",
"reward_info": {
"can_open_reward": false,
"is_rewardable": false,
"reward_member_count": 0,
"reward_total_money": 0,
"tagline": ""
},
"same_video_answers": [],
"suggest_edit": {
"reason": "",
"status": false,
"tip": "",
"title": "",
"unnormal_details": {},
"url": ""
},
"thumbnail": "",
"type": "answer",
"updated_time": 1456553324,
"url": "http://www.zhihu.com/api/v4/answers/88321598",
"vote_next_step": "vote",
"voteup_count": 2
},
{
"admin_closed_comment": false,
"annotation_action": [],
"answer_type": "normal",
"attachment": {
"attachment_id": "",
"type": "answer"
},
"author": {
"avatar_url": "https://pic1.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980_l.jpg?source=c8b7c179",
"avatar_url_template": "https://picx.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980.jpg?source=c8b7c179",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": ""
},
"gender": -1,
"headline": "python 人工智能 深度学习 机器学习",
"id": "66ae4cef372d990cba4e8b9179233fc2",
"is_advertiser": false,
"is_org": false,
"kvip_info": {
"is_vip": false,
"target_url": "",
"vip_icon": {
"night_mode_url": "",
"url": ""
}
},
"name": "人工智能",
"type": "people",
"url": "http://www.zhihu.com/api/v4/people/66ae4cef372d990cba4e8b9179233fc2",
"url_token": "ren-gong-zhi-neng-90",
"user_type": "people",
"vip_info": {
"is_vip": false
}
},
"biz_ext": {
"creation_relationship": {}
},
"can_comment": {
"reason": "",
"status": true
},
"collapse_reason": "",
"collapsed_by": "nobody",
"comment_count": 0,
"comment_permission": "all",
"content": "<p data-pid=\"A4JnV1Tr\">deep learning这是个方向</p>",
"content_need_truncated": false,
"created_time": 1456553279,
"editable_content": "",
"excerpt": "deep learning这是个方向",
"extras": "",
"force_login_when_click_read_more": false,
"id": "88321493",
"is_collapsed": false,
"is_copyable": true,
"is_labeled": false,
"is_navigator": false,
"is_normal": true,
"navigator_vote": false,
"question": {
"created": 1454912375,
"has_publishing_draft": false,
"id": "40214698",
"question_type": "normal",
"relationship": {},
"title": "为什么说机器智能才是现实之路,而真正意义上的人工智能很可能是水中花镜中月?",
"type": "question",
"updated_time": 1454912375,
"url": "http://www.zhihu.com/api/v4/questions/40214698"
},
"reaction": {
"relation": {
"faved": false,
"liked": false
},
"statistics": {
"favorites": 0,
"like_count": 1
}
},
"reaction_instruction": {},
"relationship": {
"is_author": false,
"is_authorized": false,
"is_nothelp": false,
"is_thanked": false,
"voting": 0
},
"reshipment_settings": "allowed",
"reward_info": {
"can_open_reward": false,
"is_rewardable": false,
"reward_member_count": 0,
"reward_total_money": 0,
"tagline": ""
},
"same_video_answers": [],
"suggest_edit": {
"reason": "",
"status": false,
"tip": "",
"title": "",
"unnormal_details": {},
"url": ""
},
"thumbnail": "",
"type": "answer",
"updated_time": 1456553279,
"url": "http://www.zhihu.com/api/v4/answers/88321493",
"vote_next_step": "vote",
"voteup_count": 0
},
{
"admin_closed_comment": false,
"annotation_action": [],
"answer_type": "normal",
"attachment": {
"attachment_id": "",
"type": "answer"
},
"author": {
"avatar_url": "https://picx.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980_l.jpg?source=c8b7c179",
"avatar_url_template": "https://picx.zhimg.com/23f3234ed553f46ac28c3ad7f0d73980.jpg?source=c8b7c179",
"badge": [],
"badge_v2": {
"detail_badges": [],
"icon": "",
"merged_badges": [],
"night_icon": "",
"title": ""
},
"gender": -1,
"headline": "python 人工智能 深度学习 机器学习",
"id": "66ae4cef372d990cba4e8b9179233fc2",
"is_advertiser": false,
"is_org": false,
"kvip_info": {
"is_vip": false,
"target_url": "",
"vip_icon": {
"night_mode_url": "",
"url": ""
}
},
"name": "人工智能",
"type": "people",
"url": "http://www.zhihu.com/api/v4/people/66ae4cef372d990cba4e8b9179233fc2",
"url_token": "ren-gong-zhi-neng-90",
"user_type": "people",
"vip_info": {
"is_vip": false
}
},
"biz_ext": {
"creation_relationship": {}
},
"can_comment": {
"reason": "",
"status": true
},
"collapse_reason": "",
"collapsed_by": "nobody",
"comment_count": 1,
"comment_permission": "all",
"content": "<p data-pid=\"zpoeTnuS\">人与机器结合,促成自身的进步</p>",
"content_need_truncated": false,
"created_time": 1456553204,
"editable_content": "",
"excerpt": "人与机器结合,促成自身的进步",
"extras": "",
"force_login_when_click_read_more": false,
"id": "88321350",
"is_collapsed": false,
"is_copyable": true,
"is_labeled": false,
"is_navigator": false,
"is_normal": true,
"navigator_vote": false,
"question": {
"created": 1456323823,
"has_publishing_draft": false,
"id": "40723838",
"question_type": "normal",
"relationship": {},
"title": "如果超人工智能突然出现,人类该怎么办?",
"type": "question",
"updated_time": 1456323823,
"url": "http://www.zhihu.com/api/v4/questions/40723838"
},
"reaction": {
"relation": {
"faved": false,
"liked": false
},
"statistics": {
"favorites": 0,
"like_count": 2
}
},
"reaction_instruction": {},
"relationship": {
"is_author": false,
"is_authorized": false,
"is_nothelp": false,
"is_thanked": false,
"voting": 0
},
"reshipment_settings": "allowed",
"reward_info": {
"can_open_reward": false,
"is_rewardable": false,
"reward_member_count": 0,
"reward_total_money": 0,
"tagline": ""
},
"same_video_answers": [],
"suggest_edit": {
"reason": "",
"status": false,
"tip": "",
"title": "",
"unnormal_details": {},
"url": ""
},
"thumbnail": "",
"type": "answer",
"updated_time": 1456553204,
"url": "http://www.zhihu.com/api/v4/answers/88321350",
"vote_next_step": "vote",
"voteup_count": 2
},
"… 17 more items in the full response"
],
"need_force_login": false,
"paging": {
"is_end": false,
"is_start": true,
"next": "http://www.zhihu.com/api/v4/members/ren-gong-zhi-neng-90/answers?user_url_token=ren-gong-zhi-neng-90&limit=20&offset=20&include=data%5B%2A%5D.is_normal%2Cadmin_closed_comment%2Creward_info%2Cis_collapsed%2Cannotation_action%2Cannotation_detail%2Ccollapse_reason%2Ccollapsed_by%2Csuggest_edit%2Ccomment_count%2Ccan_comment%2Ccontent%2Ceditable_content%2Cattachment%2Cvoteup_count%2Creshipment_settings%2Ccomment_permission%2Ccreated_time%2Cupdated_time%2Creview_info%2Cexcerpt%2Cpaid_info%2Creaction_instruction%2Cis_labeled%2Clabel_info%2Crelationship.is_authorized%2Cvoting%2Cis_author%2Cis_thanked%…",
"previous": "http://www.zhihu.com/api/v4/members/ren-gong-zhi-neng-90/answers?user_url_token=ren-gong-zhi-neng-90&limit=20&offset=0&include=data%5B%2A%5D.is_normal%2Cadmin_closed_comment%2Creward_info%2Cis_collapsed%2Cannotation_action%2Cannotation_detail%2Ccollapse_reason%2Ccollapsed_by%2Csuggest_edit%2Ccomment_count%2Ccan_comment%2Ccontent%2Ceditable_content%2Cattachment%2Cvoteup_count%2Creshipment_settings%2Ccomment_permission%2Ccreated_time%2Cupdated_time%2Creview_info%2Cexcerpt%2Cpaid_info%2Creaction_instruction%2Cis_labeled%2Clabel_info%2Crelationship.is_authorized%2Cvoting%2Cis_author%2Cis_thanked%2…",
"totals": 116
}
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Zhihu User AnswersAPI นี้ 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/user-answers โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง ทุกองค์กรจะได้รับคำขอฟรี 100 ครั้งต่อวัน UTC โดยใช้ร่วมกันใน SandBase APIs ที่เข้าเงื่อนไขรวมถึงรายการนี้ หลังจากนั้นแต่ละคำขอจะคิดค่าบริการตามราคานี้จากยอดคงเหลือ SandBase ของคุณ ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: user_url_token (string). ตัวเลือก: limit (string), offset (string) และ sort_type (หนึ่งใน created, voteups). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Zhihu User Answers ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Zhihu API แยกต่างหาก