知乎 API v4 整理

作者:姚澤源

問題的回答

  • URL:https://www.zhihu.com/api/v4/questions/{qid}/answers
  • 參數:
    • limit:數量,最大 20
    • offset:起始位置,從零開始
    • sort_by{default, created},表示默認排序或者時間排序
    • include:額外信息,包括is_normal,is_sticky,collapsed_by,suggest_edit,comment_count,collapsed_counts,reviewing_comments_count,can_comment,content,editable_content,voteup_count,reshipment_settings,comment_permission,mark_infos,created_time,updated_time,relationship.is_author,voting,is_thanked,is_nothelp,upvoted_followees;author.is_blocking,is_blocked,is_followed,voteup_count,message_thread_token,badge[?(type=best_answerer)].topics

單個回答

  • URL:https://www.zhihu.com/api/v4/answers/{aid}
  • 參數:
    • include:額外信息,包括is_normal,is_sticky,collapsed_by,suggest_edit,comment_count,collapsed_counts,reviewing_comments_count,can_comment,content,editable_content,voteup_count,reshipment_settings,comment_permission,mark_infos,created_time,updated_time,relationship.is_author,voting,is_thanked,is_nothelp,upvoted_followees;author.is_blocking,is_blocked,is_followed,voteup_count,message_thread_token,badge[?(type=best_answerer)].topics

指定作者的回答

  • URL:https://www.zhihu.com/api/v4/members/{un}/answers
  • 參數:
    • limit:數量,最大 20
    • offset:起始位置,從零開始
    • sort_by{default, created},表示默認排序或者時間排序
    • include:額外信息,包括is_normal,suggest_edit,comment_count,collapsed_counts,reviewing_comments_count,can_comment,content,voteup_count,reshipment_settings,comment_permission,mark_infos,created_time,updated_time,relationship.voting,is_author,is_thanked,is_nothelp,upvoted_followees;author.badge[?(type=best_answerer)].topics

用戶信息

  • URL:https://www.zhihu.com/api/v4/members/{un}
  • 參數:
    • include:額外信息,包括locations,employments,gender,educations,business,voteup_count,thanked_Count,follower_count,following_count,cover_url,following_topic_count,following_question_count,following_favlists_count,following_columns_count,avatar_hue,answer_count,articles_count,pins_count,question_count,columns_count,commercial_question_count,favorite_count,favorited_count,logs_count,included_answers_count,included_articles_count,included_text,message_thread_token,account_status,is_active,is_bind_phone,is_force_renamed,is_bind_sina,is_privacy_protected,sina_weibo_url,sina_weibo_name,show_sina_weibo,is_blocking,is_blocked,is_following,is_followed,is_org_createpin_white_user,mutual_followees_count,vote_to_count,vote_from_count,thank_to_count,thank_from_count,thanked_count,description,hosted_live_count,participated_live_count,allow_message,industry_category,org_name,org_homepage,badge[?(type=best_answerer)].topics

自身信息

  • URL:https://www.zhihu.com/api/v4/me
  • 參數:
    • include:額外信息,包括locations,employments,gender,educations,business,voteup_count,thanked_Count,follower_count,following_count,cover_url,following_topic_count,following_question_count,following_favlists_count,following_columns_count,avatar_hue,answer_count,articles_count,pins_count,question_count,columns_count,commercial_question_count,favorite_count,favorited_count,logs_count,included_answers_count,included_articles_count,included_text,message_thread_token,account_status,is_active,is_bind_phone,is_force_renamed,is_bind_sina,is_privacy_protected,sina_weibo_url,sina_weibo_name,show_sina_weibo,is_blocking,is_blocked,is_following,is_followed,is_org_createpin_white_user,mutual_followees_count,vote_to_count,vote_from_count,thank_to_count,thank_from_count,thanked_count,description,hosted_live_count,participated_live_count,allow_message,industry_category,org_name,org_homepage,badge[?(type=best_answerer)].topics

關注者信息

  • URL:https://www.zhihu.com/api/v4/members/{un}/followees
  • 參數:
    • limit:數量,最大 20
    • offset:起始位置,從零開始
    • include:額外信息,包括answer_count,articles_count,gender,follower_count,is_followed,is_following,badge[?(type=best_answerer)].topics

粉絲信息

  • URL:https://www.zhihu.com/api/v4/members/{un}/followers
  • 參數:
    • limit:數量,最大 20
    • offset:起始位置,從零開始
    • include:額外信息,包括answer_count,articles_count,gender,follower_count,is_followed,is_following,badge[?(type=best_answerer)].topics

收藏夾信息

  • URL:https://api.zhihu.com/collections/{cid}

收藏夾中的回答摘要

  • URL:https://api.zhihu.com/collections/{cid}/answers
  • 參數:
    • limit:數量,最大 20
    • offset:起始位置,從零開始

知乎話題

  • URL:https://www.zhihu.com/api/v4/topics/{tid}

知乎話題精華

  • URL:https://www.zhihu.com/api/v4/topics/{tid}/feeds/essence
  • 參數:
    • limit:數量,最大 20
    • offset:起始位置,從零開始
    • include:額外信息,包括data[?(target.type=topic_sticky_module)].target.data[?(target.type=answer)].target.content,relationship.is_authorized,is_author,voting,is_thanked,is_nothelp;data[?(target.type=topic_sticky_module)].target.data[?(target.type=answer)].target.is_normal,comment_count,voteup_count,content,relevant_info,excerpt.author.badge[?(type=best_answerer)].topics;data[?(target.type=topic_sticky_module)].target.data[?(target.type=article)].target.content,voteup_count,comment_count,voting,author.badge[?(type=best_answerer)].topics;data[?(target.type=topic_sticky_module)].target.data[?(target.type=people)].target.answer_count,articles_count,gender,follower_count,is_followed,is_following,badge[?(type=best_answerer)].topics;data[?(target.type=answer)].target.annotation_detail,content,hermes_label,is_labeled,relationship.is_authorized,is_author,voting,is_thanked,is_nothelp;data[?(target.type=answer)].target.author.badge[?(type=best_answerer)].topics;data[?(target.type=article)].target.annotation_detail,content,hermes_label,is_labeled,author.badge[?(type=best_answerer)].topics;data[?(target.type=question)].target.annotation_detail,comment_count
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章