# Weibo Scraper (`sian.agency/weibo-scraper`) Actor

Weibo scraper — extract Weibo posts, user profiles, fans, followers, and keyword search results from Sina Weibo. KOL discovery, social graph mapping, sentiment data, and China market research. Five operations, one clean dataset per run. No API key needed.

- **URL**: https://apify.com/sian.agency/weibo-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Social media, Marketing, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $18.75 / 1,000 weibo details

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Weibo Scraper — Posts, Profiles, Fans, Followers & Search 📱

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Taobao & Tmall](https://img.shields.io/badge/SI%C3%81N-Taobao%20%26%20Tmall-FF4F00)](https://apify.com/sian.agency/taobao-tmall-product-scraper?fpr=sian) [![Kwai & Kuaishou](https://img.shields.io/badge/SI%C3%81N-Kwai%20%26%20Kuaishou-FF4906)](https://apify.com/sian.agency/kwai-kuaishou-scraper?fpr=sian) [![Instagram Transcripts](https://img.shields.io/badge/SI%C3%81N-Instagram%20Transcripts-E4405F)](https://apify.com/sian.agency/instagram-ai-transcript-extractor?fpr=sian)

#### 🎉 Five scrapers in one — extract Weibo posts, user profiles, fans, followers, and date-ranged keyword search from Sina Weibo
##### Built for China-market researchers, KOL agencies, brand monitoring teams, and journalists who need clean structured Weibo data — no Weibo developer account, no API key, no setup headaches

---

### 📋 Overview

**Tired of brittle DIY Weibo scrapers that break every time Sina ships an interface tweak?** This actor delivers reliable, flat structured datasets from China's biggest microblog (550M+ MAU) — one clean run per task, one tidy dataset out.

**Why teams choose SIÁN for Weibo data:**
- ✅ **Five operations, one actor**: Weibo detail · user profile · user fans · user followers · keyword search
- 🌐 **The only Weibo actor on Apify with full social graph extraction** — competitors stop at posts and profiles; we expose fan and follower lists
- 📅 **Date-range search** — track how a topic surged or faded across weeks (rivals search current only)
- 🎯 **Production-ready data shape**: curated camelCase aliases (`weiboId`, `userId`, `screenName`, `repostCount`, `attitudeCount`, `text`, `postedAt`…) PLUS the raw upstream fields for power users
- 💰 **Pay-per-result pricing** — only charged for successful extractions, never for empty pages or errors
- 💎 **No Weibo account, no API key, no proxies** — paste a post ID, UID, or keyword and run
- ✨ **NEW**: 16-digit Weibo post IDs preserved at full precision (most scrapers silently corrupt them); HTTPS auto-normalized on every avatar, cover, and picture URL

---

### ✨ Features

- 📝 **Weibo Detail**: full post by ID with 50+ fields — text, location, topics, @-mentions, repost/comment/attitude (like) counts, attached pictures, creator info, posting client, region
- 👤 **User Profile**: full profile by UID — followers, following, statuses count, verification reason, location, gender, bio, membership tier, avatar set, cover image
- 👥 **User Fans**: list of accounts that follow a target user (~20 per page, respects Weibo privacy settings)
- ➡️ **User Followers**: list of accounts a target user follows (~20 per page, respects Weibo privacy settings)
- 🔍 **Search Weibo**: keyword search with optional start/end date (defaults to last 30 days), ~14 posts/page, Chinese/English/mixed queries supported
- 🖼️ **HTTPS-normalized URLs**: every avatar, cover, picture, embedded video URL ready to embed
- 🆔 **BigInt-safe IDs**: 16-digit Weibo post IDs preserved (no precision loss → no broken cross-operation joins)
- 🔁 **Auto-retry transient failures**: HTTP 502/503/504 and upstream code 301 retried with exponential backoff
- 📄 **Pagination cap**: stream through up to 50 pages per run with one input parameter
- 📊 **HTML run report**: saved automatically to key-value store with success rate, errors, duration, inputs

---

### 🎬 Quick Start

Paste a Weibo keyword to find trending Chinese conversations — no Weibo developer account or Sina API required.

```bash
curl -X POST https://api.apify.com/v2/acts/sian.agency~weibo-scraper/runs?token=YOUR_TOKEN \
-d '{"operation":"searchWeibo","keyword":"北京","maxPages":3}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Pick an operation

Choose what you want to extract: Search Weibo, Weibo Detail, User Profile, User Fans, or User Followers.

#### Step 2: Enter the input

A keyword (search), a Weibo post ID (detail), or a user UID (profile / fans / followers).

#### Step 3: Click "Start"

Results stream into the Apify dataset as they come back. Download as JSON, CSV, or Excel directly from the Console.

**That's it! In under 60 seconds, you'll have:**

- A flat, structured dataset (no nested Weibo card JSON to parse)
- Curated camelCase fields plus the raw response for power users
- An HTML report summarizing the run
- Ready-to-embed HTTPS media URLs (avatars, pictures, covers)

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `operation` | string (enum) | Yes | One of: `weiboDetail` · `userDetail` · `userFans` · `userFollowers` · `searchWeibo` |
| `weiboId` | string | If operation is `weiboDetail` | Numeric Weibo post ID (also called `mid`). Find it in any `https://m.weibo.cn/detail/{ID}` URL or in any search result's `weiboId` field. |
| `userId` | string | If operation is `userDetail`, `userFans`, or `userFollowers` | Numeric Weibo user ID (UID). Find it in any `https://weibo.com/u/{ID}` URL or in any result row's `userId` field. |
| `keyword` | string | If operation is `searchWeibo` | Search query (Chinese, English, or mixed — e.g. `北京`, `Tesla`, `美食`) |
| `startDay` | string | No (search only) | Earliest date `YYYY-MM-DD`. Defaults to 30 days ago. |
| `endDay` | string | No (search only) | Latest date `YYYY-MM-DD`. Defaults to today. |
| `maxPages` | integer | No | Pages to fetch for paginated operations (default 5, max 50) |

**Example — Search trending Weibo posts:**

```json
{
  "operation": "searchWeibo",
  "keyword": "iPhone",
  "startDay": "2026-04-12",
  "endDay": "2026-05-12",
  "maxPages": 3
}
```

**Example — Map a creator's fan network:**

```json
{
  "operation": "userFans",
  "userId": "2760523085",
  "maxPages": 5
}
```

**Example — Get full Weibo post details by ID:**

```json
{
  "operation": "weiboDetail",
  "weiboId": "5249718969175092"
}
```

***

### 📤 Output

Results are saved to the Apify dataset with **40+ curated fields** plus all raw upstream fields. Filter by `_operation` to split modes; three predefined dataset views ready to open in Apify Console (Overview / Posts / Users).

| Field | Type | Description |
|-------|------|-------------|
| `weiboId` | string | Weibo post ID (16-digit, precision preserved) |
| `bid` | string | Base-62 short post ID |
| `weiboPageUrl` | string | Direct link to the mobile Weibo post page |
| `text` | string | Post body (Chinese / English / mixed) |
| `textLength` | integer | Character count of post text |
| `isLongText` | boolean | True if long-form (>140 char) post |
| `postedAt` | string | Upload timestamp (RFC-2822 style) |
| `repostCount` | integer | Reposts (转发) |
| `commentCount` | integer | Comments (评论) |
| `attitudeCount` | integer | Likes (点赞) |
| `regionName` | string | Region the post was made from |
| `source` | string | Client app used to post |
| `topics` | array | Hashtag / topic entities |
| `atUsers` | array | @-mention entities |
| `picCount` | integer | Number of attached pictures |
| `picUrls` | array | All attached picture URLs |
| `videoUrl` | string | Embedded video URL (if any) |
| `userId` | string | Creator's Weibo UID |
| `screenName` | string | Creator's display name |
| `verified` | boolean | Verified badge |
| `verifiedReason` | string | Verification description |
| `followersCount` | integer | Followers / fans (profile rows) |
| `friendsCount` | integer | Following count (profile rows) |
| `statusesCount` | integer | Total post count (profile rows) |
| `gender` | string | Self-reported gender (profile rows) |
| `location` | string | Self-reported location (profile rows) |
| `description` | string | Profile bio (profile rows) |
| `avatarUrl` | string | Profile picture HD (HTTPS) |
| `userPageUrl` | string | Direct link to Weibo profile page |

**Example dataset row (search Weibo):**

```json
{
  "_operation": "searchWeibo",
  "_sourceKeyword": "Tesla",
  "weiboId": "5297759758582315",
  "bid": "QkRpSCuRm",
  "userId": "2008330545",
  "screenName": "KeepItMelloMachine_",
  "text": "New Tesla Supercharger: Taoyuan, Yangmei, Taiwan - Sanyuan St…",
  "repostCount": 0,
  "commentCount": 0,
  "attitudeCount": 0,
  "postedAt": "2026-05-12 11:17:33",
  "weiboPageUrl": "https://m.weibo.cn/detail/5297759758582315",
  "userPageUrl": "https://weibo.com/u/2008330545",
  "status": "success"
}
```

***

### 💼 Use Cases & Examples

#### 1. KOL & Influencer Discovery for Chinese Brands

**Influencer marketing teams** at brands launching in China shortlisting Weibo KOLs.

**Input:** Search Weibo with keyword "美妆" (beauty) or "数码" (digital), then User Profile on top creators
**Output:** 14 posts per page with full creator data on follow-up
**Use:** Build a ranked KOL shortlist in 5 minutes instead of 5 hours of manual scrolling.

#### 2. Social Graph Mapping (unique to this actor)

**Influencer-marketing agencies** mapping a creator's audience and adjacent network.

**Input:** User Fans + User Followers operations on a target UID
**Output:** Up to 1,000 fan rows and 1,000 follower rows with full profile data
**Use:** Find adjacent creators in the niche, identify community clusters, spot influence overlap before signing a creator.

#### 3. China Market-Entry Research

**Market intelligence analysts** monitoring Weibo conversation before launching a brand in China.

**Input:** Search Weibo with industry keyword + date range across 10 pages
**Output:** 140 posts with engagement metrics, locations, topics, posting clients
**Use:** Quantify conversation volume, spot regional concentration, identify trending themes weeks before launch.

#### 4. Brand Monitoring on Weibo

**Brand managers** tracking unauthorized mentions, branded-content performance, and counterfeits on China's biggest microblog.

**Input:** Scheduled Search Weibo with brand or product keyword
**Output:** Every new mention with creator + engagement
**Use:** React to viral mentions in near real-time; flag counterfeits & PR risks.

#### 5. Sentiment & Crisis Monitoring

**NLP / brand-perception teams** analyzing Weibo reactions during a campaign or crisis.

**Input:** Weibo Detail on viral post IDs, plus Search Weibo with crisis keywords
**Output:** Full post payloads with text, topics, regions, repost/comment/like counts
**Use:** Feed a Chinese-language sentiment model; track crisis evolution hour by hour.

#### 6. Trend & Topic Tracking

**Content strategists** at agencies tracking Weibo virality patterns weekly.

**Input:** Scheduled Search Weibo with niche keywords + date filter
**Output:** Time-series of conversation volume + engagement velocity
**Use:** Feed a trend dashboard; spot rising topics before they break.

#### 7. Journalism & China Research

**Journalists and academic researchers** tracking topic surges in Chinese public discourse.

**Input:** Date-windowed Search Weibo across campaign or news event
**Output:** Comprehensive corpus of public discussion with metadata
**Use:** Compare conversation volume across events; quantify Chinese public reaction with timestamps.

***

### 🔗 Integration Examples

#### JavaScript / Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/weibo-scraper').call({
  operation: 'searchWeibo',
  keyword: '北京',
  maxPages: 3,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/weibo-scraper').call(
    run_input={'operation': 'userFans', 'userId': '2760523085', 'maxPages': 5}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~weibo-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"operation":"weiboDetail","weiboId":"5249718969175092"}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: schedule daily or webhook from a brief-creator
2. **HTTP Request**: call the actor's run-sync endpoint with `operation` + input
3. **Process**: filter by `_operation` and pivot on `weiboId` / `userId`
4. **Action**: push to BigQuery, Notion, Airtable, or a Slack alert

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **Full feature access** — every operation, every field, no quality compromise
- No credit card required
- Perfect for evaluating data depth before you commit

#### PAID Tier (Production Ready)

- **Unlimited** results per run
- Faster processing — no FREE-tier throttling
- Pay-per-result: only charged for successful rows, never for errors or empty pages
- Volume discounts up to 50% off at GOLD/PLATINUM/DIAMOND Apify tiers

💰 **Best price on the market for premium Weibo data** — see pricing tab for the full per-event ladder. Single-row operations (Weibo Detail, User Profile) carry richer payloads at premium pricing; bulk operations (Fans, Followers, Search) are priced to scale.

🔗 [View current pricing](https://apify.com/sian.agency/weibo-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: How many posts / users can I extract per run?**
A: FREE tier: full feature access for evaluation. PAID tier: unlimited — capped only by `maxPages` (default 5, max 50) and platform-side data availability.

**Q: Does it work with private profiles or shadow-banned accounts?**
A: No — only publicly accessible Weibo content is supported. Private accounts return empty rows; banned users return error rows with the translated message.

**Q: Why do some fan / follower lists return empty?**
A: A significant share of Weibo users restrict public access to their fan or follower list. The actor detects this and emits a single translated explanatory row instead of crashing. Try a different UID.

**Q: What output formats are available?**
A: JSON, CSV, Excel, RSS, HTML, XML — export directly from the Apify dataset UI or via API.

**Q: Why are Weibo post IDs 16 digits — does the dataset preserve them?**
A: Yes. We use a bigint-safe JSON parser so 16-digit IDs round-trip without precision loss. Most scrapers silently corrupt these via JavaScript's `Number.MAX_SAFE_INTEGER` overflow and break cross-operation joins.

**Q: Can I search in Chinese?**
A: Absolutely. Chinese, English, and mixed queries all work — Chinese surfaces more native conversations; English/brand queries surface international mentions.

**Q: How does the date filter work for search?**
A: Pass `startDay` / `endDay` in `YYYY-MM-DD` format. The actor defaults to the last 30 days when omitted. Tight date windows return more relevant results.

**Q: Is this legal?**
A: Yes — we only extract publicly available data. See the [Legal section](#-is-it-legal-to-scrape-data) below.

**Q: How long does processing take?**
A: ~3–5 seconds per page for paginated operations; ~3–5 seconds for single-row operations.

***

### 🐛 Troubleshooting

**Page returned no rows / empty dataset**

- Verify the input is correct: Weibo ID has 16 digits, UID is numeric, keyword is non-empty
- Check that the post / user still exists on Weibo (try opening `weiboPageUrl` or `userPageUrl` from a result row)
- For fans / followers: not every account exposes these publicly — Weibo respects per-user privacy settings

**HTTP errors / "Data source temporarily unavailable" rows**

- The actor auto-retries transient failures up to 4 times with exponential backoff. If you still see error rows, the upstream is rate-limited or under maintenance — retry the run after a few minutes.

**16-digit Weibo IDs look truncated in spreadsheet exports**

- Spreadsheet apps (Excel, Google Sheets) auto-cast long integers to scientific notation. The actor preserves them as strings in JSON; in CSV exports, format the `weiboId` column as Text before opening.

**Pagination ends earlier than `maxPages` requested**

- That means the platform served the last page. Check `_page` on the last row. Not all keywords or users have 50 pages of content.

***

### ⚠️ Trademark Disclaimer

This actor is an **independent scraping tool** and is not affiliated with, endorsed by, or sponsored by Sina Corporation or any of its subsidiaries. "Weibo" and "Sina" are used solely in a descriptive sense to identify the public data source the actor reads from. **Weibo®** and **Sina®** are trademarks of their respective owners. All other trademarks are the property of their respective owners.

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses or private contact information. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

***

### ✨ More by SIÁN Agency

Part of the SIÁN Agency Apify portfolio — production-grade scrapers and AI tools used by agencies, research teams, and brands. A few that pair well with Weibo:

**China & E-commerce**

- [Kwai & Kuaishou Scraper](https://apify.com/sian.agency/kwai-kuaishou-scraper?fpr=sian) — China's #2 short-video platform
- [Taobao & Tmall Product Scraper](https://apify.com/sian.agency/taobao-tmall-product-scraper?fpr=sian) — China's #1 marketplace: products, search, shop catalogs, reviews

**Short-Video & Social Media**

- [Best TikTok AI Transcript Extractor](https://apify.com/sian.agency/best-tiktok-ai-transcript-extractor?fpr=sian) — TikTok video → text with metadata
- [Instagram AI Transcript Extractor](https://apify.com/sian.agency/instagram-ai-transcript-extractor?fpr=sian) — Reels & Stories transcription
- [Facebook AI Transcript Extractor](https://apify.com/sian.agency/facebook-ai-transcript-extractor?fpr=sian) — Facebook video → text
- [YouTube Shorts AI Transcript & Metadata Extractor](https://apify.com/sian.agency/youtube-shorts-ai-transcript-and-metadata-extractor?fpr=sian) — Shorts data + transcripts

**Real Estate (Global)**

- [Zillow Property Scraper](https://apify.com/sian.agency/zillow-property-scraper?fpr=sian) · [Airbnb Scraper](https://apify.com/sian.agency/airbnb-property-scraper?fpr=sian) · [Bayut (Dubai)](https://apify.com/sian.agency/bayut-property-scraper?fpr=sian) · [Redfin](https://apify.com/sian.agency/redfin-property-scraper?fpr=sian) · [StreetEasy (NYC)](https://apify.com/sian.agency/streeteasy-property-scraper?fpr=sian) · [Zoopla (UK)](https://apify.com/sian.agency/zoopla-property-scraper?fpr=sian) · [Realtor.com](https://apify.com/sian.agency/realtor-property-scraper?fpr=sian)

[Browse all SIÁN actors →](https://apify.com/sian.agency?fpr=sian)

***

### ⭐ Leave a 5-Star Review

Love this actor? **[Leave a 5-star review here](https://apify.com/sian.agency/weibo-scraper/reviews)** — it helps us build more features for you and lets other teams find it.

***

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue in the actor's Apify Console Issues tab
- 📧 <hello@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `operation` (type: `string`):

🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.

- **📝 Weibo Detail** — deep scrape of a single post by ID (text, location, topics, @-mentions, repost/comment/attitude counts, pics, creator info)
- **👤 User Profile** — full profile by user ID (followers, following, statuses count, verified reason, location, avatar, gender, bio)
- **👥 User Fans** — list of users who follow this account (~20 per page; respects privacy settings)
- **➡️ User Followers** — list of accounts this user follows (~20 per page; respects privacy settings)
- **🔍 Search Weibo** — keyword search across Weibo posts with optional date range, paginated (~14 results/page)

💡 **TIP:** To combine operations, run the actor multiple times with different configurations.

## `weiboId` (type: `string`):

📝 **Required for the `Weibo Detail` operation.**

The numeric Weibo post ID (also called `mid`). You can find it:

- In any mobile Weibo URL: `https://m.weibo.cn/detail/{ID}` → the trailing segment
- In the `weiboId` / `id` field of any search result row

💡 **TIP:** To analyze a batch of posts, run a `Search Weibo` operation first, copy `weiboId` values from the result rows, then run `Weibo Detail` per ID.

⚠️ **Ignored** for User Profile, User Fans, User Followers, and Search operations.

## `userId` (type: `string`):

👤 **Required for `User Profile`, `User Fans`, and `User Followers` operations.**

The numeric Weibo user ID (UID). You can find it:

- In any profile URL: `https://weibo.com/u/{ID}`
- In the `userId` / `user_id` field of any post, search, or fan/follower result row

💡 **TIP:** To build a creator catalog, run `Search Weibo` with a keyword first, then use the top `userId` values to drill into profiles, fans, and followers.

⚠️ **Note:** Some accounts restrict public access to their fan/follower lists — those operations will return an explanatory empty row.

⚠️ **Ignored** for Weibo Detail and Search operations.

## `keyword` (type: `string`):

🔍 **Required for the `Search Weibo` operation.**

Any Weibo search query. Supports Chinese, English, and mixed queries:

- `北京` (Beijing)
- `Tesla`
- `美食` (food)
- `iPhone`

💡 **TIP:** Chinese queries surface native creators and conversations; English/brand queries surface international and brand-mention traffic.

## `startDay` (type: `string`):

📅 **Optional for `Search Weibo`.** Earliest date to include in search results.

Format: `YYYY-MM-DD` (e.g. `2025-04-01`). Defaults to **30 days ago** if left blank.

💡 **TIP:** Tight date windows return more targeted results. Use the start/end pair to track a topic over a specific campaign or news event.

⚠️ **Ignored** for non-search operations.

## `endDay` (type: `string`):

📅 **Optional for `Search Weibo`.** Latest date to include in search results.

Format: `YYYY-MM-DD` (e.g. `2025-05-12`). Defaults to **today** if left blank.

⚠️ **Ignored** for non-search operations.

## `maxPages` (type: `integer`):

📄 **Applies to paginated operations** (User Fans, User Followers, Search Weibo). Ignored for single-record operations (Weibo Detail, User Profile).

- **User Fans:** ~20 users per page
- **User Followers:** ~20 users per page
- **Search Weibo:** ~14 posts per page

💡 **TIP:** Start small (1–3 pages) to preview results before scaling up.

⚠️ Hard cap: 50 pages to prevent runaway runs.

## Actor input object example

```json
{
  "operation": "searchWeibo",
  "weiboId": "5249718969175092",
  "userId": "2760523085",
  "keyword": "北京",
  "startDay": "2025-04-12",
  "endDay": "2025-05-12",
  "maxPages": 5
}
```

# Actor output Schema

## `output` (type: `string`):

Posts, profiles, fans, followers, or search results — one flat row per upstream item with curated camelCase aliases (weiboId, userId, screenName, repostCount, attitudeCount, text, postedAt, weiboPageUrl, userPageUrl, avatarUrl, …) plus the raw upstream fields spread alongside.

## `report` (type: `string`):

HTML report with run status, success/error row counts, success rate, pages fetched, duration, and the inputs used — written even on fatal crash.

# 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 = {
    "weiboId": "5249718969175092",
    "userId": "2760523085",
    "keyword": "北京"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/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 = {
    "weiboId": "5249718969175092",
    "userId": "2760523085",
    "keyword": "北京",
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/weibo-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "weiboId": "5249718969175092",
  "userId": "2760523085",
  "keyword": "北京"
}' |
apify call sian.agency/weibo-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sian.agency/weibo-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Weibo Scraper",
        "description": "Weibo scraper — extract Weibo posts, user profiles, fans, followers, and keyword search results from Sina Weibo. KOL discovery, social graph mapping, sentiment data, and China market research. Five operations, one clean dataset per run. No API key needed.",
        "version": "1.0",
        "x-build-id": "xxFkuRLVF29n6bHFP"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~weibo-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-weibo-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sian.agency~weibo-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-weibo-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sian.agency~weibo-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-weibo-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "operation"
                ],
                "properties": {
                    "operation": {
                        "title": "🎯 Operation — what do you want to scrape?",
                        "enum": [
                            "weiboDetail",
                            "userDetail",
                            "userFans",
                            "userFollowers",
                            "searchWeibo"
                        ],
                        "type": "string",
                        "description": "🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.\n\n- **📝 Weibo Detail** — deep scrape of a single post by ID (text, location, topics, @-mentions, repost/comment/attitude counts, pics, creator info)\n- **👤 User Profile** — full profile by user ID (followers, following, statuses count, verified reason, location, avatar, gender, bio)\n- **👥 User Fans** — list of users who follow this account (~20 per page; respects privacy settings)\n- **➡️ User Followers** — list of accounts this user follows (~20 per page; respects privacy settings)\n- **🔍 Search Weibo** — keyword search across Weibo posts with optional date range, paginated (~14 results/page)\n\n💡 **TIP:** To combine operations, run the actor multiple times with different configurations.",
                        "default": "searchWeibo"
                    },
                    "weiboId": {
                        "title": "📝 Weibo ID (for Weibo Detail)",
                        "type": "string",
                        "description": "📝 **Required for the `Weibo Detail` operation.**\n\nThe numeric Weibo post ID (also called `mid`). You can find it:\n- In any mobile Weibo URL: `https://m.weibo.cn/detail/{ID}` → the trailing segment\n- In the `weiboId` / `id` field of any search result row\n\n💡 **TIP:** To analyze a batch of posts, run a `Search Weibo` operation first, copy `weiboId` values from the result rows, then run `Weibo Detail` per ID.\n\n⚠️ **Ignored** for User Profile, User Fans, User Followers, and Search operations."
                    },
                    "userId": {
                        "title": "👤 User ID (for User Profile / Fans / Followers)",
                        "type": "string",
                        "description": "👤 **Required for `User Profile`, `User Fans`, and `User Followers` operations.**\n\nThe numeric Weibo user ID (UID). You can find it:\n- In any profile URL: `https://weibo.com/u/{ID}`\n- In the `userId` / `user_id` field of any post, search, or fan/follower result row\n\n💡 **TIP:** To build a creator catalog, run `Search Weibo` with a keyword first, then use the top `userId` values to drill into profiles, fans, and followers.\n\n⚠️ **Note:** Some accounts restrict public access to their fan/follower lists — those operations will return an explanatory empty row.\n\n⚠️ **Ignored** for Weibo Detail and Search operations."
                    },
                    "keyword": {
                        "title": "🔍 Search Keyword (for Search Weibo)",
                        "type": "string",
                        "description": "🔍 **Required for the `Search Weibo` operation.**\n\nAny Weibo search query. Supports Chinese, English, and mixed queries:\n- `北京` (Beijing)\n- `Tesla`\n- `美食` (food)\n- `iPhone`\n\n💡 **TIP:** Chinese queries surface native creators and conversations; English/brand queries surface international and brand-mention traffic."
                    },
                    "startDay": {
                        "title": "📅 Start Date (optional, for Search Weibo)",
                        "type": "string",
                        "description": "📅 **Optional for `Search Weibo`.** Earliest date to include in search results.\n\nFormat: `YYYY-MM-DD` (e.g. `2025-04-01`). Defaults to **30 days ago** if left blank.\n\n💡 **TIP:** Tight date windows return more targeted results. Use the start/end pair to track a topic over a specific campaign or news event.\n\n⚠️ **Ignored** for non-search operations."
                    },
                    "endDay": {
                        "title": "📅 End Date (optional, for Search Weibo)",
                        "type": "string",
                        "description": "📅 **Optional for `Search Weibo`.** Latest date to include in search results.\n\nFormat: `YYYY-MM-DD` (e.g. `2025-05-12`). Defaults to **today** if left blank.\n\n⚠️ **Ignored** for non-search operations."
                    },
                    "maxPages": {
                        "title": "📄 Max pages to fetch",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "📄 **Applies to paginated operations** (User Fans, User Followers, Search Weibo). Ignored for single-record operations (Weibo Detail, User Profile).\n\n- **User Fans:** ~20 users per page\n- **User Followers:** ~20 users per page\n- **Search Weibo:** ~14 posts per page\n\n💡 **TIP:** Start small (1–3 pages) to preview results before scaling up.\n\n⚠️ Hard cap: 50 pages to prevent runaway runs.",
                        "default": 5
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
