# Zhihu 知乎 Scraper - Answers, Articles, Comments & Hot List (`clover_folktale/zhihu-scraper`) Actor

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.

- **URL**: https://apify.com/clover_folktale/zhihu-scraper.md
- **Developed by:** [Silkline](https://apify.com/clover_folktale) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

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.

| Mode | Give it | You get |
|---|---|---|
| `search` | a keyword (optional: result type, sort, time range) | answers, articles and pins matching the keyword, with full text |
| `question` | question links or IDs (optional: order) | the answers of each question, up to 200 per question |
| `comments` | answer links or IDs (optional: sort, include replies) | the comments under each answer, with IP location and likes |
| `replies` | comment IDs | all replies under a comment |
| `hot` | nothing | the hot list: rank, heat, answer and follower counts |
| `user` | profile links or names | one profile per user: headline, followers, answers, articles, IP location |
| `userContent` | profile links or names (optional: answers / articles / pins, sort) | everything a user published, with full text |
| `followers` | profile links or names | the followers of each account, as user records |
| `following` | profile links or names | the accounts each account follows, as user records |
| `detail` | answer links or article links | the 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

| Field | What it is |
|---|---|
| `text` | Full text as plain text, paragraphs separated by line breaks (not a snippet) |
| `questionTitle` | Title of the question an answer belongs to (answer) |
| `title` | Article title (article) |
| `voteupCount` | Upvotes (answer, article) |
| `likeCount` | Likes (pin) |
| `commentCount` | Number of comments (answer, article, pin) |
| `favoriteCount` | Number of times saved to a collection (answer, article, pin) |
| `createdAt`, `updatedAt` | Dates in ISO 8601 UTC |
| `answerId`, `articleId`, `pinId`, `questionId` | IDs of the record (an answer also carries its `questionId`) |
| `url` | Link on zhihu.com |
| `excerpt` | Short excerpt (answer, article) |
| `topics` | Topic names (article, pin) |
| `imageUrl` | Cover image (article) |

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

| Field | What it is |
|---|---|
| `author` | Author's display name |
| `authorId` | Author's Zhihu user ID; null for anonymous authors |
| `authorUrlToken` | Author's profile name (the part after /people/); null for anonymous authors |
| `authorAvatar` | Avatar image URL |
| `authorHeadline` | One-line headline |
| `authorGender` | `male` or `female`; null when not set |
| `authorFollowerCount` | Follower count where the response carries it |
| `authorVerification` | Verification text, for example a certified occupation |
| `authorIpLocation` | IP location where Zhihu shows it (comments, replies and articles opened with `detail`) |

#### Comments and replies

| Field | What it is |
|---|---|
| `text` | Comment text |
| `likeCount` | Likes |
| `replyCount` | Number of replies under the comment |
| `commentId` | Comment ID (use it as input for `replies` mode) |
| `answerId` | The answer the comment belongs to (comments mode) |
| `parentCommentId` | The comment this one replies to; null for top-level comments |
| `replyToCommentId` | Set when a reply answers another reply rather than the top-level comment |
| `isPinned` | True when the content author pinned the comment |
| `isByContentAuthor` | True when the comment was written by the author of the answer or article |
| `createdAt` | Date in ISO 8601 UTC |

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

#### Users

| Field | What it is |
|---|---|
| `userId` | Zhihu user ID |
| `userUrlToken` | Profile name (the part after /people/) |
| `name` | Display name |
| `headline` | One-line headline |
| `followerCount` | Number of followers |
| `answerCount` | Answers written |
| `articleCount` | Articles written |
| `ipLocation` | IP location shown on the profile (profile lookups only) |
| `gender` | `male` or `female`; null when not set |
| `avatar` | Avatar image URL |
| `verification` | Verification text |
| `isOrganization` | Organization account |
| `isVip` | Zhihu membership |
| `url` | Profile link |
| `sourceUser` | Profile name of the account whose followers or followings these are (followers and following modes) |

#### Hot list questions

| Field | What it is |
|---|---|
| `rank` | Position on the hot list |
| `title` | Question title |
| `heat` | Heat as a number |
| `heatText` | Heat as Zhihu shows it, for example "1215 万热度" |
| `answerCount` | Number of answers |
| `followerCount` | Number of followers of the question |
| `excerpt` | Short excerpt |
| `createdAt` | Question creation date in ISO 8601 UTC |
| `questionId`, `url` | Question 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.

| Field | Type | Required | What it does | Default |
|---|---|---|---|---|
| `mode` | string | Yes | What to scrape: `search`, `question`, `comments`, `replies`, `hot`, `user`, `userContent`, `followers`, `following`, `detail` | `search` |
| `keyword` | string | Optional (search) | Search keyword, Chinese or English; falls back to "python" when empty | none |
| `searchType` | string | Optional (search) | `all` (answers, articles and pins), `answers` or `articles` | `all` |
| `sort` | string | Optional (search) | `relevance` (Zhihu's default ranking), `votes` (most upvoted) or `newest` | `relevance` |
| `timeRange` | string | Optional (search) | Only content published within `any`, `day`, `week`, `month`, `3months`, `6months` or `year` | `any` |
| `questions` | array | Optional (question) | Question links (`https://www.zhihu.com/question/<id>`) or question IDs; up to 200 answers per question | none |
| `answerOrder` | string | Optional (question) | `default` (Zhihu's order) or `newest` (most recently updated first) | `default` |
| `answers` | array | Optional (comments) | Answer links (`https://www.zhihu.com/question/<id>/answer/<id>`) or answer IDs | none |
| `commentIds` | array | Optional (replies) | Comment IDs (the `commentId` of a comment) to fetch all replies of | none |
| `commentSort` | string | Optional (comments, replies) | `hot` (hottest first) or `newest` | `hot` |
| `includeReplies` | boolean | Optional (comments) | Also output the first replies Zhihu shows under each comment (not the full list); each reply is one more result | `false` |
| `users` | array | Optional (user, userContent, followers, following) | Profile links (`https://www.zhihu.com/people/<name>`) or the name after /people/ | none |
| `userContentType` | string | Optional (userContent) | `answers`, `articles` or `pins` | `answers` |
| `userContentSort` | string | Optional (userContent) | `newest` or `votes` (answers and articles; pins are always newest first) | `newest` |
| `links` | array | Optional (detail) | Answer links or article links (`https://zhuanlan.zhihu.com/p/<id>`) | none |
| `maxResults` | integer | Optional | Maximum number of items in total for this run, 1 to 5000. You are charged per item returned | `20` |

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

#### Search answers by keyword

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

#### All answers of a question

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

#### Comments of an answer, with first replies

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

#### All replies to a comment

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

#### Hot list

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

#### User profiles and followers

```json
{
  "mode": "user",
  "users": ["excited-vczh"],
  "maxResults": 10
}
```

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

#### A user's articles, most upvoted first

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

#### Full text of answers and articles

```json
{
  "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)

```json
{
  "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)

```json
{
  "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)

```json
{
  "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)

```json
{
  "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:

| Event | Price |
|---|---|
| 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`:

```python
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.

#### Is it legal to scrape Zhihu?

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.

#### What happens with a wrong or deleted link?

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

- [Weibo 微博 Scraper - Posts, Comments, User IDs & IP Location](https://apify.com/clover_folktale/weibo-scraper)
- [Xiaohongshu 小红书 RedNote Scraper - Notes, Comments & User IP](https://apify.com/clover_folktale/xiaohongshu-scraper)
- [Douban 豆瓣 Scraper - Movies, Ratings, Comments & Reviews](https://apify.com/clover_folktale/douban-scraper)
- [Bilibili B站 Scraper - Videos, Comments, Subtitles & User IDs](https://apify.com/clover_folktale/bilibili-scraper)
- [WeChat Official Account 公众号 Scraper - Articles & Read Counts](https://apify.com/clover_folktale/wechat-scraper)
- [Douyin 抖音 Scraper - Videos, Comments, User IDs & IP Location](https://apify.com/clover_folktale/douyin-scraper)

# Actor input Schema

## `mode` (type: `string`):

What to scrape. Each mode reads only the fields named in its title.

## `keyword` (type: `string`):

Search keyword, Chinese or English (falls back to "python" when empty).

## `searchType` (type: `string`):

Answers and articles only, or everything including pins.

## `sort` (type: `string`):

Zhihu's default ranking, most upvoted, or newest first.

## `timeRange` (type: `string`):

Only content published within this period.

## `questions` (type: `array`):

Question links (https://www.zhihu.com/question/<id>) or question IDs. Returns up to 200 answers per question.

## `answerOrder` (type: `string`):

Zhihu's default order or the most recently updated first.

## `answers` (type: `array`):

Answer links (https://www.zhihu.com/question/<id>/answer/<id>) or answer IDs.

## `commentIds` (type: `array`):

Comment IDs (the commentId of a comment) to fetch all replies of.

## `commentSort` (type: `string`):

Hottest first or newest first.

## `includeReplies` (type: `boolean`):

Also output the first replies Zhihu shows under each comment (not the full reply list; use the replies mode for that). Each reply is one more result.

## `users` (type: `array`):

Profile links (https://www.zhihu.com/people/<name>) or the name after /people/.

## `userContentType` (type: `string`):

Which of the user's posts to list.

## `userContentSort` (type: `string`):

Newest first or most upvoted (answers and articles; pins are always newest first).

## `links` (type: `array`):

Answer links (https://www.zhihu.com/question/<id>/answer/<id>) or article links (https://zhuanlan.zhihu.com/p/<id>).

## `maxResults` (type: `integer`):

Maximum number of items to return in total for this run. You are charged per item returned. On the free Apify plan a run returns at most 20 results in total; any paid Apify plan removes the limit.

## Actor input object example

```json
{
  "mode": "search",
  "searchType": "all",
  "sort": "relevance",
  "timeRange": "any",
  "questions": [
    "https://www.zhihu.com/question/614920801"
  ],
  "answerOrder": "default",
  "answers": [
    "https://www.zhihu.com/question/614920801/answer/3174177021"
  ],
  "commentIds": [
    "10655110604"
  ],
  "commentSort": "hot",
  "includeReplies": false,
  "users": [
    "excited-vczh"
  ],
  "userContentType": "answers",
  "userContentSort": "newest",
  "links": [
    "https://zhuanlan.zhihu.com/p/2075952075796759957"
  ],
  "maxResults": 20
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items (JSON, CSV, Excel via the dataset API).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "questions": [
        "https://www.zhihu.com/question/614920801"
    ],
    "answers": [
        "https://www.zhihu.com/question/614920801/answer/3174177021"
    ],
    "commentIds": [
        "10655110604"
    ],
    "users": [
        "excited-vczh"
    ],
    "links": [
        "https://zhuanlan.zhihu.com/p/2075952075796759957"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clover_folktale/zhihu-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "questions": ["https://www.zhihu.com/question/614920801"],
    "answers": ["https://www.zhihu.com/question/614920801/answer/3174177021"],
    "commentIds": ["10655110604"],
    "users": ["excited-vczh"],
    "links": ["https://zhuanlan.zhihu.com/p/2075952075796759957"],
}

# Run the Actor and wait for it to finish
run = client.actor("clover_folktale/zhihu-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "questions": [
    "https://www.zhihu.com/question/614920801"
  ],
  "answers": [
    "https://www.zhihu.com/question/614920801/answer/3174177021"
  ],
  "commentIds": [
    "10655110604"
  ],
  "users": [
    "excited-vczh"
  ],
  "links": [
    "https://zhuanlan.zhihu.com/p/2075952075796759957"
  ]
}' |
apify call clover_folktale/zhihu-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clover_folktale/zhihu-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hk7cNySojqI6U5F20/builds/VQaF5p0n9gWWh3RCG/openapi.json
