# Zhihu Scraper (`automation-lab/zhihu-scraper`) Actor

Search Zhihu by keyword and export answers, questions, articles, comments, replies and creator profiles with full text, votes, comment counts, authors and timestamps. No login or cookies.

- **URL**: https://apify.com/automation-lab/zhihu-scraper.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 (知乎) — Search, Answers, Comments & Profiles

### What does Zhihu Scraper do?

Zhihu Scraper searches Zhihu (知乎) by keyword and exports answers, questions, Zhuanlan articles, comments, comment replies and creator profiles. Each row has the text, author, upvotes, comment count, topics and timestamps. You can also paste answer, question, article and profile URLs. It needs no Zhihu account, cookies or API key, and it reads Zhihu directly: no third-party data API.

Use it to follow Chinese-language discussion of brands, products, markets and creators week after week. Export to JSON, CSV or Excel, or connect it to your pipeline through the Apify API.

### Who is it for?

- **Brand and market researchers** who track how Chinese consumers talk about a brand, product category or competitor, and want the same keyword report every week.
- **China market analysts and consultants** who read long-form expert answers to understand an industry, policy or trend.
- **Creator and influencer teams** who compare Zhihu creators by followers, answers and upvotes before a partnership.
- **Data and AI teams** who need clean Chinese-language Q\&A text with authors and engagement for analysis or RAG datasets.

### What can it collect?

| Input | What you get |
| --- | --- |
| Keywords (Chinese or English) | Matching answers, questions and Zhuanlan articles, each with full details; filter by content type and publication period, sort by relevance, upvotes or newest |
| Answer URL | The full answer text and HTML, author, upvotes, comments, favorites, thanks, question title and topics |
| Question URL | The question (views, followers, answer count, topics) plus the answers Zhihu shows on its public page |
| Article URL (`zhuanlan.zhihu.com/p/...`) | Title, text, author, upvotes, likes, comments, topics |
| Profile URL (`zhihu.com/people/...`) | Followers, following, answers, articles, questions, upvotes and thanks received, headline, IP location, employments and education |
| Include comments / replies | Top-level comments for each answer, article or question, and replies under each comment, linked by `parentId` |

### How to use it

1. Enter one or more **Search keywords**, or paste **Zhihu URLs**, or both.
2. Set **Maximum results** for the whole run. Comments and replies count too.
3. Optional: choose **Content type**, **Published within** and **Sort results** for keyword search.
4. Optional: turn on **Include comments** and **Include replies**.
5. Click **Start** and download the dataset.

Example: the 20 most-upvoted answers about camping gear from the past year, with 10 comments each:

```json
{
    "keywords": ["露营装备"],
    "searchContentType": "answer",
    "searchTimeRange": "year",
    "sortBy": "upvotes",
    "maxResultsPerKeyword": 20,
    "includeComments": true,
    "maxCommentsPerContent": 10,
    "maxItems": 300
}
```

Example: comments and replies on a known answer:

```json
{
    "urls": ["https://www.zhihu.com/question/2105936986515171184/answer/2106711882195392168"],
    "includeComments": true,
    "includeReplies": true,
    "maxCommentsPerContent": 50,
    "maxItems": 200
}
```

### Output

Every row has a `type`: `answer`, `article`, `question`, `comment`, `reply` or `profile`. Fields that do not apply to a type are `null`. The dataset has four views: all results, content, comments and replies, and creator profiles.

```json
{
    "type": "answer",
    "id": "2106711882195392168",
    "url": "https://www.zhihu.com/question/2105936986515171184/answer/2106711882195392168",
    "title": "为什么大家这么关注APEC会议？",
    "contentText": "G7这种覆盖面小，没有中+global south ...",
    "contentTruncated": false,
    "authorName": "张议潮",
    "authorUrl": "https://www.zhihu.com/people/wuqk-26",
    "voteupCount": 1374,
    "commentCount": 132,
    "favoriteCount": 76,
    "thanksCount": 84,
    "topics": ["经济", "APEC"],
    "ipLocation": "北京",
    "createdAt": "2026-11-19T03:34:13.000Z",
    "questionId": "2105936986515171184",
    "parentType": "question",
    "searchKeyword": null,
    "scrapedAt": "2026-11-19T08:10:00.000Z"
}
```

A comment row:

```json
{
    "type": "comment",
    "id": "11620914468",
    "contentText": "韩国饭圈的那种邪教崇拜做法绝对不能解禁 ...",
    "authorName": "换一个时空",
    "likeCount": 2,
    "replyCount": 3,
    "ipLocation": "福建",
    "createdAt": "2026-11-19T07:27:44.000Z",
    "parentType": "answer",
    "parentId": "2106711882195392168",
    "parentUrl": "https://www.zhihu.com/question/2105936986515171184/answer/2106711882195392168"
}
```

### How much does it cost to scrape Zhihu?

You pay a small start fee per run, one price per saved row whatever its type (answer, article, question, comment, reply or profile), and, for keyword search only, a fee per Google results page read to find Zhihu content. Each search page gives about nine Zhihu links. On the Starter (Bronze) plan:

| Event | Price |
|---|---|
| Start (once per run) | $0.002 |
| Result (one saved row) | $0.001 |
| Search page (keyword search only) | $0.014 |

Higher Apify plans pay less: Gold and above pay $0.0008 per result and $0.0112 per search page. Proxy and compute costs are included.

**Examples on Bronze:**

- 100 rows from answer, question and article URLs with their comments: $0.002 + 100 × $0.001 = **$0.102**.
- A keyword search giving 20 answers, questions and articles from 3 search pages: $0.002 + 20 × $0.001 + 3 × $0.014 = **$0.064**.
- A past-year, answers-only search giving 11 answers from 6 search pages (many indexed pages fall outside the period): $0.002 + 11 × $0.001 + 6 × $0.014 = **$0.097**.

A run that finds nothing is charged only the start fee and the search pages it read, and a run with invalid input is free. A past-day, week or month search can read several search pages and still find few recent posts, so try it with a low **Results per keyword** first.

Use **Maximum results** to cap the cost of a run. Comments and replies are often the bulk of a run, so keep **Comments per item** low when you only need the content.

### Use it through the API

Start a run and get the results from any language. Python example with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("automation-lab/zhihu-scraper").call(run_input={
    "keywords": ["新能源汽车"],
    "searchTimeRange": "year",
    "maxResultsPerKeyword": 20,
    "includeComments": True,
    "maxCommentsPerContent": 10,
    "maxItems": 200,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["type"], row["title"], row["voteupCount"])
```

Node.js example with the `apify-client` package:

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('automation-lab/zhihu-scraper').call({
    urls: ['https://www.zhihu.com/question/2105936986515171184'],
    includeComments: true,
    maxCommentsPerContent: 20,
    maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, items[0]);
```

cURL example that runs the Actor and returns the rows in one request:

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~zhihu-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["露营装备"], "maxResultsPerKeyword": 10, "maxItems": 50}'
```

The same works with the Apify CLI (`apify call automation-lab/zhihu-scraper`). You can also connect it to Make, Zapier, n8n, Google Sheets or a webhook from the **Integrations** tab.

### Use with MCP and AI agents

Add the Actor-scoped Apify MCP endpoint to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/zhihu-scraper"
```

For **Claude Desktop**, **Cursor**, or **VS Code**, add this MCP JSON configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/zhihu-scraper"
    }
  }
}
```

Example prompts:

- "Search Zhihu for 新能源汽车 answers from the past year and summarize what people complain about most."
- "Get the top 50 comments under this Zhihu answer and group them by sentiment."
- "Compare these three Zhihu creators by followers, answers and upvotes."

### Is it legal to scrape Zhihu?

The Actor collects only content that Zhihu shows publicly to visitors who are not logged in. It does not log in, bypass paywalls or collect private messages. Public posts can still contain personal data such as display names, so check that your use complies with the GDPR, China's Personal Information Protection Law (PIPL) and other rules that apply to you, and with Zhihu's terms. If in doubt, ask a lawyer. This Actor is not affiliated with or endorsed by Zhihu.

### Data handling

No AI models or external enrichment services are used. Keywords are sent to Google Search through Apify's Google SERP proxy to find Zhihu pages, and Zhihu pages are fetched through Apify residential proxy in Taiwan and Hong Kong. Failed operations also send sanitized diagnostic input, exceptions, and Actor/build/run IDs to our private GlitchTip service for repair; secret fields are removed and diagnostic reports are retained for 30 days. Apify hosts runtime, logs and the run's default dataset under your storage settings. The anonymous Zhihu cookie lives only for the run. Delete run storage in Console or through the Apify API when you no longer need it.

### Limits you should know

- **Keyword search uses Google's index of Zhihu.** Zhihu's own search only works for logged-in accounts, so keywords are matched through Google's index of zhihu.com. Every result is then read directly from Zhihu, so counts and text are current. Results are the pages Google has indexed, which can differ from Zhihu's in-app search, and a very new post may not appear yet. **Published within** keeps only answers and articles published in that period (a question counts when it was created or updated in it). Google indexes few fresh Zhihu pages, so a dated search can return fewer results than requested: a past-year search often returns most of them, and a past-day, week or month search can return few or none for a niche keyword. Search results that do not mention the keyword are skipped, and deleted posts are left out.
- **Long Zhuanlan articles are cut by Zhihu.** Zhihu shows visitors who are not logged in only the opening part of most Zhuanlan articles (about 500 to 1,000 characters). Those rows have `contentTruncated: true`. Answers come with their full text.
- **Question pages show a few answers.** A question URL returns the answers Zhihu shows publicly on the page (usually 3 to 5), not every answer. Paste answer URLs to get specific answers.
- **Creator article lists are not available.** Zhihu now requires a login for a creator's list of articles and answers. Profile URLs return the profile itself.
- **Private, deleted or login-only content** is skipped with a log message.

### FAQ

**Do I need a Zhihu account or cookies?** No. The Actor uses only public pages.

**Why are some runs slower than others?** Zhihu limits automated traffic, so the Actor uses Taiwan and Hong Kong residential connections and retries blocked requests on a fresh connection. A search of 20 results with comments usually takes 2 to 5 minutes.

**Can I monitor a keyword every week?** Yes. Save your input as a task and schedule it weekly. Because Google indexes new Zhihu pages with a delay, set **Published within** to **Past year** (or **Past month** for busy keywords), sort by **Newest**, and keep only `recordId` values you have not seen before.

**English keywords?** They work, but Zhihu is a Chinese-language site, so Chinese keywords find far more results.

### Support

Found a problem or need a field that is missing? Open an issue on the **Issues** tab with the input you used and the run link, and we will look at it.

### Related scrapers

- [Bilibili Scraper](https://apify.com/automation-lab/bilibili-scraper) for Bilibili videos and comments
- [Douyin Search Scraper](https://apify.com/automation-lab/douyin-search-scraper) for Douyin videos by keyword
- [Reddit Scraper](https://apify.com/automation-lab/reddit-scraper) for English-language community discussion

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/zhihu-scraper/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

Chinese or English words to search on Zhihu. Each keyword is searched on its own. Leave empty if you only paste URLs.

## `urls` (type: `array`):

Answer (zhihu.com/question/<id>/answer/<id>), question (zhihu.com/question/<id>), article (zhuanlan.zhihu.com/p/<id>) or creator profile (zhihu.com/people/<token>) URLs.

## `maxItems` (type: `integer`):

Most rows to save in the whole run, counting answers, articles, questions, comments, replies and profiles together. Each row is one charged result.

## `searchContentType` (type: `string`):

Which kind of Zhihu content keyword search returns.

## `sortBy` (type: `string`):

Relevance keeps search order. Most upvoted and Newest re-order the results found for each keyword.

## `searchTimeRange` (type: `string`):

Only return answers and articles published in this period (questions created or updated in it). Recent periods can return fewer results, because Google indexes few fresh Zhihu pages.

## `maxResultsPerKeyword` (type: `integer`):

Most answers, questions or articles to find for each keyword, before comments.

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

Also save the comments under each answer, article or question. Each comment is one row.

## `maxCommentsPerContent` (type: `integer`):

Most top-level comments to save for each answer, article or question.

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

Popular returns Zhihu's top comments first; Newest returns the latest first.

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

Also save replies under each saved comment. Each reply is one row linked to its comment by parentId.

## `maxRepliesPerComment` (type: `integer`):

Most replies to save for each comment.

## `includeQuestionAnswers` (type: `boolean`):

For each question, also save the answers Zhihu shows on its public page (usually 3 to 5).

## `includeHtml` (type: `boolean`):

Keep the original HTML of answers, articles and question details next to the plain text.

## `proxyConfiguration` (type: `object`):

Leave empty to use the built-in Zhihu route (Apify residential proxy in Taiwan and Hong Kong).

## Actor input object example

```json
{
  "keywords": [
    "露营装备"
  ],
  "maxItems": 20,
  "searchContentType": "all",
  "sortBy": "relevance",
  "searchTimeRange": "any",
  "maxResultsPerKeyword": 20,
  "includeComments": false,
  "maxCommentsPerContent": 20,
  "commentSort": "popular",
  "includeReplies": false,
  "maxRepliesPerComment": 10,
  "includeQuestionAnswers": true,
  "includeHtml": true
}
```

# Actor output Schema

## `overview` (type: `string`):

Every saved row with its type, title or text, author, upvotes, comments and URL.

## `content` (type: `string`):

Answer, article and question rows with engagement counts, topics and dates.

## `comments` (type: `string`):

Comment and reply rows linked to their answer, article, question or parent comment.

## `profiles` (type: `string`):

Creator profile rows with follower, answer and upvote counts.

# 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 = {
    "keywords": [
        "露营装备"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/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 = {
    "keywords": ["露营装备"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/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 '{
  "keywords": [
    "露营装备"
  ],
  "maxItems": 20
}' |
apify call automation-lab/zhihu-scraper --silent --output-dataset

```

## MCP server setup

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