# Zhihu Questions and Answers Scraper (`automation-lab/zhihu-questions-answers-scraper`) Actor

Extract public Zhihu questions and visible answers with authors, full text, engagement counts, and timestamps from exact URLs or the current hot list.

- **URL**: https://apify.com/automation-lab/zhihu-questions-answers-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Zhihu Questions and Answers Scraper

Extract public Zhihu question and answer records as structured JSON, CSV, or Excel. The Actor accepts known question URLs or discovers current questions from Zhihu's hot list, then returns visible answer text, authors, engagement counts, and timestamps. It is useful for Chinese-language expert research, including focused zhihu stock investigations where researchers already know the relevant question threads.

No Zhihu account, browser, or API key is required for the supported public workflow.

### What does this Zhihu scraper collect?

Each dataset row represents one visible answer and repeats its parent-question context. That makes the output easy to filter, group, join, or send directly to an analysis pipeline.

The Actor collects:

- question ID, canonical URL, title, excerpt, and detail HTML;
- reported question answer, follower, view, and comment counts;
- question creation and update timestamps;
- answer ID, canonical URL, excerpt, plain text, and source HTML;
- answer upvotes, comments, thanks, and favorites when Zhihu exposes them;
- answer creation and update timestamps;
- public author ID, name, profile URL, headline, follower count, and account type;
- source URL and extraction timestamp.

The Actor does not collect private profiles, private questions, login-only data, or comments.

### Who is it for?

**Market researchers** can collect expert opinions and engagement signals from selected Chinese Q\&A threads.

**Brand and investment analysts** can revisit known Zhihu questions about companies, products, or sectors and compare the visible answers over time.

**Academic and policy researchers** can preserve public question context, long-form answers, authorship, and source timestamps in a repeatable format.

**Data and AI teams** can feed normalized answer text into translation, topic modeling, RAG, sentiment, or qualitative coding workflows.

**Monitoring teams** can schedule the same URL set and compare answer IDs and engagement metrics between runs.

### Why use this Actor?

- **Answer-first output:** one integration-friendly row per answer, not a mixed bag of articles and profiles.
- **Full visible content:** both plain text and source HTML are returned.
- **Question context included:** every answer row remains understandable after export.
- **Two input routes:** process exact question URLs or start from the current hot list.
- **Low overhead:** direct HTTP and 256 MB memory; no browser is started.
- **Bounded runs:** separate limits control questions, answers per question, and total output.
- **Fail-closed behavior:** blocked, deleted, private, or answerless pages are not reported as successful empty data.

For Zhihu articles rather than Q\&A threads, use the [Zhihu Article Scraper](https://apify.com/automation-lab/zhihu-article-scraper).

### Input

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `startUrls` | array | empty | Public `https://www.zhihu.com/question/{id}` URLs. |
| `includeHotList` | boolean | `true` | Adds current hot-list question URLs before extraction. |
| `maxQuestions` | integer | `10` | Maximum pages processed, from 1 to 50. |
| `maxAnswersPerQuestion` | integer | `5` | Maximum visible embedded answers saved per question, from 1 to 20. |
| `maxItems` | integer | `20` | Global answer-row limit, from 1 to 1,000. |
| `proxyConfiguration` | object | direct connection | Optional Apify or custom proxy routing. |

Provide at least one `startUrls` item or set `includeHotList` to `true`.

#### Extract one known question

```json
{
  "startUrls": [
    { "url": "https://www.zhihu.com/question/2067235011804320517" }
  ],
  "maxQuestions": 1,
  "maxAnswersPerQuestion": 3,
  "maxItems": 3
}
```

#### Discover current hot questions

```json
{
  "includeHotList": true,
  "maxQuestions": 3,
  "maxAnswersPerQuestion": 2,
  "maxItems": 6
}
```

#### Monitor a fixed research set

```json
{
  "startUrls": [
    { "url": "https://www.zhihu.com/question/2067235011804320517" },
    { "url": "https://www.zhihu.com/question/2063895390546563948" }
  ],
  "maxQuestions": 2,
  "maxAnswersPerQuestion": 5,
  "maxItems": 10
}
```

### Output

Results are saved to the default Apify dataset. A representative shortened row looks like this:

```json
{
  "recordType": "answer",
  "questionId": "2066576404393583263",
  "questionUrl": "https://www.zhihu.com/question/2066576404393583263",
  "questionTitle": "哪些信息值得关注？",
  "questionExcerpt": "公开问题背景摘要。",
  "questionAnswerCount": 190,
  "questionFollowerCount": 899,
  "questionViewCount": 1204608,
  "answerId": "2066919777130616387",
  "answerUrl": "https://www.zhihu.com/question/2066576404393583263/answer/2066919777130616387",
  "answerExcerpt": "公开回答摘要。",
  "answerContentText": "这是可公开查看的回答正文。",
  "answerVoteupCount": 42,
  "answerCommentCount": 3,
  "answerCreatedAt": "2026-08-01T10:14:36.000Z",
  "authorName": "Sample Author",
  "authorUrl": "https://www.zhihu.com/people/sample-author",
  "authorFollowerCount": 1250,
  "sourceUrl": "https://www.zhihu.com/question/2066576404393583263",
  "scrapedAt": "2026-08-01T12:00:00.000Z"
}
```

Fields can be `null` when Zhihu does not expose a value. The complete schema is available in the Actor's **Output** tab.

### Getting started

1. Open the Actor in Apify Console.
2. Keep current hot-list discovery enabled, or paste your own public Zhihu question URLs.
3. Choose how many questions and visible answers to save.
4. Disable hot-list discovery if you only want the supplied URLs.
5. Click **Start**.
6. Open the **Dataset** tab to preview the rows.
7. Export as JSON, CSV, Excel, XML, or RSS, or connect the dataset API to your pipeline.

Start with a small limit. Once the output matches your research question, increase `maxQuestions` or schedule the run.

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

The Actor uses pay-per-event pricing:

- **Actor start:** $0.005 per run.
- **Answer:** tiered price per saved answer. The BRONZE tier is $0.0032 per answer; higher-volume platform tiers are lower.

At the BRONZE tier:

| Saved answers | BRONZE calculation | Estimated Actor charge |
| ---: | ---: | ---: |
| 5 | `0.005 + (5 × 0.0032)` | 0.021 USD |
| 25 | `0.005 + (25 × 0.0032)` | 0.085 USD |
| 100 | `0.005 + (100 × 0.0032)` | 0.325 USD |

You are not charged an answer event for rejected pages, duplicate URLs, retries, or answers beyond your limits. Apify platform usage and optional proxy traffic can vary by account and routing configuration.

### Scheduling recurring Zhihu research

A schedule turns a fixed URL set into a repeatable monitoring workflow:

1. Save the Actor input as a Task.
2. Add the relevant question URLs.
3. Set a daily, weekly, or monthly schedule.
4. Use `answerId` as the stable record key.
5. Compare `answerVoteupCount`, `answerCommentCount`, and `scrapedAt` across runs.
6. Send the dataset to your warehouse, spreadsheet, webhook, or automation platform.

The Actor emits a fresh dataset on every run. It does not silently merge historical rows or claim that an answer changed; your downstream workflow controls comparison rules.

### Working with Chinese-language content

Zhihu content is normally returned in its original language. The Actor does not translate, summarize, classify, or infer sentiment. This preserves the source text for your chosen analysis method.

Useful downstream patterns include:

- translate `answerContentText` with your preferred model or translation API;
- group answers by `questionId`;
- rank authors by `answerVoteupCount` or `authorFollowerCount`;
- preserve `answerContentHtml` when links and formatting matter;
- use `answerContentText` for embeddings, keyword analysis, or qualitative coding;
- compare reported engagement with the extraction timestamp.

### API usage with cURL

Replace `YOUR_APIFY_TOKEN` with an Apify API token:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~zhihu-questions-answers-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [{"url":"https://www.zhihu.com/question/2067235011804320517"}],
    "maxAnswersPerQuestion": 3,
    "maxItems": 3
  }'
```

Use `run-sync-get-dataset-items` when a small synchronous response is more convenient:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~zhihu-questions-answers-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"includeHotList":true,"maxQuestions":1,"maxItems":2}'
```

### API usage with JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/zhihu-questions-answers-scraper').call({
    startUrls: [{ url: 'https://www.zhihu.com/question/2067235011804320517' }],
    maxAnswersPerQuestion: 3,
    maxItems: 3,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### API usage with Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("automation-lab/zhihu-questions-answers-scraper").call(run_input={
    "includeHotList": True,
    "maxQuestions": 2,
    "maxAnswersPerQuestion": 2,
    "maxItems": 4,
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

### Use with Apify MCP

Add this Actor to Claude Code:

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

For **Claude Desktop**, **Cursor**, and **VS Code**, add this HTTP server in the client's MCP settings:

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

Example prompts:

- “Extract the visible answers and engagement metrics from these three Zhihu question URLs.”
- “Get two current Zhihu hot-list questions and their first two visible answers.”
- “Return the authors and plain-text answers as JSON for my research pipeline.”

### Integrations

The default dataset works with Apify webhooks and integrations such as Make, Zapier, Google Sheets, Airbyte, and Keboola.

Common workflows:

- trigger a translation or summarization step after a run succeeds;
- append answer rows to a warehouse table keyed by `answerId` and `scrapedAt`;
- notify a research team when a new answer ID appears;
- export a one-time question thread to Excel for manual coding;
- build an author shortlist from high-engagement answers;
- feed answer text into a controlled RAG index with source URLs preserved.

### Limits and source behavior

Zhihu changes its public delivery surfaces and anti-automation controls. The Actor currently uses the source's public embedded question state, which exposes a bounded set of visible answers rather than complete pagination.

Important limits:

- only current public question URLs with visible embedded answers are supported;
- old, deleted, private, login-only, or answerless questions can fail;
- `maxAnswersPerQuestion` cannot create answers that Zhihu does not embed;
- keyword search is not supported; use known URLs or current hot-list discovery;
- hot-list membership changes continuously;
- counts are source-reported snapshots and can change after extraction;
- proxy routing can help regional connectivity but does not guarantee that a private or blocked page becomes public.

If every requested question fails, the Actor fails instead of returning a misleading successful empty dataset.

### Troubleshooting

#### “The page did not contain a public question entity”

Open the URL in a private browser window. Confirm that it is a numeric Zhihu question URL and currently visible without login. Replace old or deleted examples with a current public question.

#### “The page did not contain public answer entities”

The question can exist while exposing no answers in public embedded state. Try another current question, enable hot-list discovery, or rerun later.

#### HTTP 403 or 429

Keep concurrency and limits small. Retry later or configure Apify Proxy if your region is blocked. Do not assume residential proxy traffic is necessary: direct HTTP is the tested default.

#### Fewer answers than requested

`maxAnswersPerQuestion` is a ceiling. Zhihu can expose fewer embedded answers than the requested limit, even when its reported total answer count is larger.

### Responsible use and legality

This Actor accesses data visible on public Zhihu question pages. Web scraping laws and contractual rules vary by jurisdiction and purpose. You are responsible for checking Zhihu's terms, applicable law, and your lawful basis before collecting or processing data.

Do not use the Actor to:

- attempt to access private or login-only content;
- profile, harass, discriminate against, or deanonymize people;
- collect more personal data than your research purpose requires;
- republish copyrighted answer text without permission;
- bypass technical controls in a way prohibited by applicable rules.

Minimize retention, protect exports, preserve source attribution, and honor valid deletion or access requests where required.

### Related Actor

- [Zhihu Article Scraper](https://apify.com/automation-lab/zhihu-article-scraper) — extract full public Zhuanlan article content, Markdown, authors, topics, timestamps, images, and engagement fields. Choose it when the source entity is an article rather than a Q\&A thread.

### FAQ

#### Does it require a Zhihu login?

No for the supported public workflow. The Actor does not accept or store Zhihu credentials.

#### Can it search Zhihu by keyword?

No. Anonymous keyword search is not part of the supported product. Supply known question URLs or use current hot-list discovery.

#### Does it extract every answer in a question?

No. It extracts the bounded answer set exposed in the public embedded page state. The reported `questionAnswerCount` can be higher than the number of returned rows.

#### Can I monitor answers over time?

Yes. Save a fixed set of question URLs as an Apify Task, schedule it, and compare stable `answerId` values and engagement counts across datasets.

#### Are question and answer records charged separately?

No. Each saved dataset row is one answer event and already includes its parent-question fields. There is no separate question event.

#### Can I export to CSV or Excel?

Yes. Use the dataset export controls in Apify Console or the dataset API.

#### What happens when one URL fails?

The Actor retries it up to three times and continues with other URLs. The run fails only when it cannot extract any useful answer records.

# Actor input Schema

## `startUrls` (type: `array`):

Public question URLs in the form https://www.zhihu.com/question/{numeric-id}.

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

Discover current Zhihu hot-list questions and extract their visible embedded answers.

## `maxQuestions` (type: `integer`):

Maximum number of question pages to process, including explicit URLs and hot-list discoveries.

## `maxAnswersPerQuestion` (type: `integer`):

Maximum visible embedded answers saved from each question page. Zhihu currently exposes a bounded first page.

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

Global maximum number of answer records saved to the dataset.

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

Optional Apify Proxy or custom proxy configuration for regional blocks. Direct requests are used when omitted.

## Actor input object example

```json
{
  "startUrls": [],
  "includeHotList": true,
  "maxQuestions": 10,
  "maxAnswersPerQuestion": 5,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

All extracted answer records in the default dataset.

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

Table view of the most useful answer fields.

# 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 = {
    "startUrls": [],
    "includeHotList": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/zhihu-questions-answers-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 = {
    "startUrls": [],
    "includeHotList": True,
}

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

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [],
  "includeHotList": true
}' |
apify call automation-lab/zhihu-questions-answers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/zhihu-questions-answers-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vjBmjOnBvFEpdazZK/builds/7cqdehIdcaCaYi6ol/openapi.json
