# Weibo Scraper (`axlymxp/weibo-scraper`) Actor

Scrape Weibo (微博) without login: keyword search, hot-search board, post detail, comments with replies, likers and user profiles. Clean JSON, schedulable monitoring, bio contacts. Pay only for the results you get.

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

## Pricing

from $5.00 / 1,000 dataset items

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

Scrape **Weibo (微博)** without logging in. Search posts by keyword, pull the hot-search board, and extract
post details, comments (with replies), likers, and user profiles — all as clean, structured JSON. Built on
Weibo's own mobile and desktop APIs, so it runs straight from Apify's servers with no proxy required.

Made for brand and social-listening teams, market researchers, and analysts who need Weibo data on a schedule.

### What you can scrape

| Mode | Returns |
| ---- | ------- |
| **Keyword search** | Recent and hot posts matching a keyword (across the "all", hot, latest, image and video tabs), de-duplicated |
| **Hot search board (热搜)** | The live 微博热搜 ranking with heat values |
| **Post detail** | A single post by link or ID, with full (long) text |
| **Comments** | All top-level comments of a post, hottest first — optionally with replies |
| **Likers** | Accounts that liked a post |
| **User profile** | Full profile: followers, bio, company, verified reason, lifetime engagement, and contacts parsed from the bio |
| **User's recent posts** | A user's newest posts |

### Output fields

Rows vary by mode; common fields:

| Field | Description |
| ----- | ----------- |
| `mid` / `bid` | Post ID (numeric / base62) |
| `url` | Canonical post URL |
| `text` | Post or comment text (plain) |
| `created_at` | ISO 8601 timestamp |
| `likes_count`, `comments_count`, `reposts_count` | Engagement (values ≥ 1,000,000 are reported as a floor, matching Weibo's "100万+") |
| `topics` | Hashtags in the post |
| `region`, `source` | Posting region and client |
| `pics`, `video` | Media URLs |
| `user` | Author: `uid`, `screen_name`, `followers_count`, `verified_reason`, … |
| `scraped_at` | When the row was collected |

Comment rows add `comment_id`, `likes_count`, `replies_count`, `level` (comment/reply). Profile rows add
`description`, `company`, `location`, `labels`, and a `contacts` object (emails / WeChat / QQ / phones found in
the bio — treat these as hints).

### Use cases

- **Social listening & brand monitoring** — schedule keyword search with *Only new since last run* to track a
  product, campaign or competitor on Weibo and only pay for new posts.
- **Trend tracking** — snapshot the hot-search board on a cron.
- **Audience & sentiment research** — pull every comment (and reply) on a viral post.
- **Influencer research** — profiles with follower counts, verification and bio contacts (see also the
  companion **Weibo KOL Finder** actor for keyword-based creator discovery).

### Input

```json
{
  "mode": "search",
  "keywords": ["小米汽车"],
  "maxItems": 50,
  "onlyNewSinceLastRun": false
}
```

For post/comments/likers use `targets` with post links or IDs; for profile/user_posts use `targets` with user
links or IDs:

```json
{ "mode": "comments", "targets": ["https://weibo.com/1669879400/Rkz6zoY6B"], "includeReplies": true, "maxItems": 200 }
```

| Field | Type | Default | Notes |
| ----- | ---- | ------- | ----- |
| `mode` | string | `search` | search, hot_search, post, comments, likers, profile, user_posts |
| `keywords` | array | — | required for search |
| `targets` | array | — | post or user links/IDs for the other modes |
| `includeReplies` | boolean | false | comments mode: also fetch replies |
| `maxItems` | integer | 50 | charged per row |
| `onlyNewSinceLastRun` | boolean | false | monitor mode — skip rows seen in a previous run with the same input |
| `proxyConfiguration` | object | none | optional; works without a proxy |

### Limits (please read)

- **Anonymous keyword search returns the first page per keyword** (~80–90 posts across tabs) and a user's
  **newest ~10 posts**. Comments, likers and the hot feed paginate in full. For deeper search or full archives
  you'd need a logged-in Weibo cookie (an experimental `cookie` input exists but is unsupported).
- Data is public, logged-out Weibo content only. No private or follower-gated data.

### Scheduling & webhooks

Run on a [schedule](https://docs.apify.com/platform/schedules) with *Only new since last run* for monitoring,
and attach a [webhook](https://docs.apify.com/platform/integrations/webhooks) to push new rows into your own
systems.

### Using from AI assistants / MCP

This actor runs over the [Apify API](https://docs.apify.com/api/v2) and through the
[Apify MCP server](https://mcp.apify.com), so AI agents (Claude, ChatGPT, etc.) can call it to fetch live
Weibo data.

### FAQ

**Do I need a Weibo account or cookie?** No. Everything above is scraped anonymously.

**How fresh is the data?** Live — each run hits Weibo's API in real time.

**Why did my search stop at ~90 posts?** That's Weibo's anonymous first-page limit (see Limits). Use the
hot/latest tabs or schedule a monitor instead of expecting a deep archive.

**Is this legal?** You are responsible for how you use scraped data. This actor collects only public,
logged-out content; respect Weibo's terms and applicable laws (including personal-data rules).

# Actor input Schema

## `mode` (type: `string`):

Pick the data you want. Search / hot search / profile need no login; post, comments and likers take post or user links.

## `keywords` (type: `array`):

Search terms (mode = Keyword search). Chinese or English. Anonymous search returns the first page per keyword (~80-90 posts).

## `targets` (type: `array`):

Post links or IDs for Post/Comments/Likers; user links or IDs for Profile/User posts. Accepts weibo.com URLs, m.weibo.cn URLs, bids and numeric ids.

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

Comments mode only: also fetch replies under each top-level comment.

## `maxItems` (type: `integer`):

Maximum rows to return across all keywords/targets. You are charged per row.

## `onlyNewSinceLastRun` (type: `boolean`):

Skip rows already seen in a previous run with the same input. Use with a schedule to monitor a keyword or account.

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

Experimental. A logged-in 'SUB=...; SUBP=...' cookie from your own account may lift the first-page cap on search and timelines. Leave empty for anonymous scraping. Never required.

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

Optional. Weibo works from datacenter IPs without a proxy; add a residential proxy only if you hit rate limits.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "小米汽车"
  ],
  "targets": [],
  "includeReplies": false,
  "maxItems": 50,
  "onlyNewSinceLastRun": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "mode": "search",
    "keywords": [
        "小米汽车"
    ],
    "targets": [],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/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 = {
    "mode": "search",
    "keywords": ["小米汽车"],
    "targets": [],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/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 '{
  "mode": "search",
  "keywords": [
    "小米汽车"
  ],
  "targets": [],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call axlymxp/weibo-scraper --silent --output-dataset

```

## MCP server setup

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