# Weibo Trending Scraper - Hot Search, Posts & Comments (`qwixlab/weibo-trending-scraper`) Actor

Scrape Sina Weibo without login: the live hot search board (微博热搜), hot posts feed, any public post by URL and its comments. Flat rows, pay per result.

- **URL**: https://apify.com/qwixlab/weibo-trending-scraper.md
- **Developed by:** [QWIX Lab](https://apify.com/qwixlab) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $26.00 / 1,000 results

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

## Weibo Trending Scraper (微博热搜) – Hot Search, Hot Posts & Comments

Scrape public data from **Sina Weibo**, China's biggest microblogging platform, **without a Weibo account**:

- **Hot search board (微博热搜)** – the live real-time ranking: keyword, rank, heat value and label (新 / 热 / 沸 / 爆). Paid placements are removed.
- **Hot posts feed (热门微博)** – posts Weibo currently promotes as popular.
- **Posts by URL** – any public post from a `weibo.com` or `m.weibo.cn` link, with the full text of long posts.
- **Comments** – top-level comments of every scraped post, sorted by hot or newest.

All rows are flat, ready for Excel, Google Sheets or a database. Schedule the Actor every hour to build your own history of Chinese social-media trends.

### Use cases

- Monitor what China is talking about right now (news, brands, products, entertainment).
- Brand and crisis monitoring: track posts and comment sentiment on posts about your brand.
- Media and market research on Chinese public opinion.

### Input

| Field | Type | Description |
|---|---|---|
| `includeHotSearch` | boolean (default `true`) | Save the real-time hot search board (about 50 topics) |
| `includeHotPosts` | boolean (default `false`) | Save posts from the hot feed |
| `maxHotPosts` | integer (1–500, default 50) | Posts taken from the hot feed |
| `postUrls` | list of strings | Public post links or post IDs |
| `includeComments` | boolean (default `false`) | Also save comments of every scraped post |
| `maxCommentsPerPost` | integer (default 100) | Comment limit per post |
| `commentsSort` | `hot` · `time` | Most liked first or newest first |
| `proxyConfiguration` | proxy | Apify Proxy recommended |

Example:

```json
{
    "includeHotSearch": true,
    "includeHotPosts": true,
    "maxHotPosts": 20,
    "postUrls": ["https://weibo.com/1699432410/Rs4s0jnYI"],
    "includeComments": true,
    "maxCommentsPerPost": 100,
    "commentsSort": "hot",
    "proxyConfiguration": { "useApifyProxy": true }
}
```

### Output

Every row has a `type` field: `hot_search`, `post` or `comment`.

**hot_search**: `rank`, `keyword`, `hotValue`, `label`, `searchUrl`, `scrapedAt`

**post**: `postId`, `mblogid`, `url`, `text` (full text for long posts), `isLongText`, `createdAt`, `authorName`, `authorId`, `authorUrl`, `authorVerified`, `repostsCount`, `commentsCount`, `likesCount`, `picturesCount`, `hasVideo`, `region` (province shown on the post), `sourceApp`, `source` (`hot` / `url`), `rank`, `input`, `scrapedAt`

**comment**: `postId`, `postUrl`, `commentId`, `text`, `createdAt`, `likesCount`, `repliesCount`, `authorName`, `authorId`, `authorVerified`, `scrapedAt`

Example rows (real data from a test run):

```json
[
    {
        "type": "hot_search",
        "rank": 1,
        "keyword": "中俄美三国元首会晤",
        "hotValue": 2394501,
        "label": "新",
        "searchUrl": "https://s.weibo.com/weibo?q=%23%E4%B8%AD%E4%BF%84%E7%BE%8E%E4%B8%89%E5%9B%BD%E5%85%83%E9%A6%96%E4%BC%9A%E6%99%A4%23"
    },
    {
        "type": "post",
        "url": "https://weibo.com/1629359974/Rs3KFtblk",
        "text": "《GTA6》壁纸",
        "createdAt": "2026-11-19T00:00:36.000Z",
        "authorName": "二火山",
        "authorVerified": true,
        "repostsCount": 57,
        "commentsCount": 3,
        "likesCount": 212,
        "picturesCount": 12
    }
]
```

See `sample_output.json` in the source for 20 complete rows of all three types.

### Pricing

Pay per result: **$26.00 per 1,000 results** ($0.026 per hot-search topic, post or comment). You pay only for rows saved to your dataset. Set "Maximum cost per run" and the Actor stops cleanly when the budget is used.

### Reliability

- Uses the same public endpoints the Weibo website uses for logged-out visitors, with an anonymous guest session (no account, no cookies from you).
- Automatic retries with exponential backoff; blocked or expired sessions are replaced with a new guest session and, with Apify Proxy, a new IP.
- A broken URL never fails the whole run: results collected so far are kept, problems are listed in the `FAILURES` record of the key-value store.

### Limitations (honest)

- **No keyword search.** Weibo requires a login for keyword search (`s.weibo.com`) and for browsing a user's full timeline, so this Actor does not offer them.
- Comments are top-level comments; nested replies are counted in `repliesCount` but not exported.
- Commenter location is intentionally not exported.

### FAQ

**Do I need a Weibo account?** No.

**How often does the hot search board change?** Weibo updates it continuously. Schedule the Actor (e.g. hourly) and every run saves a fresh snapshot with `scrapedAt`.

**Why do some posts return fewer comments than `commentsCount`?** Deleted, folded or reply comments are counted by Weibo but not listed publicly.

**Is it legal?** The Actor collects only data that Weibo shows publicly to every visitor and no private contact data. You are responsible for using the data in line with applicable law and Weibo's terms.

# Actor input Schema

## `includeHotSearch` (type: `boolean`):

Save the current real-time hot search list (about 50 topics) with rank, heat value and label. Paid ads are removed.

## `includeHotPosts` (type: `boolean`):

Save posts from Weibo's public hot feed.

## `maxHotPosts` (type: `integer`):

How many posts to take from the hot feed.

## `postUrls` (type: `array`):

Public Weibo post links (https://weibo.com/<user>/<id>, https://m.weibo.cn/detail/<id>) or bare post IDs.

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

Also save top-level comments of every scraped post (hot feed and URLs). Each comment is one result.

## `maxCommentsPerPost` (type: `integer`):

Comment limit for each post.

## `commentsSort` (type: `string`):

Hot (most liked first) or newest first.

## `proxyConfiguration` (type: `object`):

Proxy servers used for requests. Apify Proxy is recommended.

## Actor input object example

```json
{
  "includeHotSearch": true,
  "includeHotPosts": false,
  "maxHotPosts": 50,
  "includeComments": false,
  "maxCommentsPerPost": 100,
  "commentsSort": "hot",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped rows in the default dataset.

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("qwixlab/weibo-trending-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 = { "proxyConfiguration": { "useApifyProxy": True } }

# Run the Actor and wait for it to finish
run = client.actor("qwixlab/weibo-trending-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 '{
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call qwixlab/weibo-trending-scraper --silent --output-dataset

```

## MCP server setup

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