# Weibo Scraper: Posts, Comments, Search & Hot Topics (`apisamurai/weibo-scraper`) Actor

Weibo Scraper for posts by keyword, the posts of any user, comments under a post and the live hot search list. Text, likes, reposts, comments, images and videos. No login, date and likes filters, pay only for real rows.

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

## Pricing

from $3.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.

Learn more: https://docs.apify.com/actors/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: Posts, Comments, Search & Hot Topics

This Weibo Scraper gets Weibo posts by keyword, the latest posts of any user, the comments under a post, and the live hot search list. Every row comes with plain text (no HTML), author, date, link, images and videos where Weibo shows them. Undated keyword searches and user feeds also include likes, reposts and comment counts. You pay only for real, unique rows, and IDs are always text, so long Weibo IDs never get rounded.

### What you can use it for

- **Track a topic or brand on Weibo** with keyword search, for market research and monitoring.
- **Follow accounts** such as media, brands or public figures and archive their posts with dates and engagement numbers.
- **Read the comments** under a post for sentiment analysis, customer feedback or research.
- **Watch what is trending** with the hot search list, with rank and heat.
- **Build Chinese-language datasets** of clean post and comment text for AI and NLP work.
- **Monitor on a schedule** with a date filter, and send new rows to Sheets, Slack or a database.

### Fair billing

- Only real rows are charged: posts, comments and hot topics. No demo, mock or placeholder rows, ever. If the data source sends one, it is dropped and counted in the run summary.
- Same price on every Apify plan, free plan included.
- Free Apify plan: 3 live runs a day, each with one data request, so you can try it. Paid plans have no limit.
- Limits, dates and likes filters are enforced by the Actor itself. Posts outside your dates or filters are skipped and not charged.
- Duplicates are never charged. A post found by two keywords, or by a keyword and a user, is saved once.
- Empty results, missing users or posts, posts with no comments and failed requests cost nothing.
- When you hit your spending limit, the run stops cleanly.

### How to use

1. Open the [Weibo Scraper](https://apify.com/apisamurai/weibo-scraper) page and click **Try for free** (you sign in to your Apify account).
2. Add **Search keywords**, **Users** (numeric IDs or profile links), **Post links** for comments, or turn on **Add the hot topics list**.
3. Set **Max posts per keyword or user**, and optionally dates and min likes. Turn on **Also get comments of the posts found** to add comments.
4. Click **Start**. Rows appear in the **Output** tab while the run works.
5. Export the dataset as JSON, CSV or Excel, or check the `SUMMARY` record in the key-value store.

### Input

| Field | What it does |
|---|---|
| Search keywords | Posts matching each keyword, one per line. Chinese keywords work best. Hashtag topics like `#人工智能#` work too. |
| Users | Numeric user IDs or profile links: `2803301701`, `https://weibo.com/u/2803301701`, `https://m.weibo.cn/profile/2803301701`. Latest posts first. |
| Post links (for comments) | Comments of these posts: `https://weibo.com/2803301701/RtmiVwh4H`, `https://m.weibo.cn/detail/5369941148041505`. |
| Also get comments of the posts found | Off by default. Adds the comments of the posts saved from keywords and users. |
| Add the hot topics list | Off by default. Adds the current hot search list (about 50 topics). |
| Max posts per keyword or user | Default 20, exact. |
| Max comments per post | Default 20, exact. |
| Max rows for the whole run | Optional hard cap on all rows. Posts are saved before comments. |
| Posted on or after / on or before | Inclusive, UTC. Relative dates like `7 days` work. Posts only. |
| Min likes | Skip posts below this number. Posts only. Needs counts, so with dates set, keyword search rows (no counts) are all skipped. |

```json
{
  "searchKeywords": ["人工智能"],
  "users": ["2803301701"],
  "includeComments": true,
  "maxPostsPerSource": 20,
  "maxCommentsPerPost": 20,
  "postedAfter": "7 days"
}
```

### Output

One row per post, comment or hot topic; `type` tells them apart. Field names never change between runs. Real output (27 November 2026, shortened):

```json
{
  "type": "post",
  "id": "5369972537692135",
  "url": "https://weibo.com/2803301701/RtmiVwh4H",
  "text": "【帮转：#这条视频传出酒泉了吗#】在接受@人民日报 记者采访时，孙美凤表示：当年通信不便，现在和师父已经没有了联系，希望这条视频能让她师父看见。...",
  "textTruncated": false,
  "createdAt": "2026-11-27T13:04:45.000Z",
  "author": { "id": "2803301701", "name": "人民日报", "verified": true, "followers": 158270747 },
  "likes": 125,
  "reposts": 32,
  "comments": 94,
  "images": [],
  "videoUrl": "http://f.video.weibocdn.com/o0/I34KlUFylx08CHp6HL8401041200Vsvk0E010.mp4?label=mp4_720p&template=720",
  "isRepost": true,
  "repostOf": { "id": "5369941148041505", "url": "https://weibo.com/2803301701/RtluixJXH", "author": { "id": "2803301701", "name": "人民日报", "verified": true, "followers": null }, "text": "【#酒泉有群天鸽#】在酒泉卫星发射中心，..." },
  "sourceType": "user",
  "sourceInput": "2803301701",
  "scrapedAt": "2026-11-27T14:10:00.000Z"
}
```

A comment row has the same fields plus `postId`: `{ "type": "comment", "id": "5369976500258128", "postId": "5369972537692135", "url": "https://m.weibo.cn/detail/5369972537692135", "text": "致敬辛苦了", "createdAt": "2026-11-27T13:20:30.000Z", "author": { "id": "7828621798", "name": "我坚信我不会一错再错", "verified": true, "followers": 1850 }, "likes": 3, "reposts": null, "comments": null, "images": [], "videoUrl": null, "isRepost": false, "repostOf": null, ... }`.

A hot topic row: `{ "type": "hot-topic", "id": "医保局工作人员直播间辱骂咨询者", "rank": 1, "title": "医保局工作人员直播间辱骂咨询者", "heat": 1091480, "category": "realtimehot", "url": "https://s.weibo.com/weibo?q=%23...%23", "sourceType": "hot", "sourceInput": "realtimehot", "scrapedAt": "..." }`.

Times are ISO 8601 UTC (Weibo shows China time). `images` are picture links. `url` of a comment is the link of its post. Missing values are `null`, never a fake 0. Undated keyword searches and user feeds include likes, reposts and comment counts. Date-filtered keyword searches return text, author, time, link and media, without counts (they are `null`, and author `verified` and `followers` are `null` too). `textTruncated` is `true` when Weibo shows only the beginning of a long post.

Each run also writes a `SUMMARY` record to the key-value store. For every input it lists rows delivered, rows skipped by dates or filters, duplicates, and why it stopped (`limit reached`, `no more results`, `not found or deleted`, `temporary error`, `spending limit`, `free plan limit` or `data source unavailable`).

### Pricing

$3 per 1,000 posts; $3 per 1,000 comments; $3 per 1,000 hot topics; $0.005 per run start

### Integrations

- **Apify API:** start a run and get the rows in one call with `POST https://api.apify.com/v2/acts/apisamurai~weibo-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>` and the input as JSON in the body.
- **Python and JavaScript clients** (`apify-client`): `client.actor("apisamurai/weibo-scraper").call(run_input={...})`.
- **Zapier, Make and n8n** to send new rows to Google Sheets, Slack, a CRM or a database.
- **MCP for AI agents:** connect the Apify MCP server to Claude, ChatGPT or another MCP client and the agent can run this Actor as a tool.
- **Schedules and webhooks** in Apify Console for daily or hourly runs.

### More China platform scrapers

- [Douyin Scraper](https://apify.com/apisamurai/douyin-scraper): Douyin videos by keyword (up to 1,000 per search), user videos, comments and the hot list.
- [Bilibili Scraper](https://apify.com/apisamurai/bilibili-scraper): Bilibili videos by keyword or user, comments and the popular list.
- [Zhihu Scraper](https://apify.com/apisamurai/zhihu-scraper): Zhihu answers and articles by keyword, question or user, comments and the hot list.

### FAQ

**Do I need a Weibo account?**
No. You only need an Apify account. You never enter credentials, cookies or a session.

**Which keywords work best?**
Chinese keywords. English words work but find fewer posts. Hashtag topics like `#人工智能#` work. Results come in Weibo's own order, not by date.

**Which accounts work?**
Public accounts, found by their numeric user ID. Find it in the profile link: `weibo.com/u/2803301701`. A link with only a name, such as `weibo.com/rmrb`, cannot be used because the ID is missing.

**Which post links work?**
`weibo.com/<user>/<post>`, `weibo.com/detail/<post>`, `m.weibo.cn/detail/<id>` and `m.weibo.cn/status/<id>`, with the short ID or the numeric ID. Links pasted with quotes, backticks or as markdown are cleaned, and a link in the wrong field still works.

**What time zone are dates in?**
`createdAt` is UTC. Weibo shows China time (UTC+8), which is converted. "Posted on or after / before" count whole days in UTC. Keyword search shows times only to the minute, and sometimes none: a post with no time is skipped when you set dates, and not charged.

**How far back can I go?**
A user's posts are read newest first and stop once they are older than your start date; a pinned post at the top never stops it. Keyword search is not in date order. With dates set, the search itself is limited to that window (rows without counts); without dates, rows have counts.

**Do filters work on comments?**
No. Dates and min likes apply to posts. Comments are limited by **Max comments per post** and **Max rows for the whole run**.

**Why did I get fewer results than I asked for?**
Open the `SUMMARY` record. It says for each input why it stopped: no more results, rows skipped by dates or filters, duplicates, the spending limit or the free plan limit.

**Is it legal to scrape Weibo?**
The Actor collects only public data. You are responsible for how you use it: follow the Weibo terms and the laws where you live, and take care with personal data (for example under GDPR or China's PIPL). This is not legal advice.

# Actor input Schema

## `searchKeywords` (type: `array`):

Find posts that match these keywords. One per line. Chinese keywords work best, for example 人工智能. Hashtag topics like #人工智能# work too. Results come in Weibo's own order, not by date. Without dates, rows include likes, reposts and comment counts; with dates, they do not.

## `users` (type: `array`):

Get the latest posts of these accounts. Numeric user IDs or profile links: 2803301701, https://weibo.com/u/2803301701, https://weibo.com/2803301701 or https://m.weibo.cn/u/2803301701. A link with a name instead of a number cannot be used. One per line.

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

Get the comments of these posts, e.g. https://weibo.com/2803301701/RtmiVwh4H or https://m.weibo.cn/detail/5369941148041505. One per line.

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

On: for the posts saved from keyword search and users, also save their comments (up to Max comments per post). A post with no comments costs nothing.

## `includeHotTopics` (type: `boolean`):

On: also save the current Weibo hot search list (about 50 topics with rank and heat).

## `maxPostsPerSource` (type: `integer`):

Maximum posts saved for each keyword and each user. Enforced exactly.

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

Maximum comments saved for each post. Enforced exactly.

## `maxTotalItems` (type: `integer`):

Optional hard cap on all rows (posts, comments and hot topics) across the run. Posts are saved before comments. Leave empty for no total cap.

## `postedAfter` (type: `string`):

Only posts published on or after this day (UTC). Also accepts relative dates such as 7 days. Applies to posts, not comments. Posts outside the range are skipped and not charged. A user's feed stops once its posts are older than this day.

## `postedBefore` (type: `string`):

Only posts published on or before this day (UTC, the whole day is included). Posts outside the range are skipped and not charged.

## `minLikes` (type: `integer`):

Skip posts with fewer likes. Works for a user's posts and undated keyword search. Date-filtered keyword search carries no like counts, so every row of it is skipped when this is set. Skipped posts are not charged.

## Actor input object example

```json
{
  "searchKeywords": [
    "人工智能"
  ],
  "includeComments": false,
  "includeHotTopics": false,
  "maxPostsPerSource": 20,
  "maxCommentsPerPost": 20
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "searchKeywords": [
        "人工智能"
    ],
    "maxPostsPerSource": 20,
    "maxCommentsPerPost": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("apisamurai/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 = {
    "searchKeywords": ["人工智能"],
    "maxPostsPerSource": 20,
    "maxCommentsPerPost": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("apisamurai/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 '{
  "searchKeywords": [
    "人工智能"
  ],
  "maxPostsPerSource": 20,
  "maxCommentsPerPost": 20
}' |
apify call apisamurai/weibo-scraper --silent --output-dataset

```

## MCP server setup

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