# Weibo Scraper: Search, Posts, Comments & Profiles (`alexmorain/weibo-scraper`) Actor

Scrape Weibo with no cap per run: search posts by keyword and date, read any account without a cookie, comments, profiles and the hot search. Exact counters, watch mode, webhook. From $2.50 per 1,000 posts.

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

## Pricing

from $2.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does Weibo Scraper do?

**Weibo Scraper** reads public data from [Weibo](https://weibo.com), the largest Chinese microblogging platform, and returns clean rows you can use in a spreadsheet, a database or a pipeline. One Actor covers six jobs:

- **Search posts by keyword and date**, with no cap per run. The Actor reads Weibo search hour by hour, so it goes past the 50 page wall that stops most Weibo search tools.
- **Read the posts of any account** from newest to oldest, **without a cookie and without a login**.
- **Collect the comments of a post**, most liked and newest orders merged without duplicates.
- **Get post details**: full text, exact counters, media, one row per post.
- **Get profiles**: bio, followers, verification, location, totals.
- **Read the hot search ranking** (the live Weibo trending list) with rank and heat.

It works as a **Weibo API alternative**: you send a list of keywords, user ids or post links and you get JSON, CSV, Excel or XML. No Weibo account, no cookies, no proxy setup on your side.

Turn on **watch mode** and a scheduled run returns only the posts you have not received yet. Add a **webhook** and the new posts land in Slack, Discord, Zapier, Make, n8n or your own endpoint.

It does not log in, does not read private accounts or direct messages, and does not post, like, repost or follow anything.

### Why use Weibo Scraper?

- **Search without a cap per run.** Weibo search shows at most 50 pages for one query, then repeats old posts with no error. The Actor cuts your date range into time slices (a day, then hours) and reads each slice fully. In a test on the keyword `英伟达` (Nvidia), one run delivered 1,500 unique posts of a single day in 4 time slices, and a slice of one busy hour holds about 480 posts. Set `maxPostsPerKeyword` as high as you like.
- **Exact counters and exact dates.** Weibo search lists show every counter as zero and write dates as "23 minutes ago". With **Exact counters and dates** on (the default), each post is read once more, so `reposts`, `comments` and `likes` are real numbers and `createdAt` is a precise UTC timestamp. In the 1,500 post test, 1,499 rows came back with exact counters. It costs nothing extra.
- **Posts of an account without a cookie.** Many Weibo scrapers need you to paste your own session cookie to read a timeline. This one does not: give a user id or a profile link, get the posts, pinned posts included.
- **Comments in both orders.** Weibo shows a visitor about 300 comments per sort order, whatever the announced total (a post with 337,000 announced comments gives 299 by most liked). Reading both **most liked** and **newest** and merging them reached 695 unique comments on that post, 997 comments on two posts in about a minute. A page that comes back empty is read again on a fresh connection before the Actor accepts that the list has ended.
- **Many targets per run.** Hundreds of keywords, users or posts in one run, with a per target line in the run summary.
- **Watch mode.** A named memory remembers what you already received. Posts you have already got are never charged twice.
- **Webhook.** A summary and the latest rows are sent to your URL when a run ends with rows.
- **A fair price.** From **$2.50 per 1,000 posts** at the Gold tier, **$4.00** on the standard plan. Comments from $0.90 per 1,000. Only delivered rows are charged: unknown accounts, repeated posts in watch mode and rows beyond your limits cost nothing. At the time of writing, the best known Weibo Actor on the store asks $35 per 1,000 posts and stops a run at 5,000 results.
- **Apify platform.** Schedules, API access, webhooks, datasets in JSON, CSV, Excel or XML, and integrations with Make, Zapier, n8n, Google Sheets and more.

#### Who uses it

- **Brand and PR teams** following what Chinese users say about a brand, a product launch or a crisis, hour by hour.
- **Market and financial analysts** counting posts, reposts and likes on a stock, a ticker or an event, with exact dates to line up against prices.
- **Researchers and academics** building datasets of posts and comments on a public topic, with dates, regions and counters.
- **Agencies and cross border e-commerce sellers** watching KOL (influencer) accounts, competitors and hot topics in China.
- **Data teams** feeding a sentiment, translation or LLM pipeline with fresh Chinese text.

### What data can Weibo Scraper extract?

Every row has a `type` (`post`, `comment`, `profile` or `hot-topic`) so that mixed runs stay easy to split. A field that does not apply to a row type is left out or set to `null`.

#### Posts (search, user posts, post details)

| Field | Type | Description |
|---|---|---|
| `type` | string | `post` |
| `id`, `mblogId` | string | Numeric post id and the short id used in links |
| `url` | string | Link to the post |
| `createdAt` | string | Publication time, ISO 8601 UTC |
| `text` | string | Full text of the post, as written (long posts are expanded) |
| `source` | string | App or device the post was sent from, when shown |
| `region` | string | Region shown with the post |
| `authorId`, `authorName`, `authorUrl`, `authorAvatar` | string | The author |
| `authorVerified` | boolean | Verified badge |
| `authorFollowers` | integer | Follower count when the run read it |
| `reposts`, `comments`, `likes` | integer | Counters at read time (exact when `countsExact` is true) |
| `countsExact` | boolean | True when counters and date come from the post itself |
| `isRepost`, `repostedPostId` | boolean, string | Repost flag and the id of the original post |
| `isPinned` | boolean | Pinned on the profile (user posts) |
| `images` | array | Image links |
| `videoUrl` | string | Video link when the post has one |
| `topics` | array | Hashtag topics of the text, without the `#` signs |
| `mentions` | array | Accounts mentioned, without the `@` sign |
| `keyword` | string | The search keyword that returned the post |
| `scrapedAt` | string | When the run started |

#### Comments

| Field | Type | Description |
|---|---|---|
| `type` | string | `comment` |
| `id`, `postId` | string | Comment id and the id of the post it belongs to |
| `createdAt` | string | Publication time, ISO 8601 UTC |
| `text` | string | Comment text |
| `likes`, `replyCount`, `floor` | integer | Likes, replies under the comment, floor number |
| `region` | string | Region shown with the comment |
| `authorId`, `authorName`, `authorUrl` | string | The commenter |
| `authorVerified`, `authorFollowers` | mixed | Verified badge and followers of the commenter |
| `authorLocation`, `authorGender` | string | Location and gender (`m` or `f`) written on the commenter's profile |
| `sortedBy` | array | Orders that returned the comment: `hot`, `time` or both |

#### Profiles

| Field | Type | Description |
|---|---|---|
| `type` | string | `profile` |
| `id`, `url` | string | User id and link |
| `name`, `description` | string | Display name and bio |
| `location`, `gender` | string | Location and gender (`m` or `f`) |
| `verified`, `verifiedReason` | boolean, string | Verified badge and the verification text |
| `followers`, `following`, `posts` | integer | Counters |
| `totalLikes`, `totalComments`, `totalReposts` | integer | Totals received by the account |
| `website`, `avatar` | string | Website and profile picture |
| `vip` | boolean | Paid membership badge |

#### Hot topics

| Field | Type | Description |
|---|---|---|
| `type` | string | `hot-topic` |
| `rank` | integer | Position in the ranking, 1 is the top |
| `topic`, `id` | string | The topic text |
| `heat` | integer | Heat score |
| `label` | string | Label shown on the topic, for example hot or new |
| `url` | string | Weibo search link for the topic |

### How to scrape Weibo

1. Open the Actor and choose a **Mode**.
2. Fill the matching list: **Keywords** for search, **Users** for user posts and profiles, **Posts** for comments and details. Ids, short ids and full links all work.
3. For search, set **Posts from** and **Posts until** (Beijing time, `YYYY-MM-DD`). Without dates, the last 7 days are read.
4. Set the cap that fits your job: **Max posts per keyword**, **Max posts per user** or **Max comments per post**, and **Max rows in total** as a hard limit for the whole run.
5. Click **Start**. Rows appear in the **Output** tab and download as JSON, CSV or Excel.
6. To monitor a topic, tick **Watch mode**, choose a **Watch name**, add a **Webhook URL** and schedule the run.

#### Modes at a glance

| Mode | You give | You get | Event charged |
|---|---|---|---|
| `search` | `keywords`, optional dates and filters | Posts matching each keyword, newest first | `post` |
| `user_posts` | `userIds` | The timeline of each account, newest first | `post` |
| `post_comments` | `postIds` | Comments of each post | `comment` |
| `post_details` | `postIds` | One row per post with full text and exact counters | `post` |
| `user_profile` | `userIds` | One row per profile | `profile` |
| `hot_search` | nothing | The current hot search ranking | `hot-topic` |

#### How to search Weibo by keyword and date range

Choose `search`, add one keyword per line (Chinese works best, hashtags like `#英伟达#` work too), and set the dates. The Actor reads one day at a time. A day that fills Weibo's 50 page limit is read again from the time of its oldest post, so no hour is skipped. A busy keyword gives about 480 posts per hour at most. If an hour is fuller than Weibo shows, it is listed under `saturatedHours` in the run summary, so you know where Weibo itself hides posts.

Filters narrow the search without extra cost:

- **Search type**: all, hot, original posts only, verified accounts, media accounts, viewpoints.
- **Content type**: all, with pictures, with video, with music, with links.

#### How to scrape the posts of a Weibo account without a cookie

Choose `user_posts` and add numeric ids or profile links (`https://weibo.com/u/2121863747`). Posts come back from the newest to the oldest, 100 per account by default. Use **Posts from** to stop at a date: reading ends as soon as older posts are reached. Unknown ids are skipped and not charged.

#### How to scrape Weibo comments

Choose `post_comments` and add post ids, short ids (the last part of a post link) or full links such as `https://weibo.com/2121863747/Rrc3sgQhV`. Pick the **Comment sort**:

- `both` (default) merges most liked and newest, without duplicates. This reaches the most comments.
- `hot` is the most liked comments.
- `time` is the newest comments.

You can also tick **Add comments to posts** in search or user posts mode to get the comments of every delivered post in the same run. Comments are charged as comments.

#### How to monitor a Weibo keyword or an account

Pick `search` or `user_posts`, tick **Watch mode: only new posts**, give a **Watch name** such as `brand-china`, and schedule the Actor every hour or every day. The first run delivers what it reads and sets the starting point (set a low cap if you only want what comes next). Later runs return only posts you have not received under that watch name. A run with nothing new costs only the start fee.

### How much does it cost to scrape Weibo?

Pricing is pay per event: a small fee when the run starts ($0.002 per GB of memory, the default 512 MB counts as one event) and a price per row delivered.

| Event | Free and Starter | Scale | Business |
|---|---|---|---|
| Post (search, user posts, post details) | $4.00 / 1,000 | $3.25 / 1,000 | $2.50 / 1,000 |
| Comment | $1.50 / 1,000 | $1.20 / 1,000 | $0.90 / 1,000 |
| Profile | $3.00 / 1,000 | $2.50 / 1,000 | $2.00 / 1,000 |
| Hot topic | $1.00 / 1,000 | $0.80 / 1,000 | $0.60 / 1,000 |

Examples at the standard price:

- 1,000 posts about a keyword: $4.00 plus $0.002 to start.
- 1,500 posts of one day on a hot topic: about $6.00.
- The 100 latest posts of an account: $0.40.
- 300 comments of a post: $0.45.
- 50 hot topics: $0.05.
- Watching 20 accounts that post 5 times a day each: 3,000 posts a month, about $12.

Set **Max total cost per run** in the run options to cap spending. The Actor stops cleanly at the cap, the run ends as succeeded with a message, and the rows delivered so far are kept. A test with a cap of $0.02 on a 50 post search delivered 4 posts and charged $0.018.

Accounts on the Free Apify plan have a small daily limit on search and user posts. A paid Apify plan removes it.

### Input

See the **Input** tab for every option. The main ones:

| Field | Mode | Description |
|---|---|---|
| `mode` | all | `search`, `user_posts`, `post_comments`, `post_details`, `user_profile` or `hot_search` |
| `keywords` | search | One keyword or hashtag per line |
| `dateFrom`, `dateTo` | search, user posts | `YYYY-MM-DD`, Beijing time, both included. Search default: last 7 days |
| `searchType` | search | `all`, `hot`, `original`, `verified`, `media`, `viewpoint` |
| `contentType` | search | `all`, `pic`, `video`, `music`, `link` |
| `maxPostsPerKeyword` | search | Default 100 |
| `userIds` | user posts, profile | Numeric ids or profile links |
| `maxPostsPerUser` | user posts | Default 100 |
| `postIds` | comments, details | Post ids, short ids or links |
| `maxCommentsPerPost` | comments | Default 100 |
| `commentSort` | comments | `both` (default), `hot`, `time` |
| `includeComments` | search, user posts | Add the comments of every delivered post |
| `exactCounts` | search | Exact counters and dates, default on, no extra charge |
| `maxItems` | all | Hard cap on rows for the whole run, default 1,000 |
| `newOnly`, `watchName` | search, user posts | Watch mode and its memory |
| `webhookUrl` | all | Called by POST when a run ends with rows. Never written to a log |

#### Example: search a keyword over two weeks

```json
{
  "mode": "search",
  "keywords": ["英伟达", "#华为发布会#"],
  "dateFrom": "2026-11-01",
  "dateTo": "2026-11-14",
  "searchType": "all",
  "maxPostsPerKeyword": 5000,
  "maxItems": 10000
}
```

#### Example: posts of accounts, only the new ones

```json
{
  "mode": "user_posts",
  "userIds": ["2121863747", "https://weibo.com/u/1642909335"],
  "maxPostsPerUser": 50,
  "newOnly": true,
  "watchName": "kol-list",
  "webhookUrl": "https://hooks.slack.com/services/..."
}
```

#### Example: comments of two posts

```json
{
  "mode": "post_comments",
  "postIds": ["5365949127461379", "https://weibo.com/2121863747/Rrc3sgQhV"],
  "commentSort": "both",
  "maxCommentsPerPost": 500
}
```

#### Example: profiles

```json
{
  "mode": "user_profile",
  "userIds": ["2121863747", "1642909335"]
}
```

#### Example: hot search

```json
{
  "mode": "hot_search"
}
```

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. A post:

```json
{
  "type": "post",
  "id": "5367857814963204",
  "mblogId": "Rsti5kP9G",
  "url": "https://weibo.com/1759677263/Rsti5kP9G",
  "createdAt": "2026-11-21T17:01:36Z",
  "text": "英伟达暴跌14%，Anthropic IPO次日险破发……",
  "source": "开盘红",
  "region": "山东",
  "authorId": "1759677263",
  "authorName": "阳光青春花园",
  "authorUrl": "https://weibo.com/u/1759677263",
  "authorVerified": false,
  "reposts": 0,
  "comments": 0,
  "likes": 0,
  "countsExact": true,
  "isRepost": false,
  "images": ["https://wx1.sinaimg.cn/orj960/68e28b4fly1ijab2fdbnmj2024024jr5.jpg"],
  "videoUrl": null,
  "topics": [],
  "mentions": [],
  "keyword": "英伟达",
  "scrapedAt": "2026-11-21T17:06:09Z"
}
```

A comment:

```json
{
  "type": "comment",
  "id": "5365949144239329",
  "postId": "5365949127461379",
  "createdAt": "2026-11-16T10:37:13Z",
  "text": "小八还有没有别的图再来点……",
  "likes": 18439,
  "replyCount": 172,
  "floor": 1,
  "region": "浙江",
  "authorId": "5702176091",
  "authorName": "killd74-",
  "authorVerified": true,
  "authorFollowers": 5346,
  "authorLocation": "浙江",
  "authorGender": "f",
  "sortedBy": ["hot"]
}
```

A profile:

```json
{
  "type": "profile",
  "id": "1642909335",
  "url": "https://weibo.com/u/1642909335",
  "name": "微博小秘书",
  "location": "北京",
  "verified": true,
  "verifiedReason": "微博官方账号",
  "followers": 168204016,
  "following": 2949,
  "posts": 10085,
  "vip": true
}
```

A hot topic:

```json
{
  "type": "hot-topic",
  "rank": 1,
  "topic": "特朗普深圳不拉窗帘原因找到了",
  "heat": 564319,
  "label": null,
  "url": "https://s.weibo.com/weibo?q=%23..."
}
```

The **SUMMARY** record of the run key-value store tells you how each target went:

- `perTarget`: for each keyword or user, the rows `delivered`, the pages read, the `timeSlices` used, the list of `saturatedHours` and how the read ended (`end`, `cap`, `known`, `stopped`).
- `comments.perPost`: for each post, `commentsAnnounced` (what Weibo says), `commentsFetched` (what was delivered), the split between `hot` and `time`, and how many pages were read again on a fresh connection.
- `stopReason`: why the run stopped early, if it did (`max_items`, `buyer_limit`, `free_cap`, `timeout`).

### Limits you should know

We would rather you read this here than find it in a review.

- **Comments: about 300 per sort order.** Weibo shows a visitor around 300 comments per order, whatever the announced total. Reading the most liked and the newest orders together gives a few hundred more, but not hundreds of thousands. The run summary shows announced and delivered comments for each post, so coverage is never a guess.
- **Some posts show very few comments.** Certain official or heavily moderated posts expose only a few dozen comments without a login. Reading again does not change it. Check `comments.perPost` after a run.
- **A very busy hour can hide posts.** On a hot topic Weibo shows at most about 480 posts for one hour of one query. When an hour is fuller than that, it appears in `saturatedHours`. Narrowing the query (a more precise keyword, a search type or a content type filter) reaches more of it.
- **Search is public posts only.** Private posts, followers only posts and deleted posts are not returned.
- **Counters are read at run time.** A post read an hour after it went out has fewer reposts and likes than the same post a week later. Schedule runs to follow how the counters grow.
- **Weibo changes.** Weibo changes its pages from time to time. If a mode stops working, open a ticket in the **Issues** tab: it is read quickly.
- **Links to images and videos expire or change.** Download media soon after the run if you need the files.

Reading speed is about 15 to 20 comments per second and about 5 search posts per second. A day of a busy keyword (1,500 posts) takes about 5 minutes. Raise the run timeout for very large exports.

### Tips

- Use one **Watch name** per list and per purpose. Two schedules that share a name share a memory.
- Leave **Exact counters and dates** on for analysis. Turn it off only if you want the fastest and cheapest list of posts and do not need counters.
- To compare topics, run one keyword per run with the same dates so that each run summary stays readable.
- Hashtags work in `search`: `#英伟达#` returns posts that use the topic.
- Webhook payload: `text`, `rowsDelivered`, `latestRows` (up to 10 rows), `perTarget`, `runId`, `datasetId`.

#### Run it from code

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("alexmorain/weibo-scraper").call(run_input={
    "mode": "search",
    "keywords": ["英伟达"],
    "dateFrom": "2026-11-20",
    "maxPostsPerKeyword": 500,
})
for post in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(post["createdAt"], post["likes"], post["text"][:80])
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('alexmorain/weibo-scraper').call({
    mode: 'post_comments',
    postIds: ['5365949127461379'],
    commentSort: 'both',
    maxCommentsPerPost: 300,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'comments');
```

```bash
curl -X POST "https://api.apify.com/v2/acts/alexmorain~weibo-scraper/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"mode": "hot_search"}'
```

### FAQ

#### How do I scrape Weibo posts by keyword?

Choose the `search` mode, add your keywords (one per line) and set **Posts from** and **Posts until**. Start the run. Posts come back from the newest to the oldest, with the keyword that matched each one. Raise **Max posts per keyword** and **Max rows in total** for large exports.

#### How do I get more than 50 pages of Weibo search results?

Weibo stops a single search at 50 pages and then repeats old posts without an error. This Actor reads the date range in time slices, from a day down to an hour, so each slice stays under the wall. That is why a run has no cap of its own: the number of posts depends only on what Weibo holds for your keyword and dates, and on your limits.

#### Do I need a Weibo account, a cookie or an API key?

No. The Actor reads public data. You only need an Apify account.

#### Can I scrape the posts of a Weibo user without a cookie?

Yes. Use `user_posts` with a numeric user id or a profile link. No cookie, no login.

#### How do I find a Weibo user id or a post id?

A profile link looks like `https://weibo.com/u/2121863747`: the number is the user id. A post link looks like `https://weibo.com/2121863747/Rrc3sgQhV`: the last part is the short id, and you can paste the whole link. The Actor accepts ids, short ids and links in every list.

#### How many comments can I get from one Weibo post?

Weibo shows visitors about 300 comments per sort order. With `commentSort` set to `both`, the Actor merges the most liked and the newest orders, which reached 695 unique comments on a post with 337,000 announced. Some official posts show only a few dozen. The run summary gives announced and delivered comments for each post.

#### Are the like and repost counts real?

Yes, with **Exact counters and dates** on, which is the default. Weibo search lists show zero counters and relative dates, so the Actor reads each post once more to get the real numbers and a precise date. User posts come with exact counters from the start.

#### Can I get the hot search list on a schedule?

Yes. Use `hot_search` and schedule the Actor every hour or every day. Each run costs about $0.05 for the 50 topics. Store the datasets to follow rank and heat over time.

#### How do I get an alert when a keyword or an account has new posts?

Use watch mode with a webhook URL and a schedule. Slack and Discord incoming webhooks work as they are. For keyword filters, send the webhook to Zapier, Make or n8n and filter on `latestRows[].text`.

#### Why was a user or a post skipped?

The id does not exist, or the account is unavailable. It is listed in the run status and nothing is charged for it.

#### Does it work with Chinese text?

Yes. Keywords, posts and comments are read and returned in UTF-8, exactly as written. Pass Chinese keywords as they are.

#### Is it legal to scrape Weibo?

Our Actors are ethical and do not extract any private user data, such as email addresses or direct messages. 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, including China's PIPL. 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. This Actor is not affiliated with Weibo or Sina.

#### Something is missing or wrong

Open a ticket in the **Issues** tab of this Actor. Programmatic access is in the **API** tab.

### Guide and use cases

Use cases, output fields, pricing and common questions are on the [Weibo Scraper page](https://alexis.morain.fr/en/scrapers/weibo-scraper/) of my site. The [Social media and content family page](https://alexis.morain.fr/en/scrapers/families/social-content/) puts it side by side with the other scrapers of the same family.

# Actor input Schema

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

<b>search</b>: posts by keyword and date. <b>user_posts</b>: the timeline of accounts, no cookie needed. <b>post_comments</b>: comments of posts. <b>post_details</b>: one row per post. <b>user_profile</b>: profiles. <b>hot_search</b>: the hot search ranking now.

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

One keyword per line, Chinese or other, for example <code>英伟达</code>. Hashtags work too: <code>#英伟达#</code>.

## `dateFrom` (type: `string`):

Optional, <code>YYYY-MM-DD</code>, Beijing time. Search default: the last 7 days. For user posts, reading stops as soon as older posts are reached.

## `dateTo` (type: `string`):

Optional, <code>YYYY-MM-DD</code>, Beijing time, included. Search default: today.

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

Which posts a search returns.

## `contentType` (type: `string`):

Only posts with this kind of content.

## `maxPostsPerKeyword` (type: `integer`):

Stop a keyword after this many posts, newest first. A busy keyword gives about 480 posts per hour; the run summary lists hours that were fuller than Weibo shows.

## `userIds` (type: `array`):

One numeric user id or profile link per line, for example <code>2121863747</code> or <code>https://weibo.com/u/2121863747</code>. Unknown accounts are skipped and not charged.

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

Stop an account after this many posts, newest first.

## `postIds` (type: `array`):

One post id, short id or link per line, for example <code>5364811984014247</code>, <code>Rrc3sgQhV</code> or <code>https://weibo.com/2121863747/Rrc3sgQhV</code>.

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

Weibo shows about 300 comments per sort order to visitors, whatever the post announces. The run summary gives announced and delivered comments per post.

## `commentSort` (type: `string`):

<b>both</b> merges the most liked and the newest comments without duplicates, which reaches the most comments.

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

Also reads up to <code>maxCommentsPerPost</code> comments of every delivered post. Comments are charged as comments.

## `exactCounts` (type: `boolean`):

Search lists give no counters and only relative dates. This reads each post once more for exact reposts, comments, likes, a precise date and the full text. No extra charge.

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

Hard cap on rows for the whole run, all types together. Only delivered rows are charged.

## `newOnly` (type: `boolean`):

Search and user posts only. Returns the posts you have not received in an earlier run with the same watch name. The first run sets the starting point and delivers the posts it reads.

## `watchName` (type: `string`):

Memory of what was already delivered. Use one name per list and per purpose, for example <code>competitors</code>.

## `webhookUrl` (type: `string`):

Optional. When the run ends with rows, a summary and the latest rows are sent there by POST (Slack, Discord, Zapier, your own endpoint). The URL is never written to a log.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "英伟达"
  ],
  "searchType": "all",
  "contentType": "all",
  "maxPostsPerKeyword": 50,
  "maxPostsPerUser": 100,
  "maxCommentsPerPost": 100,
  "commentSort": "both",
  "includeComments": false,
  "exactCounts": true,
  "maxItems": 1000,
  "newOnly": false,
  "watchName": "default"
}
```

# Actor output Schema

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

All rows in the default dataset.

## `summary` (type: `string`):

Rows delivered per target, time slices and saturated hours of a search, comment coverage per post, stop reason.

# 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": [
        "英伟达"
    ],
    "maxPostsPerKeyword": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("alexmorain/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": ["英伟达"],
    "maxPostsPerKeyword": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("alexmorain/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": [
    "英伟达"
  ],
  "maxPostsPerKeyword": 50
}' |
apify call alexmorain/weibo-scraper --silent --output-dataset

```

## MCP server setup

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