# Zhihu Scraper & API | EveryInfra (`blushing_parachute/everyinfra-zhihu-api`) Actor

Unofficial Zhihu data via one Actor: search, content_detail, content_comments, comment_replies, profile, user_articles, hot_list, question_answers, user_answers, user_pins, user_search, column_search and 3 more. Pay per request, no start fee. First 3 requests free across EveryInfra Actors.

- **URL**: https://apify.com/blushing_parachute/everyinfra-zhihu-api.md
- **Developed by:** [ECHO](https://apify.com/blushing_parachute) (community)
- **Categories:** Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 4 total users, 1 monthly users, 51.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.10 / 1,000 search requests

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 & API | EveryInfra

Search Zhihu content, users, columns, topics, ebooks, Salt paid content and academic papers, retrieve details, comments and replies, explore creator profiles, articles, answers and pins, read the hot list, and list the answers under a question.

Use the content URL of a specific article or answer. A question-page URL is not an article or answer URL; it belongs in `question_answers`.

### Actions

| Action | What you get | Required | Optional | Results per request | Price per request |
|---|---|---|---|---|---|
| `search` | Find what Zhihu users write about a topic, up to 100 per call. Results include answers, articles and videos with upvotes, comments, favorites and author credentials. Narrow with `content_type`, and order with `sort` by relevance, most upvoted or newest. `type` tells the kind of each row. | keyword | content_type, sort | 20 (up to 100) | $0.0401 |
| `content_detail` | Read one Zhihu answer, article or video from its link. Get title, text, upvote, comment and favorite counts, publish time and author details. Question pages are not supported, and comments are not included. | url | — | 1 | $0.0021 |
| `content_comments` | Collect top-level comments on a Zhihu answer, article or video, up to 100 per call. Get text, likes, reply count, time and commenter. A non-zero `reply_count` means replies exist, and `comment_replies` lists them. The thread may not be complete. | url | — | 20 (up to 100) | $0.0081 |
| `comment_replies` | List the replies under one Zhihu comment, up to 100 per call, with text, likes, reply count, time and replier. Pass the content link plus a `comment_id` from a comments row whose reply count is above zero. | url, comment_id | — | 20 (up to 100) | $0.0033 |
| `profile` | Look up a Zhihu author from a zhihu.com/people/ link and get bio, followers, verification label, answer and article totals and upvotes received. Content links do not work here, and the verification label does not vouch for identity. | url | — | 1 | $0.0021 |
| `user_articles` | Gather a Zhihu author's published pieces from their profile link, up to 100 per call, with type, title, full text, likes, comments, favorites and date. Rows share the shape of search results, and one batch may not cover the author's full archive. | url | — | 20 (up to 100) | $0.0061 |
| `hot_list` | Take Zhihu's hot list in one call, up to 30 questions. Each has rank, title, excerpt, heat value as a whole number, answer count, number of followers, comment count and cover image. Heat compares only within the list. Pass a question's link to `question_answers` to read its answers. | — | — | 30 (up to 30) | $0.0108 |
| `question_answers` | Read the answers under one Zhihu question from its link, an answer link or the question ID, up to 20 per call, 20 by default. Each answer has full text, upvotes, comments, saves, thanks, publish and edit times, and the author's name, bio, followers and verification. Sort by Zhihu's default order or by most recently updated. Only the first page is available. | url | sort | 20 (up to 20) | $0.0512 |
| `user_answers` | Page through the answers a Zhihu user wrote, newest first, 20 per page, from a profile link or profile ID. Each answer has the question it answers, full text, upvotes, comments, publish and edit times. Find the profile ID with `user_search`. | url | page_token | all the source returns | $0.0021 |
| `user_pins` | Page through a Zhihu user's pins (short posts), newest first, 20 per page. Each pin has its text, images, likes, comments, reposts, saves and publish time. | url | page_token | all the source returns | $0.0021 |
| `user_search` | Find Zhihu users by nickname or keyword, 20 per page, with profile ID, bio, followers, answer and article totals, upvotes received and recognition label. The profile ID works in `profile`, `user_answers` and `user_pins`. | keyword | page_token | all the source returns | $0.0021 |
| `column_search` | Find Zhihu columns on a topic, 20 per page, with title, description, followers, upvotes, article count and author. | keyword | page_token | all the source returns | $0.0021 |
| `scholar_search` | Search Chinese journal papers on Zhihu's academic channel by keyword, with title, abstract opening, authors, keywords, journal, year, volume and issue. | keyword | page_token | all the source returns | $0.0021 |
| `salt_search` | Search Zhihu Salt (paid) content by keyword, 20 per page, with title, free opening, column, cover, date and upvotes; the paid body is not included. | keyword | page_token | all the source returns | $0.0021 |
| `pin_comments` | Read the comments on one Zhihu pin from its link or ID, up to 100 per call, with text, likes, reply count, time and commenter. | url | — | 20 (up to 100) | $0.0321 |

### Input

Pick an `action` and fill the fields it uses. Example:

```json
{
  "action": "search",
  "keyword": "\u5982\u4f55\u5b66\u4e60\u6444\u5f71"
}
```

Fields that another action needs are ignored when left empty. API users can also pass `{"action": ..., "params": {...}}`.

### Output

Each result is one dataset row. Rows keep every field the source page exposes for that action; a field the platform hides or leaves empty for a record is omitted rather than filled with a placeholder. When there is a next page, the run's `OUTPUT` record holds `next_page_token`.

- `search`: `id`, `type`, `url`, `title`, `text`, `like_count`, `comment_count`, `collect_count`, `posted_at`, `cover_image_url`, `platform`, `author_id`, `author_name`, `author_url`, `author_avatar_url`, `author_bio`, `author_follower_count`, `author_verified`, `author_verification_label`
- `content_detail`: `id`, `type`, `url`, `title`, `text`, `like_count`, `comment_count`, `collect_count`, `posted_at`, `platform`, `author_id`, `author_name`, `author_url`, `author_avatar_url`, `author_bio`, `author_follower_count`, `author_verified`, `author_verification_label`
- `content_comments`: `id`, `text`, `like_count`, `posted_at`, `reply_count`, `author_id`, `author_name`, `author_avatar_url`, `platform`
- `comment_replies`: `id`, `text`, `like_count`, `posted_at`, `reply_count`, `author_id`, `author_name`, `author_avatar_url`, `platform`
- `profile`: `author_id`, `author_name`, `author_url`, `author_avatar_url`, `author_bio`, `author_follower_count`, `author_verified`, `author_verification_label`, `answer_count`, `article_count`, `received_upvote_count`, `platform`
- `user_articles`: `id`, `type`, `url`, `title`, `text`, `like_count`, `comment_count`, `collect_count`, `posted_at`, `cover_image_url`, `platform`, `author_id`, `author_name`, `author_url`, `author_avatar_url`, `author_bio`, `author_follower_count`, `author_verified`, `author_verification_label`
- `hot_list`: `rank`, `id`, `type`, `title`, `text`, `url`, `hot_value`, `answer_count`, `follower_count`, `comment_count`, `posted_at`, `cover_image_url`, `platform`
- `question_answers`: `id`, `type`, `url`, `question_id`, `title`, `text`, `like_count`, `comment_count`, `collect_count`, `thanks_count`, `posted_at`, `updated_at`, `author_id`, `author_name`, `author_url`, `author_avatar_url`, `author_bio`, `author_follower_count`, `author_verification_label`, `platform`
- `user_answers`: `id`, `type`, `url`, `question_id`, `title`, `text`, `like_count`, `comment_count`, `posted_at`, `updated_at`, `author_id`, `author_name`, `author_url`, `author_avatar_url`, `author_bio`, `author_verification_label`, `platform`
- `user_pins`: `id`, `type`, `url`, `text`, `image_urls`, `like_count`, `comment_count`, `repost_count`, `collect_count`, `posted_at`, `author_id`, `author_name`, `author_url`, `author_avatar_url`, `author_follower_count`, `platform`
- `user_search`: `user_id`, `username`, `display_name`, `url`, `bio`, `avatar_url`, `gender`, `follower_count`, `answer_count`, `article_count`, `received_upvote_count`, `verification_label`, `platform`
- `column_search`: `id`, `type`, `url`, `title`, `text`, `cover_image_url`, `follower_count`, `like_count`, `article_count`, `author_id`, `author_name`, `author_url`, `platform`
- `scholar_search`: `id`, `type`, `url`, `title`, `text`, `author_names`, `keywords`, `journal`, `year`, `volume`, `issue`, `next_page_token`, `platform`
- `salt_search`: `id`, `type`, `url`, `title`, `text`, `column_title`, `cover_image_url`, `posted_at`, `like_count`, `comment_count`, `platform`
- `pin_comments`: `id`, `text`, `like_count`, `posted_at`, `reply_count`, `author_id`, `author_name`, `author_avatar_url`, `platform`

#### Field notes

- `cover_image_url`: Cover image URL.
- `author_avatar_url`: Author avatar URL; on comment results, the commenter's avatar.
- `author_bio`: Author bio as written on Zhihu.
- `author_verified`: Whether the author is verified.
- `author_verification_label`: Verification description of the author, such as a profession or institution.
- `rank`: Hot-list position from 1 (hot_list), in Zhihu's order.
- `hot_value`: Heat shown on the hot list (hot_list), converted from text such as 5.97 million heat to the whole number 5970000; compare it only within the list.
- `answer_count`: Answer count: on profile, the answers the author has written; on hot_list, the answers under the question.
- `follower_count`: Followers: on hot_list, people following the question; on user_search, the user's followers; on column_search, people following the column; on topic_search, people following the topic.
- `username`: Zhihu profile ID (user_search), the part after zhihu.com/people/; pass it as `url` to profile, user_answers or user_pins.
- `gender`: Gender (user_search): male or female; absent when the user does not show it.
- `verification_label`: Recognition Zhihu shows for the account (user_search), such as an excellent-answerer badge or an organisation verification; absent when there is none.
- `repost_count`: Times the pin was reposted (user_pins).
- `image_urls`: Images in the pin (user_pins); absent for text-only pins.
- `column_title`: Name of the paid column or story collection the Salt item belongs to (salt_search).
- `author_names`: Paper authors in byline order (scholar_search).
- `keywords`: Paper keywords (scholar_search).
- `journal`: Journal that published the paper (scholar_search).
- `year`: Publication year of the paper (scholar_search).
- `volume`: Journal volume (scholar_search); absent for journals without volumes.
- `issue`: Journal issue (scholar_search).
- `question_id`: ID of the question the answer belongs to (question_answers), the same as the requested question.
- `thanks_count`: Thanks the answer has received (question_answers).
- `updated_at`: When the answer was last edited (question_answers), ISO 8601 in UTC; the same as posted_at when never edited.
- `question_count`: Number of questions under the topic (topic_search).
- `visit_count`: Views of the topic (topic_search).
- `article_count`: Number of articles. For profile and user_search, it is the total articles of the account; for column_search, it is the number of articles in the column.
- `can_reply`: Whether commenting is allowed (article_comment_config), as shown to visitors who are not logged in.
- `can_segment_reply`: Whether commenting on a segment of the article is allowed (article_comment_config).
- `input_placeholder`: Placeholder text in the comment box (article_comment_config).
- `is_anonymous`: Whether the comment box is in anonymous mode (article_comment_config).
- `keyword`: Search box term. In search_suggest, it is a suggested term for the input term; in search_presets, it is a preset term rotating in the search box; in search_discover, it is a term in the "search discover" section of the search page.
- `label`: Corner badge Zhihu puts on this term (search_presets, search_discover), such as hot or new. The field is absent when there is no badge.
- `picture_max_count`: Maximum number of images a comment can include (article_comment_config).
- `received_upvote_count`: Total upvotes received (profile, user_search).
- `topics`: Topic names of the question (question_detail), in the order Zhihu gives them.
- `duration_sec`: Length of the pin's video in seconds, the same value as duration_seconds (both names are returned) (pin_detail); present only for pins with a video.
- `next_page_token`: Page token (scholar_search): pass it back unchanged as page_token on the next request to get the next page; every row of a page carries the same value. Page size varies (usually about 10 papers); the last page has no such field.

### Pricing

Pay per event, charged only when a run delivers data:

- `search`: $0.0401, one event per started block of 20 results.
- `content_detail`: $0.0021, one event per non-empty request, whatever the row count.
- `content_comments`: $0.0081, one event per started block of 20 results.
- `comment_replies`: $0.0033, one event per started block of 20 results.
- `profile`: $0.0021, one event per non-empty request, whatever the row count.
- `user_articles`: $0.0061, one event per started block of 20 results.
- `hot_list`: $0.0108, one event per non-empty request, whatever the row count.
- `question_answers`: $0.0512, one event per non-empty request, whatever the row count.
- `user_answers`: $0.0021, one event per non-empty request, whatever the row count.
- `user_pins`: $0.0021, one event per non-empty request, whatever the row count.
- `user_search`: $0.0021, one event per non-empty request, whatever the row count.
- `column_search`: $0.0021, one event per non-empty request, whatever the row count.
- `scholar_search`: $0.0021, one event per non-empty request, whatever the row count.
- `salt_search`: $0.0021, one event per non-empty request, whatever the row count.
- `pin_comments`: $0.0321, one event per started block of 20 results.

Empty or failed requests are never charged. There is no actor-start fee and no per-row fee, and platform usage is included in these prices.

### Free trial

The first 3 accepted data requests per Apify account are free across all EveryInfra Actors combined (a lifetime total, not per Actor and not reset). Invalid input does not use a trial; an accepted request that returns no data still does. After that a paid Apify plan is required.

### Notes

- Results reflect what is publicly visible when the run happens; counts can be lower than requested.
- One run makes one request. For more pages, start another run with `page_token` where the action supports it.
- This is an independent Actor. It is not affiliated with, sponsored by, or endorsed by Zhihu or its owner; names and trademarks belong to their respective owners.

### Support

Open an issue on this Actor's Issues tab with the run ID.

# Actor input Schema

## `action` (type: `string`):

What to fetch. Each action uses only the fields listed for it below; other fields are ignored when empty.

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

Used by `search` (required), `user_search` (required), `column_search` (required), `scholar_search` (required), `salt_search` (required). The content search term for the Zhihu search action. Do not pass content URLs, author handles, or profile links to this parameter.

## `content_type` (type: `string`):

Used by `search`. Filters the content type for the search action. Allowed values are all (default), answer, article, and video. This parameter narrows matching content and does not change the response schema.

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

Used by `search`, `question_answers`. Orders search results. Allowed values are general (default), upvote_count_descending for most-upvoted, and time_descending for newest publish.

## `url` (type: `string`):

Used by `content_detail` (required), `content_comments` (required), `comment_replies` (required), `profile` (required), `user_articles` (required), `question_answers` (required), `user_answers` (required), `user_pins` (required), `pin_comments` (required). The content URL or profile URL required by content-oriented actions. content_detail and content_comments accept answer, article, or video links (question pages are not supported); profile and user_articles accept zhihu.com/people/ profile links.

## `comment_id` (type: `string`):

Used by `comment_replies` (required). The comment identifier required by comment_replies, taken from a content_comments row whose reply_count is non-zero.

## `page_token` (type: `string`):

Used by `user_answers`, `user_pins`, `user_search`, `column_search`, `scholar_search`, `salt_search`. Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received. 20 answers per page, newest first; each page is one call.

## `limit` (type: `integer`):

How many results to request for list actions. Defaults and maximums per action: `search` 20 (max 100); `content_comments` 20 (max 100); `comment_replies` 20 (max 100); `user_articles` 20 (max 100); `hot_list` 30 (max 30); `question_answers` 20 (max 20); `pin_comments` 20 (max 100). Billing: `search` one event per started block of 20 results; `content_comments` one event per started block of 20 results; `comment_replies` one event per started block of 20 results; `user_articles` one event per started block of 20 results; `hot_list` one event per non-empty request, whatever the row count; `question_answers` one event per non-empty request, whatever the row count; `pin_comments` one event per started block of 20 results.

## `params` (type: `object`):

Optional JSON object with the same fields as above, for API and integration use. Flat fields and params must not disagree.

## Actor input object example

```json
{
  "action": "search",
  "keyword": "如何学习摄影"
}
```

# Actor output Schema

## `records` (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 = {
    "keyword": "如何学习摄影"
};

// Run the Actor and wait for it to finish
const run = await client.actor("blushing_parachute/everyinfra-zhihu-api").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 = { "keyword": "如何学习摄影" }

# Run the Actor and wait for it to finish
run = client.actor("blushing_parachute/everyinfra-zhihu-api").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 '{
  "keyword": "如何学习摄影"
}' |
apify call blushing_parachute/everyinfra-zhihu-api --silent --output-dataset

```

## MCP server setup

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

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/dz6uInSIkX9MbpcWB/builds/zMNh3bllgVDnKnXFf/openapi.json
