# Zhihu Scraper — Posts, Pages, Comments, Hot List (`blueskyscraper/zhihu-scraper`) Actor

Scrape Zhihu (知乎): keyword search for answers, articles and videos with type, sort and date filters; full pages with comments and replies; author articles; and the 热榜 hot list with heat score. No login.

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

## Pricing

from $1.96 / 1,000 content rows

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

Scrape **Zhihu (知乎)**, China's largest Q\&A and long-form knowledge platform, in one actor:

- 🔎 **Keyword search** — answers, articles and videos for any Chinese or English keyword, with content-type, sort and **date** filters (last 24 h, week, month…)
- 📄 **Full pages** — the complete text of an answer, article or video page, plus its **comments** and **comment replies**
- 👤 **Author articles** — every article from a profile link, plus the profile's answer and article counts
- 🔥 **Hot list (热榜)** — the 30 trending questions with **heat score** (e.g. 1095 万热度 → 10,950,000), answer, comment and follower counts

No login, no cookies, no browser setup. Export to JSON, CSV, Excel or straight into your pipeline via the Apify API.

### Who uses it

- **China market research** — what Chinese consumers and professionals say about a brand, product or industry (新能源汽车, 光伏, AI…)
- **Trend monitoring** — daily snapshot of the Zhihu hot list next to Weibo, Douyin and Baidu
- **Social listening & sentiment** — comments and replies under the pages that matter to you
- **Content and KOL research** — an author's full article history with likes, comments and favourites
- **AI / LLM datasets** — long-form Chinese text with clean metadata and provenance

### Modes

| Mode | What you get | Rows | Price per row |
|---|---|---|---|
| `search` | answers, articles, videos by keyword; type, sort and date filters | 20–100 per keyword | $0.0028 |
| `hot` | 热榜 hot list with heat score, answer, comment and follower counts | up to 30 | $0.0008 |
| `content` | full page (complete text) and, optionally, comments and replies | 1 + up to 100 comments | $0.0028 page, $0.0004 comment |
| `user` | profile counters and the author's articles | 1 + up to 100 | $0.001 profile, $0.0028 article |
| `all` | everything above in one run | — | — |

Plus **$0.009 per run start**. Prices shown are for the FREE plan; paid Apify plans get 10–30% off (BRONZE −10%, SILVER −20%, GOLD −30%).
**1,000 search results ≈ $2.80.** Empty answers from Zhihu are never charged.

### Input examples

Search by keyword, articles only, most upvoted first:

```json
{
  "mode": "search",
  "keywords": ["新能源汽车", "光伏"],
  "contentType": "article",
  "sort": "upvote_count_descending",
  "postedWithin": "year",
  "limitPerQuery": 50
}
```

A page with its comments and replies:

```json
{
  "mode": "content",
  "contentUrls": ["https://zhuanlan.zhihu.com/p/714800391"],
  "includeComments": true,
  "includeCommentReplies": true
}
```

An author's articles:

```json
{ "mode": "user", "userUrls": ["https://www.zhihu.com/people/jaliou"] }
```

Today's hot list:

```json
{ "mode": "hot" }
```

### Output example

```json
{
  "type": "zhihu-content",
  "id": "714800391",
  "contentType": "article",
  "title": "硬核干货！2026年最新新能源汽车行业411篇顶级报告，吐血整理！…",
  "excerpt": "包括小米汽车、理想汽车、比亚迪、蔚来、零跑汽车、长城汽车、特斯拉、华为汽车…",
  "fullText": null,
  "url": "https://zhuanlan.zhihu.com/p/714800391",
  "likeCount": 231,
  "commentCount": 11,
  "collectCount": 0,
  "postedAt": "2024-08-16T02:03:48+00:00",
  "coverImageUrl": null,
  "author": {
    "id": "61a5c0552f567bdaca1a4125d85b4c76",
    "name": "小狮子",
    "url": "https://www.zhihu.com/people/jaliou",
    "followerCount": 4979,
    "verified": false
  },
  "keyword": "新能源汽车",
  "foundVia": "search",
  "scrapedAt": "2026-11-08T12:52:11.659Z"
}
```

Every row has a `type` field:

- `zhihu-content` — `id, contentType, title, excerpt, fullText, url, likeCount, commentCount, collectCount, postedAt, coverImageUrl, author{…}, keyword, foundVia, provenance`
- `zhihu-hot` — `rank, id, title, url, excerpt, questionType, answerCount, commentCount, followerCount, heat, heatText, createdAt, thumbnailUrl`
- `zhihu-comment` — `id, text, likeCount, replyCount, parentCommentId, author{…}, contentUrl`
- `zhihu-profile` — `url, username, answerCount, articleCount, availableFields`
- `notice` / `error` — free service rows explaining what was skipped and why; filter them out with `type != "notice"`

`fullText` is filled in `content` mode; search and author rows carry the `excerpt`.
Each row also has a `provenance` block (source, canonical URL, collected-at time, checksum) for audit trails.

### Good to know

- **Zhihu search is flaky by nature**: the first answer is often empty. The actor retries on its own (`retries`, default 8, about 2 s each) — empty answers cost nothing. If search stays empty, an optional `site:zhihu.com` web search fallback returns title, link and snippet rows marked `foundVia: web-fallback`.
- **Hot list heat** is Zhihu's own 热度 figure converted to a number: `heatText` keeps the original (`1095 万热度`), `heat` holds `10950000`.
- **Posted within** filters by publication date on our side (Zhihu search has no date filter). Dropped rows are not charged; combine with **Newest first** for the freshest results.
- **Question pages are not supported** in `content` mode: Zhihu closes the answer list of a question. Use links to individual answers (`/question/<id>/answer/<id>`), articles or videos. Unsupported links are skipped with a free `notice` row.
- **Profiles** return only the answer and article counts (`availableFields` says so); the author's articles come in full.
- **Max cost per run** is respected: rows beyond your limit are not written and not charged.
- A run never fails because of the input: missing or wrong input gives a free `notice` row, and if nothing at all can be collected, you get the hot list.
- At the end of each run a free summary row and a `SUMMARY` record in the key-value store show what was delivered and charged.

### FAQ

**Do I need a Zhihu account or cookies?** No.

**Can I search in English?** Yes, but Zhihu content is Chinese — Chinese keywords give far more results.

**How fresh is the data?** Everything is fetched live at run time. Schedule the actor (e.g. hourly hot list) to build a time series.

**Is scraping Zhihu legal?** The actor collects only publicly visible data. Make sure your use complies with applicable laws and Zhihu's terms, especially for personal data.

### Related

- Need only trending lists across platforms? **China Hot Lists Scraper** (`apimy/china-hot-lists-scraper`) puts the Baidu, Zhihu, Weibo, Douyin and Bilibili hot lists into one dataset.
- More Chinese platforms from the same author: **Bilibili Scraper**, **Douyin**, **RedNote (Xiaohongshu)** and **Weibo** scrapers.

# Actor input Schema

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

What to collect. Search: content by keyword. Hot list: the 热榜 hot list (up to 30 rows). Pages: full answer, article or video with comments. Author: articles from a profile link. Everything: all modes at once, each using its own field. If the chosen mode has no input, the run returns the hot list instead of failing.

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

Keywords in Chinese or English, e.g. 新能源汽车 or 光伏. Each keyword is a separate search. Zhihu search often answers empty on the first try (empty answers are not charged), so the actor retries on its own.

## `contentUrls` (type: `array`):

Links to a Zhihu answer, article or video: https://zhuanlan.zhihu.com/p/123456 or https://www.zhihu.com/question/1/answer/2. A bare article number works too. Question pages without /answer/ are not supported and are skipped with a note.

## `userUrls` (type: `array`):

Links to a person's profile: https://www.zhihu.com/people/<id>, or just the <id> from the address. A display name will not work.

## `contentType` (type: `string`):

Content type filter for search. All returns answers, articles and videos mixed.

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

Search result order: Zhihu's own ranking, newest first, or most upvoted.

## `postedWithin` (type: `string`):

Keep only search results and author articles published within this window. Older rows are dropped and not charged. Combine with "Newest first" for the freshest results.

## `limitPerQuery` (type: `integer`):

How many rows to take per keyword (and per profile in Author mode). Zhihu returns 20–100; asking for 100 usually gives about 90.

## `hotLimit` (type: `integer`):

How many hot list rows to take. Zhihu publishes exactly 30.

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

Also export the comments under each page (charged separately, cheaper than content rows).

## `includeCommentReplies` (type: `boolean`):

Also export replies to comments. Each comment with replies is one more source call, so large threads take longer.

## `commentsPerPage` (type: `integer`):

How many comments to take from one page.

## `webFallback` (type: `boolean`):

If Zhihu search stays empty after all attempts, return rows from a site:zhihu.com web search instead. These rows are poorer (title, link and snippet only) and are marked foundVia: web-fallback. Same price as a normal row.

## `retries` (type: `integer`):

How many times to retry an empty answer from Zhihu search before giving up. Empty answers are not charged — retries cost only time, about 2 seconds each.

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

Upper limit of rows in the dataset — protection against an unexpectedly large bill.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "新能源汽车"
  ],
  "contentType": "all",
  "sort": "general",
  "postedWithin": "all",
  "limitPerQuery": 50,
  "hotLimit": 30,
  "includeComments": false,
  "includeCommentReplies": false,
  "commentsPerPage": 50,
  "webFallback": true,
  "retries": 8,
  "maxItems": 500
}
```

# Actor output Schema

## `dataset` (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 = {
    "keywords": [
        "新能源汽车"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("blueskyscraper/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": ["新能源汽车"] }

# Run the Actor and wait for it to finish
run = client.actor("blueskyscraper/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": [
    "新能源汽车"
  ]
}' |
apify call blueskyscraper/zhihu-scraper --silent --output-dataset

```

## MCP server setup

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