Zhihu 知乎 Scraper - Answers, Articles, Comments & Hot List avatar

Zhihu 知乎 Scraper - Answers, Articles, Comments & Hot List

Pricing

from $4.00 / 1,000 results

Go to Apify Store
Zhihu 知乎 Scraper - Answers, Articles, Comments & Hot List

Zhihu 知乎 Scraper - Answers, Articles, Comments & Hot List

Scrape Zhihu (知乎) long-form Chinese Q&A: search answers, articles and pins, all answers of a question, comments and replies, the hot list, user profiles, followers and full answer text. Public author IDs and IP location where shown. No login or cookies needed. Export JSON, CSV or Excel.

Pricing

from $4.00 / 1,000 results

Rating

0.0

(0)

Developer

Silkline

Silkline

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 hours ago

Last modified

Share

Zhihu 知乎 Scraper collects public data from Zhihu as clean, flat JSON. You can search answers, articles and pins by keyword, get every answer under a question, comments and replies, the hot list, user profiles, a user's answers, articles and pins, followers and followings, and the full text of any answer or article. It is made for market researchers, brand and trend monitors, people looking for experts and influencers, and AI and data teams who need long-form Chinese text with clean metadata. No Zhihu account, API keys, proxies or cookies are needed.

What is Zhihu?

Zhihu (知乎) is a Chinese question-and-answer website. Users ask questions, write long answers, publish articles and share short posts called pins, and the site keeps a hot list of trending questions. Because answers and articles are often long and detailed, Zhihu is useful for research on Chinese-language opinions and expert text.

What data can you get?

The Actor has ten modes in one place: content, discussion, people and trends.

ModeGive itYou get
searcha keyword (optional: result type, sort, time range)answers, articles and pins matching the keyword, with full text
questionquestion links or IDs (optional: order)the answers of each question, up to 200 per question
commentsanswer links or IDs (optional: sort, include replies)the comments under each answer, with IP location and likes
repliescomment IDsall replies under a comment
hotnothingthe hot list: rank, heat, answer and follower counts
userprofile links or namesone profile per user: headline, followers, answers, articles, IP location
userContentprofile links or names (optional: answers / articles / pins, sort)everything a user published, with full text
followersprofile links or namesthe followers of each account, as user records
followingprofile links or namesthe accounts each account follows, as user records
detailanswer links or article linksthe full text of each answer or article

Every record has a type field: answer, article, pin, comment, user or question (hot list). In the Apify Console the dataset also has ready-made table views: Answers, Articles, Comments, Users and Hot list.

Answers, articles and pins

FieldWhat it is
textFull text as plain text, paragraphs separated by line breaks (not a snippet)
questionTitleTitle of the question an answer belongs to (answer)
titleArticle title (article)
voteupCountUpvotes (answer, article)
likeCountLikes (pin)
commentCountNumber of comments (answer, article, pin)
favoriteCountNumber of times saved to a collection (answer, article, pin)
createdAt, updatedAtDates in ISO 8601 UTC
answerId, articleId, pinId, questionIdIDs of the record (an answer also carries its questionId)
urlLink on zhihu.com
excerptShort excerpt (answer, article)
topicsTopic names (article, pin)
imageUrlCover image (article)

Author fields (on answers, articles, pins and comments)

FieldWhat it is
authorAuthor's display name
authorIdAuthor's Zhihu user ID; null for anonymous authors
authorUrlTokenAuthor's profile name (the part after /people/); null for anonymous authors
authorAvatarAvatar image URL
authorHeadlineOne-line headline
authorGendermale or female; null when not set
authorFollowerCountFollower count where the response carries it
authorVerificationVerification text, for example a certified occupation
authorIpLocationIP location where Zhihu shows it (comments, replies and articles opened with detail)

Comments and replies

FieldWhat it is
textComment text
likeCountLikes
replyCountNumber of replies under the comment
commentIdComment ID (use it as input for replies mode)
answerIdThe answer the comment belongs to (comments mode)
parentCommentIdThe comment this one replies to; null for top-level comments
replyToCommentIdSet when a reply answers another reply rather than the top-level comment
isPinnedTrue when the content author pinned the comment
isByContentAuthorTrue when the comment was written by the author of the answer or article
createdAtDate in ISO 8601 UTC

Comments carry the author fields above, including authorIpLocation. Comments have no url.

Users

FieldWhat it is
userIdZhihu user ID
userUrlTokenProfile name (the part after /people/)
nameDisplay name
headlineOne-line headline
followerCountNumber of followers
answerCountAnswers written
articleCountArticles written
ipLocationIP location shown on the profile (profile lookups only)
gendermale or female; null when not set
avatarAvatar image URL
verificationVerification text
isOrganizationOrganization account
isVipZhihu membership
urlProfile link
sourceUserProfile name of the account whose followers or followings these are (followers and following modes)

Hot list questions

FieldWhat it is
rankPosition on the hot list
titleQuestion title
heatHeat as a number
heatTextHeat as Zhihu shows it, for example "1215 万热度"
answerCountNumber of answers
followerCountNumber of followers of the question
excerptShort excerpt
createdAtQuestion creation date in ISO 8601 UTC
questionId, urlQuestion ID and link

How to use Zhihu Scraper

  1. Open Zhihu Scraper in the Apify Console.
  2. Choose a Mode, for example "Search answers, articles and pins by keyword" or "Hot list".
  3. Fill in the fields for that mode. Each field's title says which mode reads it; other fields are ignored.
  4. Set Max results to cap how many items (and how much money) the run can use.
  5. Click Start and wait for the run to finish.
  6. Open the dataset and export it as JSON, CSV, Excel or another format, or read it through the API.

An empty input {} also works: it searches Zhihu for "python".

Input

Only mode is required. The list fields are prefilled with an example in the form.

FieldTypeRequiredWhat it doesDefault
modestringYesWhat to scrape: search, question, comments, replies, hot, user, userContent, followers, following, detailsearch
keywordstringOptional (search)Search keyword, Chinese or English; falls back to "python" when emptynone
searchTypestringOptional (search)all (answers, articles and pins), answers or articlesall
sortstringOptional (search)relevance (Zhihu's default ranking), votes (most upvoted) or newestrelevance
timeRangestringOptional (search)Only content published within any, day, week, month, 3months, 6months or yearany
questionsarrayOptional (question)Question links (https://www.zhihu.com/question/<id>) or question IDs; up to 200 answers per questionnone
answerOrderstringOptional (question)default (Zhihu's order) or newest (most recently updated first)default
answersarrayOptional (comments)Answer links (https://www.zhihu.com/question/<id>/answer/<id>) or answer IDsnone
commentIdsarrayOptional (replies)Comment IDs (the commentId of a comment) to fetch all replies ofnone
commentSortstringOptional (comments, replies)hot (hottest first) or newesthot
includeRepliesbooleanOptional (comments)Also output the first replies Zhihu shows under each comment (not the full list); each reply is one more resultfalse
usersarrayOptional (user, userContent, followers, following)Profile links (https://www.zhihu.com/people/<name>) or the name after /people/none
userContentTypestringOptional (userContent)answers, articles or pinsanswers
userContentSortstringOptional (userContent)newest or votes (answers and articles; pins are always newest first)newest
linksarrayOptional (detail)Answer links or article links (https://zhuanlan.zhihu.com/p/<id>)none
maxResultsintegerOptionalMaximum number of items in total for this run, 1 to 5000. You are charged per item returned20

maxResults is the total across all inputs in the run; a run stops as soon as it is reached.

Search answers by keyword

{
"mode": "search",
"keyword": "新能源汽车",
"searchType": "answers",
"sort": "votes",
"timeRange": "year",
"maxResults": 100
}

All answers of a question

{
"mode": "question",
"questions": ["https://www.zhihu.com/question/614920801"],
"answerOrder": "default",
"maxResults": 100
}

Comments of an answer, with first replies

{
"mode": "comments",
"answers": ["https://www.zhihu.com/question/614920801/answer/3174177021"],
"commentSort": "hot",
"includeReplies": true,
"maxResults": 100
}

All replies to a comment

{
"mode": "replies",
"commentIds": ["10655110604"],
"commentSort": "newest",
"maxResults": 50
}

Hot list

{
"mode": "hot",
"maxResults": 30
}

User profiles and followers

{
"mode": "user",
"users": ["excited-vczh"],
"maxResults": 10
}
{
"mode": "followers",
"users": ["https://www.zhihu.com/people/excited-vczh"],
"maxResults": 200
}

A user's articles, most upvoted first

{
"mode": "userContent",
"users": ["https://www.zhihu.com/people/excited-vczh"],
"userContentType": "articles",
"userContentSort": "votes",
"maxResults": 50
}

Full text of answers and articles

{
"mode": "detail",
"links": [
"https://zhuanlan.zhihu.com/p/2075952075796759957",
"https://www.zhihu.com/question/614920801/answer/3174177021"
],
"maxResults": 10
}

Output example

The values below are illustrative samples.

Answer (search, question, userContent)

{
"type": "answer",
"answerId": "1234567890",
"url": "https://www.zhihu.com/question/123456789/answer/1234567890",
"questionId": "123456789",
"questionTitle": "学习 Python 需要多长时间?",
"text": "这是一个示例回答的第一段。\n这是第二段。",
"excerpt": "这是一个示例回答的第一段。",
"voteupCount": 1250,
"commentCount": 86,
"favoriteCount": 430,
"createdAt": "2024-05-12T08:30:00Z",
"updatedAt": "2024-05-13T02:10:00Z",
"author": "示例用户",
"authorId": "0123456789abcdef0123456789abcdef",
"authorUrlToken": "sample-user",
"authorAvatar": "https://pica.zhimg.com/v2-example_l.jpg",
"authorHeadline": "软件工程师",
"authorGender": "female",
"authorFollowerCount": 1520,
"authorVerification": null,
"authorIpLocation": null
}

Articles use "type": "article" with articleId, title, imageUrl and topics; pins use "type": "pin" with pinId, likeCount and topics.

Comment (comments, replies)

{
"type": "comment",
"commentId": "10000000001",
"answerId": "1234567890",
"parentCommentId": null,
"replyToCommentId": null,
"text": "写得很清楚,谢谢分享。",
"likeCount": 42,
"replyCount": 3,
"isPinned": false,
"isByContentAuthor": false,
"createdAt": "2024-05-12T10:05:00Z",
"author": "示例评论者",
"authorId": "fedcba9876543210fedcba9876543210",
"authorUrlToken": "sample-commenter",
"authorAvatar": "https://pica.zhimg.com/v2-example2_l.jpg",
"authorHeadline": null,
"authorGender": null,
"authorFollowerCount": null,
"authorVerification": null,
"authorIpLocation": "广东"
}

User (user, followers, following)

{
"type": "user",
"userId": "0123456789abcdef0123456789abcdef",
"userUrlToken": "sample-user",
"name": "示例用户",
"headline": "软件工程师",
"gender": "female",
"avatar": "https://pica.zhimg.com/v2-example_l.jpg",
"url": "https://www.zhihu.com/people/sample-user",
"ipLocation": "上海",
"followerCount": 1520,
"answerCount": 64,
"articleCount": 12,
"isOrganization": false,
"isVip": false,
"verification": null
}

In followers and following mode each user record also has sourceUser, the profile name of the account whose list it comes from.

Hot list question (hot)

{
"type": "question",
"rank": 1,
"questionId": "987654321",
"title": "如何看待某示例话题的最新进展?",
"excerpt": "示例问题描述。",
"heat": 12150000,
"heatText": "1215 万热度",
"answerCount": 356,
"followerCount": 2890,
"createdAt": "2024-05-10T03:00:00Z",
"url": "https://www.zhihu.com/question/987654321"
}

How much does it cost?

The Actor uses pay-per-event pricing:

EventPrice
Run start$0.005 per run
Result$0.004 per item returned

Examples:

  • 20 results: $0.005 + 20 × $0.004 = $0.085
  • 100 results: $0.005 + 100 × $0.004 = $0.405
  • 1,000 results: $0.005 + 1,000 × $0.004 = $4.005

On the free Apify plan, a run returns at most 20 results in total; any paid Apify plan removes the limit. On the free Apify plan each account can run this Actor up to 3 times per 24 hours and 10 times per 7 days, within a small lifetime free allowance shared across all our Actors, and all free accounts share a daily free budget. When any of these limits is reached, the run stops before fetching anything and nothing is charged.

The run-start fee is charged once per run, when the first request to the data source succeeds, even if that request returns nothing. It is not charged when the data source fails from the start or rejects the IDs, or when your spending limit cannot cover it. You never pay for more than maxResults items, and you are never charged for items that were not delivered. Deleted comments and comments without text are skipped and not charged. With includeReplies, each reply counts as one more result. The run stops by itself if your spending limit is reached.

Use cases

  • Market and consumer research in the Chinese-speaking web: what people say about a product, a brand or a problem, using search with a keyword and a time range.
  • Trend and brand monitoring: pull the hot list every morning, or new answers on a topic every day with sort set to newest.
  • Influencer and expert discovery: find who answers best in a field with search or question, then check their followerCount, answerCount and published content with user and userContent.
  • Discussion analysis: collect comments and replies with likeCount, replyCount, isByContentAuthor and authorIpLocation to see how readers react.
  • AI and data projects: long-form Chinese text in text with clean metadata for LLM training sets, search and summaries.
  • Audience research: list the followers or followings of an account as user records.

Integrations and API

If you are looking for a Zhihu API, you can use this Actor like one. It is not an official Zhihu API and is not affiliated with Zhihu. You can start runs through the Apify API, schedule them in the Apify Console (for example a daily hot list run), and connect the results to webhooks and the integrations available on the Apify platform. Results are stored in a dataset you can download as JSON, CSV, Excel and other formats.

Python example with apify-client:

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("clover_folktale/zhihu-scraper").call(run_input={
"mode": "search",
"keyword": "新能源汽车",
"searchType": "answers",
"sort": "votes",
"timeRange": "year",
"maxResults": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

Tips and limits

  • Page sizes. Search pages hold about 13-18 usable results; lists of answers, articles, pins, followers and followings 20; comments 10; replies up to 50. Large runs make many requests; expect a few seconds per page.
  • Questions. question mode fetches the answers of each question in one go, up to 200 per question, in Zhihu's default order or most recently updated first.
  • Search. Ads, suggestions and other card types are left out. Pins appear only with result type all. Answer and article full text is included in the search results.
  • Comments. comments returns top-level comments. With includeReplies it also outputs the first replies Zhihu shows under each one (not the whole thread). Use replies mode with a comment's commentId to get every reply. Deleted comments and comments without text are skipped and not charged.
  • Hot list. About 30 questions per request, ranked as on Zhihu at the time of the run.
  • Inputs that return nothing. Unknown or hidden users, questions, answers and articles are skipped. If too many inputs return nothing, the run stops to protect your budget.
  • Stability. The Actor retries transient errors on its own and stops cleanly instead of failing half-way. In search mode an empty page is retried once; other lists and lookups are requested once, and an empty answer is treated as no data.
  • Free plan. A run returns at most 20 results in total; a paid Apify plan removes the limit.

Fields that are often empty

  • detail mode on an answer has no voteupCount, commentCount or favoriteCount; use search, question or userContent for those counts.
  • authorIpLocation is filled only where Zhihu shows it: comments, replies and articles opened with detail. ipLocation is filled on profile lookups, not on follower lists.
  • authorGender and gender are empty when the account has not set one; authorHeadline, authorVerification and verification are empty for accounts without them.
  • authorFollowerCount is empty in comments, replies, userContent lists and detail lookups.
  • Anonymous authors have a display name but no user ID or profile name.
  • text is empty only for image-only pins.
  • Some accounts' answers are hidden by Zhihu and cannot be listed even though the profile shows a count.

FAQ

Do I need a Zhihu account, cookies or API keys?

No. You do not need a Zhihu account, API keys, proxies or cookies.

The Actor returns only public data. Public profile data is included: user ID, profile name, avatar, headline, gender, verification and IP location where Zhihu shows them, for authors, commenters and listed followers alike. Phone numbers, real names and private messages are never part of the output. You are responsible for how you use the data and for following the laws that apply to you.

How fresh is the data?

Data is read from Zhihu when the run happens. Counts such as voteupCount or likeCount are the values at the time of the run, and the hot list is ranked as on Zhihu at that moment.

Why are some fields empty?

Zhihu does not show every field everywhere. For example, IP location appears only on comments, replies, articles opened with detail and profile lookups. See "Fields that are often empty" above.

How many results can I get?

Up to 5,000 per run via maxResults (20 on the free plan). question mode returns up to 200 answers per question, and the hot list has about 30 questions per request.

Can I schedule runs and export the data?

Yes. Schedule runs in the Apify Console or start them through the API, then export the dataset as JSON, CSV, Excel or other formats.

Unknown or hidden users, questions, answers and articles are skipped, and no result fee is charged for them. The $0.005 run-start fee may still apply: it is charged when the first request to the data source succeeds, even if that request returns nothing. If too many inputs return nothing, the run stops to protect your budget.

A field or mode is missing. What can I do?

Open an issue from the Actor page and it will be looked at.

More tools from the same developer