# Zhihu Scraper: Answers, Articles, Comments & Hot List (`apisamurai/zhihu-scraper`) Actor

Zhihu Scraper for answers and articles by keyword, the answers under a question, the posts of any user, single answers by link, comments and the live hot list. Plain text, upvotes, dates and authors. No login, date and upvote filters, pay only for real rows.

- **URL**: https://apify.com/apisamurai/zhihu-scraper.md
- **Developed by:** [API Samurai](https://apify.com/apisamurai) (community)
- **Categories:** Social media, News
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 answer or articles

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/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: Answers, Articles, Comments & Hot List

This Zhihu Scraper gets Zhihu answers and articles by keyword, all the answers under a question, the latest posts of any user, single answers and articles by link, the comments under an answer, and the live hot list. Every row comes with plain text (no HTML), author, date, link, upvotes and counts. You pay only for real, unique rows, and IDs are always text, so long Zhihu IDs never get rounded.

### What you can use it for

- **Research a topic or an opinion** with keyword search and the answers under a question, sorted by upvotes or by date.
- **Monitor a brand or product** on a schedule with a date filter, and send new rows to Sheets, Slack or a database.
- **Collect expert answers** as clean Chinese text for AI and NLP datasets, with upvotes as a quality signal.
- **Watch what is trending** with the hot list, with rank, heat and answer counts.
- **Follow accounts** and archive their answers and articles with dates and engagement numbers.
- **Read the comments** under an answer for sentiment analysis or customer feedback.

### Fair billing

- Only real rows are charged: answers, articles, comments and hot questions. No demo, mock or placeholder rows, ever. Ads and other cards in search results are dropped and counted in the run summary.
- Same price on every Apify plan, free plan included.
- Free Apify plan: 3 live runs a day, each with one data request, so you can try it. Paid plans have no limit.
- Limits, dates, upvote and kind filters are enforced by the Actor itself. Rows outside your dates or filters are skipped and not charged.
- Duplicates are never charged. An answer found by two keywords, or by a keyword and a user, is saved once.
- Empty results, missing questions, users, answers or articles, answers with no comments and failed requests cost nothing.
- When you hit your spending limit, the run stops cleanly.

### How to use

1. Open the [Zhihu Scraper](https://apify.com/apisamurai/zhihu-scraper) page and click **Try for free** (you sign in to your Apify account).
2. Add **Search keywords**, **Question links**, **Users**, **Answer and article links**, or turn on **Add the hot list**.
3. Set **Max answers and articles per keyword, question or user**, and optionally dates and min upvotes. Turn on **Also get comments of the answers found** to add comments.
4. Click **Start**. Rows appear in the **Output** tab while the run works.
5. Export the dataset as JSON, CSV or Excel, or check the `SUMMARY` record in the key-value store.

### Input

| Field | What it does |
|---|---|
| Search keywords | Answers and articles matching each keyword, one per line. Chinese keywords work best. Choose the order (relevance, most upvoted, newest), a time window, and answers, articles or both. |
| Question links | All answers under a question: `https://www.zhihu.com/question/2111578255526466833` or the bare number. Default order or newest. |
| Users | Latest answers and articles, newest first: `https://www.zhihu.com/people/zai-ping-lun-wo-jiu-shi-zhu` or just `zai-ping-lun-wo-jiu-shi-zhu`. Answers, articles or both. |
| Answer and article links | One lookup per link: `https://www.zhihu.com/question/<id>/answer/<id>`, `https://www.zhihu.com/answer/<id>`, `https://zhuanlan.zhihu.com/p/<id>`. |
| Also get comments of the answers found | Off by default. Adds the comments of every answer saved. |
| Add the hot list | Off by default. Adds the current hot list (about 30 questions). |
| Max answers and articles per keyword, question or user | Default 100, exact. |
| Max comments per answer | Default 20, exact. |
| Max rows for the whole run | Optional hard cap on all rows. Answers and articles are saved before comments. |
| Posted on or after / on or before | Inclusive, UTC. Relative dates like `7 days` work. Answers and articles only. |
| Min upvotes | Skip answers and articles below this number. |

```json
{
  "searchKeywords": ["人工智能"],
  "searchSort": "upvotes",
  "questionUrls": ["https://www.zhihu.com/question/2111578255526466833"],
  "includeComments": true,
  "maxPostsPerSource": 20,
  "maxCommentsPerPost": 20,
  "postedAfter": "30 days"
}
```

### Output

One row per answer, article, comment or hot question; `type` tells them apart. Field names never change between runs. Real output (3 December 2026, shortened):

```json
{
  "type": "answer",
  "id": "2063420040297308669",
  "url": "https://www.zhihu.com/question/2042649810709239000/answer/2063420040297308669",
  "questionId": "2042649810709239000",
  "questionTitle": "为什么体制内至今仍不鼓励用人工智能？",
  "text": "相反，体制内一开始很鼓励探索使用人工智能，特别是deepseek刚出来那会，各地政府纷纷关注，...",
  "excerpt": "体制内一开始很鼓励探索使用人工智能,特别是deepseek刚出来那会,...",
  "createdAt": "2026-07-22T16:27:54.000Z",
  "updatedAt": "2026-07-22T16:27:54.000Z",
  "upvotes": 3924,
  "comments": 81,
  "favorites": 247,
  "thanks": null,
  "author": { "id": "3532c75b53b9aa5c1327a0eeb953ab33", "urlToken": "zai-ping-lun-wo-jiu-shi-zhu", "name": "长歌当行", "headline": "重要吗？不重要。" },
  "ipLocation": null,
  "sourceType": "search",
  "sourceInput": "人工智能",
  "scrapedAt": "2026-12-03T14:10:00.000Z"
}
```

An article row has `title` instead of the question fields, and no `thanks`. A comment row: `{ "type": "comment", "id": "11551072781", "postId": "2063420040297308669", "url": "https://www.zhihu.com/question/2042649810709239000/answer/2063420040297308669", "text": "国考搞了几十年，公务员队伍里都是同龄里最聪明的一批，...", "createdAt": "2026-08-10T07:08:24.000Z", "likes": 53, "replyCount": 19, "author": { "id": "38fc88f5d0424dabff276387bed356ae", "urlToken": "su-fu-50", "name": "江大桥" }, "ipLocation": "新加坡", "sourceInput": "人工智能", "scrapedAt": "..." }`.

A hot question row: `{ "type": "hot-question", "rank": 1, "id": "2111578255526466833", "title": "颜宁团队《Nature》论文遭 PubPeer 质疑，380 个数值完全一致，有可能涉及学术不端吗？", "url": "https://www.zhihu.com/question/2111578255526466833", "excerpt": "2026年6月10日，深圳医学科学院与清华团队在《Nature》发表题为...", "heat": 20670000, "heatText": "2067 万热度", "answers": 231, "followers": 922, "comments": 0, "createdAt": "2026-12-02T13:51:27.000Z", "scrapedAt": "..." }`.

Times are ISO 8601 UTC. `heat` is the number behind the hot list text (万 is 10,000, 亿 is 100,000,000). `url` of a comment is the link of its answer. `ipLocation` is the place Zhihu shows, when it shows one. Missing values are `null`, never a fake 0.

Each run also writes a `SUMMARY` record to the key-value store. For every input it lists rows delivered, rows skipped by dates or filters, duplicates, and why it stopped (`limit reached`, `no more results`, `not found or deleted`, `temporary error`, `spending limit`, `free plan limit` or `data source unavailable`).

### Pricing

$1 per 1,000 answers and articles; $5 per 1,000 answers or articles by link; $1 per 1,000 comments; $1 per 1,000 hot questions; $0.005 per run start

### Integrations

- **Apify API:** start a run and get the rows in one call with `POST https://api.apify.com/v2/acts/apisamurai~zhihu-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>` and the input as JSON in the body.
- **Python and JavaScript clients** (`apify-client`): `client.actor("apisamurai/zhihu-scraper").call(run_input={...})`.
- **Zapier, Make and n8n** to send new rows to Google Sheets, Slack, a CRM or a database.
- **MCP for AI agents:** connect the Apify MCP server to Claude, ChatGPT or another MCP client and the agent can run this Actor as a tool.
- **Schedules and webhooks** in Apify Console for daily or hourly runs.

### More China platform scrapers

- [Douyin Scraper](https://apify.com/apisamurai/douyin-scraper): Douyin videos by keyword (up to 1,000 per search), user videos, comments and the hot list.
- [Weibo Scraper](https://apify.com/apisamurai/weibo-scraper): Weibo posts by keyword or user, comments and the live hot search list.
- [Bilibili Scraper](https://apify.com/apisamurai/bilibili-scraper): Bilibili videos by keyword or user, comments and the popular list.

### FAQ

**Do I need a Zhihu account?**
No. You only need an Apify account. You never enter credentials, cookies or a session.

**Which keywords work best?**
Chinese keywords. English words work but find fewer rows. Search results come in the order you choose (relevance, most upvoted or newest), and the time window narrows them to a recent period.

**Which links work?**
Questions: `zhihu.com/question/<id>`, also with `/answer/<id>` after it, which still means the whole question in the question field. Users: `zhihu.com/people/<name>`. Answers: `zhihu.com/question/<id>/answer/<id>` and `zhihu.com/answer/<id>`. Articles: `zhuanlan.zhihu.com/p/<id>`. Links pasted with quotes, backticks or as markdown are cleaned, and a link in the wrong field still works. Search, topic and column links are not read.

**What time zone are dates in?**
`createdAt` and `updatedAt` are UTC. "Posted on or after / before" count whole days in UTC.

**How far back can I go?**
A user's answers and articles are read newest first and stop once they are older than your start date. Under a question and in search, rows come in the chosen order, so the date filter skips rows rather than stopping early, and a page with nothing that matches ends the run.

**Do filters work on comments?**
No. Dates and min upvotes apply to answers and articles. Comments are limited by **Max comments per answer** and **Max rows for the whole run**. Only answers have comments here.

**What is not charged?**
Duplicates, rows outside your dates or filters, ads and other non-content cards in search, empty results, failed requests, missing inputs, and answers with no comments.

**Why did I get fewer results than I asked for?**
Open the `SUMMARY` record. It says for each input why it stopped: no more results, rows skipped by dates or filters, duplicates, the spending limit or the free plan limit.

**Is it legal to scrape Zhihu?**
The Actor collects only public data. You are responsible for how you use it: follow the Zhihu terms and the laws where you live, and take care with personal data (for example under GDPR or China's PIPL). This is not legal advice.

# Actor input Schema

## `searchKeywords` (type: `array`):

Find answers and articles that match these keywords. One per line. Chinese keywords work best, for example 人工智能.

## `searchSort` (type: `string`):

How keyword search results are ordered.

## `searchTime` (type: `string`):

Only search results from this period. This narrows the search itself; for exact days use Posted on or after.

## `searchContentTypes` (type: `string`):

Keep answers, articles or both from keyword search. Rows of the other kind are skipped and not charged.

## `questionUrls` (type: `array`):

Get the answers under these questions. Links like https://www.zhihu.com/question/2111578255526466833 or bare question numbers. A link with /answer/ after it still means the whole question here. One per line.

## `questionAnswerSort` (type: `string`):

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

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

Get the latest answers and articles of these accounts, newest first. Profile links like https://www.zhihu.com/people/zai-ping-lun-wo-jiu-shi-zhu or just the name at the end of the link. One per line.

## `userContent` (type: `string`):

Answers, articles or both. With both, the answers come first.

## `postUrls` (type: `array`):

Get one answer or article for each link, with all its numbers: https://www.zhihu.com/question/2111578255526466833/answer/2111582747298902450, https://www.zhihu.com/answer/2063420040297308669 or https://zhuanlan.zhihu.com/p/2109831131503784733. One per line.

## `includeComments` (type: `boolean`):

On: for the answers saved from search, questions, users and links, also save their comments (up to Max comments per answer). An answer with no comments costs nothing. Articles have no comments here.

## `includeHotList` (type: `boolean`):

On: also save the current Zhihu hot list (about 30 questions with rank, heat and counts).

## `maxPostsPerSource` (type: `integer`):

Maximum answers and articles saved for each keyword, each question and each user. Enforced exactly.

## `maxCommentsPerPost` (type: `integer`):

Maximum comments saved for each answer. Enforced exactly.

## `maxTotalItems` (type: `integer`):

Optional hard cap on all rows (answers, articles, comments and hot questions) across the run. Answers and articles are saved before comments. Leave empty for no total cap.

## `postedAfter` (type: `string`):

Only answers and articles published on or after this day (UTC). Also accepts relative dates such as 7 days. Applies to answers and articles, not comments. Rows outside the range are skipped and not charged. A user's feed stops once its rows are older than this day.

## `postedBefore` (type: `string`):

Only answers and articles published on or before this day (UTC, the whole day is included). Rows outside the range are skipped and not charged.

## `minUpvotes` (type: `integer`):

Skip answers and articles with fewer upvotes. Skipped rows are not charged.

## Actor input object example

```json
{
  "searchKeywords": [
    "人工智能"
  ],
  "searchSort": "relevance",
  "searchTime": "any",
  "searchContentTypes": "both",
  "questionAnswerSort": "default",
  "userContent": "both",
  "includeComments": false,
  "includeHotList": false,
  "maxPostsPerSource": 20,
  "maxCommentsPerPost": 20
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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 = {
    "searchKeywords": [
        "人工智能"
    ],
    "maxPostsPerSource": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("apisamurai/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 = {
    "searchKeywords": ["人工智能"],
    "maxPostsPerSource": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("apisamurai/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 '{
  "searchKeywords": [
    "人工智能"
  ],
  "maxPostsPerSource": 20
}' |
apify call apisamurai/zhihu-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apisamurai/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/zS4KQ12eicsptTBkj/builds/O1Bli4xS6LMfZaC4V/openapi.json
