# Weibo Snapshot｜微博帖子/热评/用户/热搜 快照（免登录） (`ahuang/weibo-snapshot`) Actor

Snapshot public Weibo posts (full long text), top comments, user profiles + latest 10 posts, search page 1 and the hot search board. No login. 免登录抓取微博快照：帖子全文、热评、用户与最新10条、搜索首页和热搜榜。

- **URL**: https://apify.com/ahuang/weibo-snapshot.md
- **Developed by:** [HehuanHuang](https://apify.com/ahuang) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 post detail｜帖子详情

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 Snapshot｜微博帖子/热评/用户/热搜 快照（免登录）

[English](#english) | [中文](#中文)

### English

**Weibo Snapshot – posts, top comments, profiles & hot search (no login)**

A fast, no-login snapshot of public Weibo data. We tell you exactly what you get — and what you don't — before you run it.

| Input | Output | Support |
|---|---|---|
| Post URL or ID | Post detail incl. full long text, counts, images, topics | ✅ Full |
| ↳ same post | Hot comments, **first page only (~20)** + first page of replies | ⚠️ Limited |
| User ID or profile URL | Profile (followers, following, posts, verification, bio) | ✅ Full |
| ↳ same user | **Latest 10 posts only** | ⚠️ Limited |
| Keyword | Search results, **page 1 only (~4–5 results in guest mode)** | ⚠️ Limited |
| (toggle) | Current hot search board (rank, keyword, heat) | ✅ Full |

**Note:** user posts and search results show list-view text; long posts are cut at ~145 chars and flagged `text_truncated: true`. Use post mode for full text.

**Not supported:** comment/post/search pages 2+, repost lists, full history, private content. Vanity profile domains are not supported (use numeric UID or `/u/<uid>`). Follower counts are returned as Weibo text (e.g. `"8254.9万"`).

**Use cases:** brand & sentiment spot checks, scheduled hot-search tracking, giving AI agents / RAG live Chinese social context, KOL quick profiles.

**Reliability:** no login, gentle rate (1–2 requests/s) with automatic backoff. If Weibo asks for login (ok=-100), you get a clear `notice` record and are **not charged**.

**Compliance:** public data only. Follow Weibo's Terms and PIPL; don't build profiles of private individuals.

### 中文

**微博快照：帖子、热门评论、用户资料、热搜（免登录）**

免登录、快速抓取微博公开数据快照。能拿到什么、拿不到什么，运行前就写清楚。

| 输入 | 输出 | 支持程度 |
|---|---|---|
| 帖子链接或 ID | 帖子详情（含长文全文）、互动数、图片、话题 | ✅ 完整 |
| ↳ 同一帖子 | 热门评论**仅首页（约 20 条）**，楼中楼回复仅首页 | ⚠️ 有限 |
| 用户 ID 或主页链接 | 用户资料（粉丝、关注、微博数、认证、简介） | ✅ 完整 |
| ↳ 同一用户 | **仅最新 10 条微博** | ⚠️ 有限 |
| 关键词 | 搜索结果**仅第 1 页（游客模式约 4–5 条）** | ⚠️ 有限 |
| （开关） | 当前热搜榜（排名、关键词、热度） | ✅ 完整 |

**注意：** 用户微博和搜索结果的正文来自列表，长文会被截到约 145 字，并标记 `text_truncated: true`；要全文请用帖子模式。

**不支持：** 评论/微博/搜索第 2 页及以后、转发列表、历史全量、非公开内容。个性域名不支持（请用数字 UID 或 `/u/<uid>`）。粉丝数按微博原文输出（如 `"8254.9万"`）。

**用途：** 品牌与舆情抽查、定时追踪热搜、给 AI 智能体/RAG 提供实时中文社媒语境、KOL 快速画像。

**稳定性：** 免登录，每秒 1–2 个请求并自动退避。若微博要求登录（ok=-100），会输出清楚的 `notice` 记录，**不收费**。

**合规：** 仅公开数据。请遵守微博服务条款和《个人信息保护法》，不要对个人建档。

#### Input｜输入

- `postUrls`: post links (`m.weibo.cn/detail/<mid>`, `weibo.com/<uid>/<bid>`) or mid/bid ｜帖子链接或 ID
- `maxCommentsPerPost` (≤20), `includeReplies`, `maxRepliesPerComment`
- `userUrls`: numeric UID or `/u/<uid>` link (vanity domains not supported) ｜数字 UID 或 /u/ 链接（不支持个性域名）; `maxPostsPerUser` (≤10)
- `searchKeywords`, `maxSearchResults`; `includeTrending`, `maxTrendingItems`

#### Output｜输出（`type` field = charged event）

| `type` | Event｜事件 | Key fields｜主要字段 |
|---|---|---|
| `post` | `post` | `mid`, `bid`, `url`, `text`, `is_long_text`, `text_truncated` (user-post/search-result: list text cut at ~145 chars for long posts; use post mode for full text｜列表里的长文约 145 字，全文请用帖子模式), `published_at`, `source`, `region`, `author{uid,screen_name,verified,followers_count}`, `stats{reposts,comments,likes}`, `pics`, `video_url`, `retweeted_mid` |
| `user-post` | `user-post` | same as post + `uid` ｜同 post，另含 `uid` |
| `comment` | `comment` | `mid`, `comment_id`, `parent_id` (null = top-level｜为空即一级评论), `text`, `published_at`, `likes`, `reply_count`, `region`, `author` |
| `user-profile` | `user-profile` | `uid`, `screen_name`, `description`, `gender`, `verified`, `verified_reason`, `followers_count`, `follow_count`, `statuses_count`, `avatar`, `url` |
| `search-result` | `search-result` | `keyword`, `rank` + post fields ｜另含帖子字段 |
| `hot-search-snapshot` | `hot-search-snapshot` (once per board｜整榜 1 次) | `fetched_at`, `item_count`, `items[{rank, keyword, hot_value, label, pinned, search_url}]` (rank 0 = pinned｜置顶) |
| `notice` / `error` | free｜免费 | `dataType`, `notice` / `error`, `status` |

Example｜示例:

```json
{"type":"post","input":"https://m.weibo.cn/detail/5356593195521249","mid":"5356593195521249","text":"…","published_at":"Wed Oct 22 10:00:00 +0800 2026","stats":{"reposts":12,"comments":340,"likes":5600},"author":{"uid":"1669879400","screen_name":"…"}}
```

#### Pricing｜定价（pay per event / 按事件计费）

| Event | EN | 中 | Price |
|---|---|---|---|
| `post` | Post detail (incl. long text) | 帖子详情 | $0.003 |
| `user-post` | Each of a user's latest posts | 用户最新微博（每条） | $0.0015 |
| `comment` | Each comment / reply | 每条评论/回复 | $0.0008 |
| `user-profile` | Profile | 用户资料 | $0.003 |
| `search-result` | Each search result | 每条搜索结果 | $0.0015 |
| `hot-search-snapshot` | Whole hot search board | 整张热搜榜 | $0.005 |

`notice` / `error` records and failed requests are free. No startup fee. ｜ `notice`、`error` 记录和失败请求不收费。无启动费。

# Actor input Schema

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

m.weibo.cn/detail/…、weibo.com/<uid>/<bid> 链接，或数字 mid / bid。每条返回帖子详情（含长文全文）+ 第一页热门评论。/ Post links or IDs. Returns post detail (full long text) + first page of hot comments.

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

有限支持：游客只能拿第一页热门评论（约 20 条），不翻页。0 = 不抓评论。/ Limited: guest mode returns only the first page of hot comments (~20), no pagination. 0 = skip.

## `includeReplies` (type: `boolean`):

有限支持：每条评论只抓第一页回复，每次多 1 个请求。/ Limited: first page of replies per comment only; one extra request each.

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

楼中楼回复按 comment 事件计费。/ Replies are charged as comment events.

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

m.weibo.cn/u/<uid>、weibo.com/u/<uid> 或数字 UID（不支持自定义域名）。返回用户资料 + 最新 10 条微博。/ Numeric UID or /u/<uid> link (custom vanity domains not supported). Returns profile + latest 10 posts.

## `maxPostsPerUser` (type: `integer`):

有限支持：游客只能拿最新一页（约 10 条），无法翻历史。/ Limited: guest mode returns only the latest page (~10), no history. 每条按 user-post 计费。/ Each charged as user-post.

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

有限支持：仅第 1 页，游客模式约 4–5 条。/ Limited: first page only, ~4–5 results in guest mode.

## `maxSearchResults` (type: `integer`):

实际数量受第一页限制。/ Actual count is capped by the first page.

## `includeTrending` (type: `boolean`):

抓取当前实时热搜榜（约 50 条），整张榜按 1 次 hot-search-snapshot 计费。/ Fetch the current real-time hot search board (~50 items), charged once per board as hot-search-snapshot.

## `maxTrendingItems` (type: `integer`):

快照中最多保留的热搜条数，不影响计费。/ Max items kept in the snapshot; does not change the charge.

## Actor input object example

```json
{
  "postUrls": [
    "https://m.weibo.cn/detail/5356593195521249"
  ],
  "maxCommentsPerPost": 20,
  "includeReplies": false,
  "maxRepliesPerComment": 5,
  "maxPostsPerUser": 10,
  "maxSearchResults": 20,
  "includeTrending": false,
  "maxTrendingItems": 50
}
```

# Actor output Schema

## `results` (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 = {
    "postUrls": [
        "https://m.weibo.cn/detail/5356593195521249"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahuang/weibo-snapshot").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 = { "postUrls": ["https://m.weibo.cn/detail/5356593195521249"] }

# Run the Actor and wait for it to finish
run = client.actor("ahuang/weibo-snapshot").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 '{
  "postUrls": [
    "https://m.weibo.cn/detail/5356593195521249"
  ]
}' |
apify call ahuang/weibo-snapshot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ahuang/weibo-snapshot"
        }
    }
}
```

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/6QxADhr6I0jdIk38L/builds/keihAltNFod7oOBjh/openapi.json
