# Why does the Zhihu API return ZERR_NOT_LOGIN (error code 101)?

`{"error":{"code":101,"name":"AuthenticationError","message":"ZERR_NOT_LOGIN"}}` means Zhihu treated the request as logged out: the cookie is missing, expired, or doesn't match the signed headers. MediaCrawler users hit it on Zhihu keyword search in issue 517 (December 2024). XTikAPI searches Zhihu with `zhihu.posts.search` and reads answers with `zhihu.question_answers.list`, no login, $0.002 a call.

Updated 2026-11-21

## What to check

| What you see | Most likely | What to do |
| --- | --- | --- |
| `ZERR_NOT_LOGIN` on search | The cookie (`z_c0`) is missing or expired | Log in again and copy a fresh cookie |
| Login looks fine, still 101 | Cookie and signature headers (`x-zse-96`) come from different sessions | Take both from the same browser session |
| ReadTimeout / SSL errors before any data (issue 534) | Network or Zhihu throttling, not login | Retry slower, check the proxy |

In issue 517 the error surfaced as a `tenacity.RetryError` that MediaCrawler's `DataFetchError` handler didn't catch, so the crawler stopped instead of skipping.

## Without a Zhihu login

1. Search: `zhihu.posts.search` with `keyword`, paging with `cursor`.
2. A question's answers: `zhihu.question_answers.list` with `question_id`.
3. One answer: `zhihu.posts.detail` with `answer_id`; its comments with `zhihu.answer_comments.list`.

Cost: 20 keywords × 5 pages, plus answers for 100 questions × 3 pages = 400 calls × $0.002 = $0.80.

## Why XTikAPI

- XTikAPI reads Zhihu with 16 endpoints from $0.002 a call, and a failed call is not charged.
- Fewer tokens for AI: across 12 recorded live Zhihu calls (2026-11-18), raw platform JSON is ~230k tokens vs ~72k via XTikAPI REST (68.5% fewer) and ~38k via MCP (83.6% fewer).
- See before you pay: 192 of 229 endpoints show a recorded real response on their page (12 of 16 for Zhihu).
- Prepaid balance, no subscription. Balance never expires, and unused top-up money can be refunded within 14 days.
- Free trial: a verified account gets $0.50, no card.

## Endpoints

- [Zhihu article search API](https://xtikapi.com/apis/zhihu/posts/search) ($0.002 a call): Search Zhihu articles and answers by keyword.
- [Zhihu question answers API](https://xtikapi.com/apis/zhihu/question_answers/list) ($0.002 a call): Answers to a Zhihu question.
- [Zhihu answer details API](https://xtikapi.com/apis/zhihu/posts/detail) ($0.002 a call): One Zhihu answer by ID.
- [Zhihu answer comments API](https://xtikapi.com/apis/zhihu/answer_comments/list) ($0.002 a call): Comments on a Zhihu answer.

## More about Zhihu

- [Zhihu API](https://xtikapi.com/apis/zhihu)
- [How can an AI agent search Zhihu and Douyin?](https://xtikapi.com/answers/ai-agent-search-zhihu-douyin)

## Sources

What this page says about other products comes from their own pages and docs, read on 2026-11-21.

- [MediaCrawler issue #517 (Zhihu ZERR_NOT_LOGIN)](https://github.com/NanmiCoder/MediaCrawler/issues/517)
- [MediaCrawler issue #534 (can Zhihu answers still be collected)](https://github.com/NanmiCoder/MediaCrawler/issues/534)

## Questions

### Is ZERR_NOT_LOGIN the same as a 403 for a missing x-zse-96?

No. 101 says the request has no valid login; a bad signature is a different failure. They often show up together when the cookie and signature come from different sessions.

---

XTikAPI: one API key for public social media data, prepaid per call. [HTML version](https://xtikapi.com/answers/zhihu-zerr-not-login) · [llms.txt](https://xtikapi.com/llms.txt) · [OpenAPI](https://xtikapi.com/openapi.json)
