Zhihu API: keyword search, answers and comments

Based on the 2026-11-21 specification

Quick answer

The Zhihu API has two asynchronous tasks. POST /zhihu/search/task searches Zhihu answers and column articles by keyword and publish date range (default the last 7 days); videos, ideas and other result types are not collected. POST /zhihu/pushs/task takes a question, answer or column-article URL: for a question it collects the answers, for an answer or article the comments and the replies under them. Poll each task with GET; once it is DONE the same response returns the records. Each item has its URL, title, full text, author, publish time, upvote and comment counts and the author's IP location when known. Only a limited number of Zhihu tasks run at once, and further tasks wait in a queue. Data is collected by web crawlers from content publicly published on Zhihu.

API pages by capability

Data you get

Fields follow the 2026-11-21 specification. Until a task is DONE the poll returns only the task object; once DONE the same response carries task, total_count, data, page and pageSize. Records can carry more fields than listed here; descriptive fields such as meta_keywords, location and icon_url may be empty.

DataFieldsEndpoint
Answers and column articles from keyword search id, url, title, content, tm, datetime, tm_crawler, tm_update, author, author_id, type, ctype, source, sentiment, region, like_count, comment_count, metadata_img GET /zhihu/search/task/{task_id}
Search task status and counters task: id, keyword, status, start_date, end_date, max_pages, created_at, total, completed, pages_crawled, partial, timed_out, failed_pages, failed_articles, failed_ranges GET /zhihu/search/task/{task_id}
A question's answers, or an answer's or article's comments and replies id, post_id, author_id, author, push_type, region, content, tm, tm_crawler, sentiment GET /zhihu/pushs/task/{task_id}
Answer and comment task status and counters task: id, post_url, status, crawl_second_layer, created_at, total, completed, pages_crawled, reported_total, partial, timed_out, failed_pages, failed_batches, zhihu_type, title GET /zhihu/pushs/task/{task_id}

Endpoints

Base URL: https://api.infominer.io/api/v2. Send your API key in the auth-header request header. Parameters marked * are required.

MethodPathWhat it doesMain parameters
POST /zhihu/search/task Create a keyword search task over answers and column articles, with an optional date range and page limit. keyword* end_date max_pages rerun start_date
GET /zhihu/search/task/{task_id} Poll the search task; once DONE it returns the items and total_count, up to 100 per page. task_id* page pageSize
POST /zhihu/pushs/task Create a task from a question, answer or column-article URL: answers for a question, comments for an answer or article. post_url* crawl_second_layer max_pages rerun
GET /zhihu/pushs/task/{task_id} Poll the task; once DONE it returns the answers or comments, up to 1000 per page. task_id* page pageSize

How to get the data

  1. POST /zhihu/search/task with keyword (1 to 100 characters) and optional start_date and end_date (YYYY-MM-DD, UTC+8, inclusive; default the last 7 days) and max_pages (0 to 50; 0 or omitted means 20, about 20 items per page).
  2. Poll GET /zhihu/search/task/{task_id}. Each task needs about 5 to 10 seconds to get ready, then about 3 to 5 seconds per page; tasks beyond the concurrency limit wait as INIT, and waiting does not make them time out. Poll every 3 to 5 seconds and set an overall deadline. Statuses are INIT, RUNNING, DONE, PARTIAL, TIMED_OUT (no progress for more than 600 seconds) and FAILED. Only a DONE response carries data; the others return the flat task object, so read the status as task.status or, before DONE, status. A task fully succeeded when status is DONE and partial and timed_out are both false.
  3. Once DONE, read the answers and articles from data with page and pageSize (up to 100 per page). An answer's title is its question's title.
  4. For the discussion around an item, POST /zhihu/pushs/task with its URL. A question task's data holds only its answers (push_type answer, 20 per page). An answer or article URL returns its top-level comments (comment, 10 per page) and, with crawl_second_layer (default true), their replies (reply). Read them with pageSize up to 1000.

curl examples

Create a keyword search task

curl -X POST https://api.infominer.io/api/v2/zhihu/search/task \
  -H "auth-header: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "空气炸锅", "start_date": "2026-06-01", "end_date": "2026-06-07", "max_pages": 3}'

Poll the task by ID

curl "https://api.infominer.io/api/v2/zhihu/search/task/$TASK_ID?page=1&pageSize=100" \
  -H "auth-header: YOUR_API_KEY"

Create a comment task from an answer URL

curl -X POST https://api.infominer.io/api/v2/zhihu/pushs/task \
  -H "auth-header: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"post_url": "https://www.zhihu.com/question/100000001/answer/100000000001", "crawl_second_layer": true, "max_pages": 2}'

Sample JSON

Illustrative data written by hand: accounts are sample_user_n and IDs are obviously fake. These are not real posts.

Task creation response (Illustrative data)

{
  "id": "00000000-0000-4000-8000-000000000001",
  "keyword": "空气炸锅",
  "status": "INIT",
  "start_date": "2026-06-01",
  "end_date": "2026-06-07",
  "max_pages": 3,
  "created_at": 1780880400,
  "total": 0,
  "completed": 0,
  "pages_crawled": 0,
  "timed_out": false,
  "partial": false,
  "failed_pages": 0,
  "failed_articles": 0,
  "failed_ranges": 0
}

Poll response once the task is DONE (Illustrative data)

{
  "task": {
    "id": "00000000-0000-4000-8000-000000000001",
    "keyword": "空气炸锅",
    "status": "DONE",
    "start_date": "2026-06-01",
    "end_date": "2026-06-07",
    "max_pages": 3,
    "created_at": 1780880400,
    "total": 2,
    "completed": 2,
    "pages_crawled": 1,
    "timed_out": false,
    "partial": false,
    "failed_pages": 0,
    "failed_articles": 0,
    "failed_ranges": 0
  },
  "total_count": 2,
  "data": [
    {
      "id": "00000000-0000-4000-8000-000000000001",
      "url": "https://www.zhihu.com/question/100000001/answer/100000000001",
      "title": "空气炸锅值得买吗?",
      "content": "用了半年,说说真实感受。\n优点是做鸡翅和薯条确实方便,缺点是容量小,一家四口要分两次做。",
      "tm": 1780666200,
      "datetime": "2026-06-05 21:30:00",
      "tm_crawler": 1780880406,
      "tm_update": 1780880406,
      "author": "sample_user_1",
      "author_id": "0000000001",
      "type": [
        "sample_user_1"
      ],
      "ctype": [
        "sample_user_1"
      ],
      "source": "zhihu",
      "sentiment": "Positive",
      "region": "浙江",
      "like_count": 128,
      "comment_count": 2,
      "metadata_img": []
    },
    {
      "id": "00000000-0000-4000-8000-000000000002",
      "url": "https://zhuanlan.zhihu.com/p/100000000002",
      "title": "空气炸锅选购指南:容量、功率和清洗",
      "content": "这篇整理了选空气炸锅时最常被问到的三个问题。",
      "tm": 1780452000,
      "datetime": "2026-06-03 10:00:00",
      "tm_crawler": 1780880411,
      "tm_update": 1780880411,
      "author": "sample_user_2",
      "author_id": "0000000002",
      "type": [
        "sample_user_2"
      ],
      "ctype": [
        "sample_user_2"
      ],
      "source": "zhihu",
      "sentiment": "Neutral",
      "region": "",
      "like_count": 56,
      "comment_count": 4,
      "metadata_img": []
    }
  ],
  "page": 1,
  "pageSize": 100
}

How posts and comments link

Every record of an answer and comment task has post_id, the document ID of the question, answer or article it belongs to, and push_type: answer, comment or reply. A task on a question returns only answers in data: the comments under an answer belong to that answer, so create a task with the answer URL to get its comments. The task object carries zhihu_type (question, answer or article), the title once fetched, and reported_total, the count Zhihu shows. data holds every collected answer or comment of the item, including data collected by earlier tasks, so total_count can differ from task.completed.

History and limits

  • Search covers answers and column articles only; videos, ideas, related searches and other results are not collected.
  • Search is not exhaustive. Zhihu's "latest" ordering is not a strict time order and jumps between pages, so the task stops after 3 consecutive pages with nothing in the date range, and content that appears only deeper may be missed. The same query run at different times can return a different number of items.
  • With crawl_second_layer, a question task also collects the first comment page (at most 10) of each answer, but those comments belong to the answer and are not in the question task's data. Read them, or the answer's full comments, with a task on that answer's URL.
  • Zhihu serves 10 top-level comments per page regardless of settings.
  • Only a limited number of Zhihu tasks run at once; further tasks queue as INIT. Many requests in a short time can also make Zhihu restrict access for a while, so spread tasks out and retry a failed task later with a new POST.
  • data is a keyword match over everything collected for the date range, including results of earlier tasks, so total_count can exceed task.completed. task.completed is what this task collected. Like and comment counts are as of collection. They are not refreshed automatically; create a new task for current numbers. How far back search can go is confirmed per project scope.
Collection: web crawlers collect content publicly published on each platform. Whether this suits your use depends on the purpose and jurisdiction and is for the buyer's legal team to assess; we can provide a description of sources and collection methods.

Delivery format

JSON. Search and comment tasks return their records in the poll response once DONE, paginated with page and pageSize (search up to 100 per page, comments up to 1000). Batch files or other delivery are confirmed per project scope.

Request a trial

In the form below, mention Zhihu and tell us the keywords or questions you want to follow, whether you need answers and comments, and the expected volume. We will confirm the scope and arrange a trial and an API key.

Fill in the form to request a trial. We confirm the scope and reply with trial and integration arrangements.

Fill in the request form

FAQ

Does Zhihu search return every matching answer?
Not always. Zhihu's "latest" ordering jumps between pages and the task stops after 3 consecutive pages with nothing in the date range, so some content may be missed, and the same query can return slightly different counts at different times.
How do I get the comments under a Zhihu answer?
Create /zhihu/pushs/task with the answer URL, https://www.zhihu.com/question/{question id}/answer/{answer id}. A task on the question URL returns only the answers in data; the comments under an answer belong to that answer.
Does the search include Zhihu videos or ideas?
No. Search collects answers and column articles only.
Why does my Zhihu task stay at INIT?
Only a limited number of Zhihu tasks run at the same time. Further tasks wait as INIT and start when earlier ones finish; waiting in the queue does not make a task TIMED_OUT.
Is this a Zhihu scraper API? How is the data collected?
Yes. LargitData collects content publicly published on Zhihu with web crawlers and returns it as JSON through the API, so you do not run scrapers yourself. LargitData is not affiliated with Zhihu and this is not Zhihu's own API. Whether this suits your use depends on the purpose and jurisdiction and is for your legal team to assess; we can provide a description of sources and collection methods.