# Weibo Scraper - Hot Search, Posts, Users & Comments (`v1tal615/weibo-scraper`) Actor

Scrape Weibo (微博): hot search ranking, trending posts, keyword search, user profiles and posts, full post text and comments. No login needed. IDs kept as strings, times in UTC. Export JSON, CSV, Excel.

- **URL**: https://apify.com/v1tal615/weibo-scraper.md
- **Developed by:** [bình minh trần](https://apify.com/v1tal615) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 96.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.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/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: hot search, posts, users and comments (微博)

Scrape **Weibo** (weibo.com, 新浪微博) without logging in:

- the **hot search ranking (热搜榜)**
- the **trending feed**
- **keyword search**
- **user profiles and their latest posts**
- **full post details**, including the complete text of long posts
- **comments** with inline replies

Export to JSON, CSV or Excel, or call it from your code, n8n, Make, Zapier or an AI agent (MCP).

It talks to Weibo's own JSON endpoints with plain HTTP requests (no browser), so runs are fast and cheap. Weibo's visitor cookies, pacing and rate-limit backoff are all handled for you.

### What you can scrape

| Source | Input | You get |
| --- | --- | --- |
| 🔥 **Hot search** | toggle on | About 50 trending topics with rank, heat score and label (热/新/沸/爆). Schedule it to track trends hour by hour. |
| 📈 **Trending posts** | number of posts | Posts from Weibo's trending feed (热门微博), with full stats. |
| 🔎 **Keyword search** | `原神`, `#话题#`, `iPhone`... | Posts ranked as Top (综合) or Latest (实时). |
| 👤 **Users** | `weibo.com/u/1669879400`, user ID or screen name | Profile (followers, following, post count, verification) **plus their latest posts**. |
| 📝 **Post URLs** | `weibo.com/<uid>/<mblogid>`, `m.weibo.cn/detail/<id>`, IDs | Full post details. |
| 💬 **Comments** | toggle on | Hot comments and their inline replies: text, likes, reply count, time, author. |

### Why this scraper

- **About 40% cheaper** than the most-used Weibo scrapers on the Store (see Pricing).
- **No login needed** for any mode.
- **16-digit IDs kept as strings**, so JavaScript, Excel and Google Sheets never round them.
- **Full text of long posts.** Weibo truncates them in lists; the scraper fetches the rest automatically.
- **Clean output:** plain text with emoji kept as `[doge]`, hashtags extracted, times in ISO 8601 UTC.
- **Privacy-minded:** no gender, birthday, avatar or IP-location ("发布于/来自 …") fields are collected.
- **Built to keep working:** global backoff when Weibo rate-limits, automatic switch to Apify Proxy if the IP gets blocked, daily automated health test.

### Good to know: guest limits

Weibo shows logged-out visitors only the **first page** of each list:

- about 10–20 posts per search keyword
- about 10 latest posts per user
- about 20 hot comments per post

Everything that is fetched item by item has no such limit: hot search, the trending feed, profiles and post URLs.

To go deeper, paste the Cookie header of your own logged-in `m.weibo.cn` session into **Weibo cookie (optional)**. It is stored encrypted and only sent to weibo.cn.

### How to use it

1. Click **Try for free**.
2. Turn on *Hot search*, or add keywords, users or post URLs.
3. Optionally turn on *Include comments*.
4. Click **Start** and download the results from the **Output** tab, which has Posts, Hot search, Users and Comments views.

#### Input example

```json
{
    "hotSearch": true,
    "searchQueries": ["原神", "#国庆#"],
    "searchType": "latest",
    "users": ["https://weibo.com/u/1669879400"],
    "hotPosts": 50,
    "maxResults": 20,
    "includeComments": true,
    "maxCommentsPerPost": 20
}
```

### Output

Every record has a `type` field: `post`, `user`, `comment` or `hotTopic`.

#### Post

```json
{
    "type": "post",
    "id": "5349541735302178",
    "mblogid": "RkMO1mfl0",
    "url": "https://weibo.com/6593199887/RkMO1mfl0",
    "text": "原神 #原神# #原神逐月节# \n\n《原神》剧情PV-「燕归来」...",
    "isLongText": false,
    "textTruncated": false,
    "hashtags": ["原神", "原神逐月节"],
    "createdAt": "2026-10-02T04:00:02Z",
    "reposts": 412,
    "comments": 148,
    "likes": 2229,
    "pictureUrls": [],
    "mediaType": "video",
    "mediaTitle": "原神的微博视频",
    "isRepost": false,
    "repostOfId": null,
    "authorId": "6593199887",
    "authorName": "原神",
    "authorFollowers": 11518000,
    "authorVerified": true,
    "authorVerifiedReason": "原神官方微博",
    "source": "search",
    "searchQuery": "原神",
    "position": 2,
    "scrapedAt": "2026-10-03T13:51:06Z"
}
```

#### Hot search topic

```json
{
    "type": "hotTopic",
    "rank": 2,
    "topic": "克罗地亚0比7英格兰",
    "heat": 188232,
    "label": null,
    "searchUrl": "https://s.weibo.com/weibo?q=%23%E5%85%8B%E7%BD%97%E5%9C%B0%E4%BA%9A0%E6%AF%947%E8%8B%B1%E6%A0%BC%E5%85%B0%23",
    "scrapedAt": "2026-10-03T13:51:05Z"
}
```

#### User

```json
{
    "type": "user",
    "id": "1669879400",
    "url": "https://weibo.com/u/1669879400",
    "name": "Dear-迪丽热巴",
    "description": "一只喜欢默默表演的小透明。...",
    "followers": 82552000,
    "following": 294,
    "posts": 1936,
    "verified": true,
    "verifiedType": 0,
    "verifiedReason": "嘉行传媒签约演员",
    "memberRank": 9,
    "scrapedAt": "2026-10-03T13:51:10Z"
}
```

#### Comment

```json
{
    "type": "comment",
    "postId": "5348998560880374",
    "commentId": "5349330078925787",
    "rootId": null,
    "isReply": false,
    "text": "单身",
    "likes": 0,
    "replyCount": 0,
    "createdAt": "2026-10-01T13:58:58Z",
    "authorId": "7949203148",
    "authorName": "第二仙人",
    "scrapedAt": "2026-10-03T13:51:07Z"
}
```

### Pricing

Pay per result, no subscription. You are only charged for records that land in your dataset.

| Record | Event | Price |
| --- | --- | --- |
| Post | `post` | $15.00 per 1,000 |
| User profile | `user` | $15.00 per 1,000 |
| Comment or reply | `comment` | $20.00 per 1,000 |
| Hot search topic | `hot-topic` | $20.00 per 1,000 |

The exact current prices are always shown on the **Pricing** tab. Set *Maximum cost per run* in the run options and the scraper stops cleanly when it is reached. A full hot-search snapshot (~50 topics) costs about $1.00.

### FAQ

**Why do I only get about 10 posts per keyword?**
Weibo shows logged-out visitors only the first page of search results and timelines. Use several related keywords, choose *Latest* to catch new posts on a schedule, or add your own Weibo cookie for deeper pages.

**Can I track the hot search over time?**
Yes. Create a task with *Hot search* on and schedule it, for example hourly. Each run gives a timestamped snapshot with rank and heat.

**Do I need a proxy?**
No. The scraper paces itself, and on the Apify platform it automatically switches to Apify Proxy if Weibo blocks its IP. If Weibo still blocks for more than 5 minutes, the run stops early and keeps everything it already scraped.

**Is scraping Weibo legal?**
This Actor collects only publicly visible data and leaves out personal details such as gender, birthday and location. You are responsible for how you use the data; check Weibo's terms and the data protection laws that apply to you (GDPR, PIPL...).

### Feedback

Found a bug or need another field? Open an issue on the **Issues** tab, it is usually fixed within a few days.

# Actor input Schema

## `hotSearch` (type: `boolean`):

Get the current Weibo hot search ranking (about 50 topics with heat score and label). Great for scheduled trend tracking.

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

Keywords or #hashtags# to search posts for, in Chinese or English.

## `searchType` (type: `string`):

Top (综合, most relevant) or Latest (实时, newest first).

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

Profile URLs (weibo.com/u/1669879400, m.weibo.cn/u/...), numeric user IDs or exact screen names. Returns the profile plus their latest posts.

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

Post links (weibo.com/<uid>/<mblogid>, m.weibo.cn/detail/<id>), numeric post IDs or mblogids. Returns full post details.

## `hotPosts` (type: `integer`):

How many posts to take from Weibo's trending feed (0 = off).

## `maxResults` (type: `integer`):

Upper limit of posts for each search keyword and each user. Without a cookie Weibo shows guests only the first page (about 10 posts).

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

Also scrape the hot comments (and their inline replies) of every post found.

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

Limit of comments + replies per post. Guests get the first page (about 20 comments).

## `expandLongText` (type: `boolean`):

Weibo truncates long posts in lists; fetch the full text for them (one extra request per long post).

## `weiboCookie` (type: `string`):

Optional. The Cookie header of your own logged-in m.weibo.cn session, used only to go past the first page of searches, timelines and comments. Stored encrypted and only sent to weibo.cn.

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

Not needed in most cases: the scraper switches to Apify Proxy on its own if Weibo blocks it.

## Actor input object example

```json
{
  "hotSearch": true,
  "searchQueries": [
    "原神"
  ],
  "searchType": "top",
  "users": [],
  "postUrls": [],
  "hotPosts": 0,
  "maxResults": 20,
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "expandLongText": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `allResults` (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 = {
    "hotSearch": true,
    "searchQueries": [
        "原神"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("v1tal615/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 = {
    "hotSearch": True,
    "searchQueries": ["原神"],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("v1tal615/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 '{
  "hotSearch": true,
  "searchQueries": [
    "原神"
  ],
  "maxResults": 20
}' |
apify call v1tal615/weibo-scraper --silent --output-dataset

```

## MCP server setup

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