How to Track What China Is Talking About with the Zhihu Hot List and Python

How to Track What China Is Talking About with the Zhihu Hot List and Python

A step-by-step guide to scraping trending topics from Zhihu using Python and Apify.

In today's fast-paced world, staying updated on trending topics is crucial. This is especially true for understanding public sentiment in different regions, like China. As of November 26, 2026, the Zhihu Hot List provides valuable insights into what people in China are discussing right now. However, accessing this data can be tricky since it's in Chinese and there is no official public API. But don't worry! In this article, we'll walk through how to scrape the Zhihu Hot List using Python.

What is Zhihu?

Zhihu (知乎) is China's largest question-and-answer platform. It's similar to Quora but has a unique style and user base. The Zhihu Hot List (知乎热榜) shows the most popular questions being discussed at any given moment. This list changes frequently, making it a great source for real-time insights.

Why Track the Zhihu Hot List?

Tracking the Zhihu Hot List helps you understand current debates and trends in China. This can be useful for marketers, journalists, and anyone interested in Chinese culture and public opinion. By analyzing this data, you can gain insights into what topics resonate with the Chinese audience.

The Challenge

The main challenges with accessing the Zhihu Hot List are:

  • It's in Chinese, which can be a barrier for non-Chinese speakers.
  • The list updates every few minutes, making it hard to keep track.
  • There is no official public API for easy access.

Our Solution

In this tutorial, we will use Python to scrape the Zhihu Hot List. We will pull the data into English and extract useful information such as:

  • Rank of the question
  • Title and excerpt (with English translations)
  • Heat score (热度)
  • Number of answers
  • Question URL
  • Time of data extraction

Setup Requirements

Before we dive into the code, here’s what you need to do:

Step 1: Create an Apify Account

  1. Go to apify.com and create a free account. The free plan provides enough credits to follow this tutorial.

Step 2: Get Your API Token

  1. Once logged in, navigate to Settings → API Integrations in the Apify Console.
  2. Copy your API token for later use.

Step 3: Install the Apify Client

  1. Open your terminal and run the following command to install the Apify client:
    pip install "apify-client==3"

Step 4: Set Your API Token as an Environment Variable

  1. In your terminal, set the API token as an environment variable:
    export APIFY_TOKEN="your_token_here"
    Replace your_token_here with the token you copied earlier.

Pulling the Hot List into Python

Now that we have everything set up, let's write the code to scrape the Zhihu Hot List.

Step 5: Write the Python Code

Here’s a simple script that pulls the hot list:

import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

run = client.actor("neronbaez/zhihu-hot-list-scraper").call(run_input={
    "maxItemsPerPlatform": 10,      # top 10 questions of the hot list
    "translateToEnglish": True,     # adds titleEn / excerptEn
})

questions = list(client.dataset(run.default_dataset_id).iterate_items())

for q in questions:
    print(f'#{q["rank"]:>2} | {q["heat"]:>9,} heat | {q.get("answers", 0):>5} answers | '
          f'{q.get("titleEn") or q["title"]}')

Step 6: Run the Code

  1. Save the script as zhihu_scraper.py.
  2. Run it in your terminal:
    python zhihu_scraper.py

Example Output

When you run the script, you should see output similar to this:

# 1 | 8,230,000 heat | 98 answers | The launch of the Shenzhou 24 manned spacecraft was a complete success. The Chinese Space Station welcomed its first foreign astronaut. What other highlights are there in this launch mission?
# 2 | 4,640,000 heat | 175 answers | Young people are beginning to persuade their parents to sell their vacant houses in the county and exchange them for cash to collect interest. Is it necessary to keep a house that has been vacant for many years?
# 3 | 2,400,000 heat | 192 answers | The AI short drama "Ugly Fox" sparked a lot of discussion after it became popular. What is the core reason why it can hit the audience?
# 4 | 2,290,000 heat | 28 answers | Trump publicly mentioned a Chinese dish with a beautiful "hat" and said it was delicious but couldn't name it. Which dish could it be?
# 5 | 2,180,000 heat | 175 answers | Why do I think Mr. Bean's performance is very vulgar and childish and not funny at all? Is it the difference between Chinese and Western cultures?

Finding Open Conversations

To find questions that are popular but have few answers, you can modify the code to calculate heat per answer. This can help identify topics that are still open for discussion.

Step 7: Identify Hot but Under-Answered Topics

Add the following code to your script:

for q in questions:
    q["heatPerAnswer"] = q["heat"] / max(q.get("answers") or 1, 1)

open_topics = sorted(questions, key=lambda q: q["heatPerAnswer"], reverse=True)[:2]
print("Hot but under-answered:")
for q in open_topics:
    print(f'{q["heatPerAnswer"]:10,.0f} heat/answer | {q.get("titleEn") or q["title"]}')

Example Output for Under-Answered Topics

When you run this part, you might see:

Hot but under-answered:
  83,980 heat/answer | The launch of the Shenzhou 24 manned spacecraft was a complete success. The Chinese Space Station welcomed its first foreign astronaut. What other highlights are there in this launch mission?
  81,786 heat/answer | Trump publicly mentioned a Chinese dish with a beautiful "hat" and said it was delicious but couldn't name it. Which dish could it be?

Tracking Over Time

The hot list changes throughout the day. You can schedule the scraper to run every hour in Apify. This way, you can track which topics rise and fall over time.

Step 8: Schedule Your Scraper

  1. In the Apify Console, navigate to the Schedules tab.
  2. Create a new schedule for your actor to run every hour. This will help you capture data at regular intervals.
  3. Each run will be saved, allowing you to analyze trends over time.

Conclusion

By following this guide, you can effectively monitor and analyze trending discussions on Zhihu. This data can provide valuable insights into public sentiment and popular topics in China. Whether you're a marketer looking for trends or a journalist wanting to understand public opinion, the Zhihu Hot List is a valuable resource.

Merits

  • Gain real-time insights into trending discussions in China.
  • Understand public sentiment on various topics.
  • Identify open conversations with high engagement potential.
  • Easily accessible data through a simple Python script.

Demerits

  • Requires basic knowledge of Python and web scraping.
  • Data is only available in English through machine translation, which may not always be accurate.
  • Limited to the top items specified in the script; more items require adjustments in the code.

Caution

This article is meant for educational purposes. Make sure to replace any placeholder values with your actual data. Always verify claims against the original source before relying on them.

Frequently asked questions

  • What is Zhihu? — Zhihu is China's largest question-and-answer platform, similar to Quora.
  • How can I scrape data from Zhihu? — You can use Python and the Apify platform to scrape the Zhihu Hot List.
  • What data can I extract from the Zhihu Hot List? — You can extract the rank, title, heat score, number of answers, and more.
  • Is the data available in English? — Yes, the data can be translated into English using the scraper.
  • Do I need a Zhihu account to access the hot list? — No, you do not need a Zhihu account to access the hot list data.
  • How often does the hot list update? — The hot list updates every few minutes, reflecting real-time discussions.
  • Can I track trends over time? — Yes, by scheduling the scraper to run regularly, you can track how topics change over time.

Tags

#python #webscraping #datascience

Free field guide

Prompt-Injection Defense Checklist

The controls that actually reduce the blast radius when your app feeds untrusted text to an LLM. Enter your email — you'll get the PDF instantly, plus new posts on AI, security & Linux.