# Weibo Scraper (微博): Search, Hot Search, Posts & Comments (`sinodata/weibo-scraper`) Actor

Sina Weibo (微博) scraper API, no login: keyword and brand search with date range and new-post monitoring, real-time hot search (微博热搜), trending posts, full post text, comments with commenter IP location (IP属地) and user profiles.

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

## Pricing

from $9.00 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Scraper (微博): Search, Hot Search, Posts & Comments

Extract public data from **Weibo** (微博), China's largest public social network, without logging in. No Chinese phone number, no cookies from you, no browser. Fast HTTP requests against Weibo's own web endpoints.

### What you can scrape

| Source | What you get |
|---|---|
| **Keyword search (搜索)** | About 100 recent and top posts per keyword, brand or hashtag, with an optional date range and an **only new posts** mode for hourly monitoring |
| **Hot search (热搜榜)** | The real-time top ~50 topics with rank, heat score, label (热/新/沸) and category |
| **Hot posts (热门微博)** | Posts from Weibo's public trending feed |
| **Post URLs** | Full post: text (including long posts), images, video, topics, reposts, comments and likes, publishing location |
| **Comments** | Hot or newest comments plus reply threads, with likes, author and the commenter's **IP location (IP属地)** |
| **Users** | Profile: followers, following, number of posts, verification, location, sign-up date, plus their **latest posts** |

### Use cases

- **Trend monitoring**: track what China is talking about, hour by hour, with the hot search list.
- **Brand and crisis monitoring**: search your brand every hour with **Only new posts** on, then collect the comments, with the region of each commenter.
- **KOL research**: compare follower counts and verification of Weibo accounts.
- **Sentiment and NLP**: build datasets of Chinese social media comments for analysis.

### How to use

1. Add **search keywords**, turn on **Hot search** and/or **Hot posts**, or add **post URLs** or **user URLs**. With nothing selected you get the hot search list.
2. Turn on **Scrape comments** if you want comments (replies are included by default).
3. Run, then download the results as JSON, CSV or Excel, or use the API.

Accepted post inputs: `https://weibo.com/7495781530/RkNNwhoQD`, `https://m.weibo.cn/detail/5349579864147095`, `RkNNwhoQD`, `5349579864147095`.
Accepted user inputs: `https://weibo.com/u/1669879400`, `https://weibo.com/n/央视新闻`, `1669879400`.

#### Example input

Brand monitoring (schedule it hourly):

```json
{
  "searchQueries": ["比亚迪", "小米汽车"],
  "onlyNewPosts": true,
  "includeComments": true,
  "maxCommentsPerPost": 50
}
```

Trends and hot posts:

```json
{
  "includeHotSearch": true,
  "includeHotTimeline": true,
  "maxHotTimelinePosts": 30,
  "includeComments": true,
  "maxCommentsPerPost": 100
}
```

### Output

Every record has a `type` field: `hotTopic`, `post`, `comment` or `user`. Use the views in the dataset tab, or filter by `type` when exporting.

#### Hot topic

```json
{
  "type": "hotTopic",
  "rank": 1,
  "word": "全世界都知道中国人放假了",
  "heat": 1764416,
  "label": "热",
  "category": "幽默",
  "url": "https://s.weibo.com/weibo?q=%23...%23"
}
```

#### Post

```json
{
  "type": "post",
  "id": "5349579864147095",
  "url": "https://weibo.com/7495781530/RkNNwhoQD",
  "text": "...",
  "createdAt": "2026-10-02T06:31:33.000Z",
  "location": "重庆",
  "authorName": "...",
  "reposts": 1,
  "comments": 31,
  "likes": 659,
  "topics": ["那英在家失去意识30s"],
  "images": []
}
```

#### Comment

```json
{
  "type": "comment",
  "postId": "5349579864147095",
  "text": "...",
  "likes": 86,
  "authorName": "...",
  "authorLocation": "重庆",
  "createdAt": "2026-10-02T06:31:58.000Z",
  "parentId": null
}
```

### Pricing

Pay only for results:

| Event | Price |
|---|---|
| Hot topic | $0.002 |
| Post | $0.01 |
| User profile | $0.01 |
| Comment | $0.003 |

That is $10 per 1,000 posts and $3 per 1,000 comments. These prices apply from 14 November 2026. The run stops cleanly when it reaches the maximum cost you set.

### Public access and your own cookie (optional)

Without any login, Weibo shows visitors the first page of each search tab and of each user's posts, so a run returns about **100 posts per keyword** and a user's **10 latest posts**. Scheduled runs with **Only new posts** build a continuous feed from that.

If you need more, paste the cookie of **your own** logged-in m.weibo.cn session into **Your Weibo cookie** (it needs `SUB` and `SUBP`). The Actor then follows search results and users' post lists beyond the first page, up to your limits. The cookie is stored as a secret input and used only in your run. Weibo may restrict accounts used for automated access, so a secondary account is safer. If Weibo doesn't accept the cookie, the run says so and continues with public access.

The Actor never asks for passwords and has no account of its own.

### Notes

- If you run very large jobs and see `418` or `432` errors in the log, enable Apify Proxy (residential) in the Advanced section.
- Respect Weibo's terms and applicable law, and don't use personal data (names, comments) for spam or harassment.

### Related

- [China Consumer Complaints (黑猫投诉)](https://apify.com/sinodata/china-consumer-complaints): complaints about any company
- [China Trending Topics](https://apify.com/sinodata/china-trending-topics): 20+ Chinese hot lists in one run
- [Douyin Hot Search](https://apify.com/sinodata/douyin-hot-search): Douyin's top 50 and music chart

### 中文说明

抓取微博公开数据：关键词搜索（每个关键词约 100 条最新和热门微博，可按日期筛选，支持“只要新微博”定时监测；可选填自己账号的 cookie 获取更多页）、热搜榜、热门微博、指定微博、评论及 IP 属地、用户资料及其最新微博。输出为统一的 JSON 字段，无需登录。按结果计费，可在 Apify 上直接运行或通过 API 调用，也可设置定时任务。有问题或需要新字段，请在 Issues 页面留言（中文、英文均可）。

### Feedback

Found a bug or need a field that's missing? Open an issue on the Issues tab and it will usually be fixed within a day or two.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords, brands or hashtags to search on Weibo (e.g. 比亚迪, 小米汽车, iPhone). Each keyword returns up to about 100 recent and top posts: guests see the first page of each search tab, which the Actor combines.

## `searchTabs` (type: `array`):

Which Weibo search tabs to combine. All of them give the most posts.

## `searchDateFrom` (type: `string`):

Only posts published on or after this date (YYYY-MM-DD).

## `searchDateTo` (type: `string`):

Only posts published on or before this date (YYYY-MM-DD).

## `maxPostsPerQuery` (type: `integer`):

Upper limit of posts saved per keyword.

## `fetchFullText` (type: `boolean`):

Fetch the complete text of long posts (one extra request per long post).

## `onlyNewPosts` (type: `boolean`):

For scheduled runs: save (and pay for) only posts not returned in a previous run for the same keyword. Run hourly to follow a brand or topic.

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

Save Weibo's real-time hot search list (about 50 topics) with rank, heat and category. (Also used when nothing else is selected.)

## `includeHotTimeline` (type: `boolean`):

Save posts from Weibo's public trending feed.

## `maxHotTimelinePosts` (type: `integer`):

How many trending posts to save when Hot posts is on.

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

Weibo post links (weibo.com/<uid>/<id>, m.weibo.cn/detail/<id>) or post ids. Returns the full post, including long text.

## `userUrls` (type: `array`):

User links (weibo.com/u/<uid>, weibo.com/n/<name>) or numeric uids. Returns the profile (followers, posts count, verification). A user's post list needs login and is not included.

## `maxUserPosts` (type: `integer`):

Also save each user's latest posts. Without a cookie Weibo shows the newest page (about 10 posts); with your cookie, up to this number.

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

Save comments for every scraped post, including the commenter's IP location (IP属地).

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

Total comments per post, counting replies.

## `commentSort` (type: `string`):

Order of top-level comments.

## `includeCommentReplies` (type: `boolean`):

Also save replies under each comment.

## `maxRepliesPerComment` (type: `integer`):

Replies saved under each top-level comment (still limited by Max comments per post).

## `cookie` (type: `string`):

Optional. Paste the cookie of your own logged-in m.weibo.cn session (at least SUB=...; SUBP=...) to go beyond the first page of search results and users' post lists. It is used only in your run. Weibo may restrict accounts used this way, so a secondary account is safer. Leave empty for public data only.

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

Usually not needed. If you see many 418/432 errors on large runs, switch to Apify residential proxy.

## Actor input object example

```json
{
  "searchQueries": [
    "比亚迪"
  ],
  "searchTabs": [
    "top",
    "latest",
    "popular",
    "video",
    "images",
    "topic"
  ],
  "maxPostsPerQuery": 100,
  "fetchFullText": true,
  "onlyNewPosts": false,
  "includeHotSearch": true,
  "includeHotTimeline": false,
  "maxHotTimelinePosts": 30,
  "maxUserPosts": 0,
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "commentSort": "hot",
  "includeCommentReplies": true,
  "maxRepliesPerComment": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `posts` (type: `string`):

No description

## `comments` (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 = {
    "searchQueries": [
        "比亚迪"
    ],
    "includeHotSearch": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("sinodata/weibo-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 = {
    "searchQueries": ["比亚迪"],
    "includeHotSearch": True,
}

# Run the Actor and wait for it to finish
run = client.actor("sinodata/weibo-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 '{
  "searchQueries": [
    "比亚迪"
  ],
  "includeHotSearch": true
}' |
apify call sinodata/weibo-scraper --silent --output-dataset

```

## MCP server setup

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