# Weibo Scraper for Posts and Feeds (`maximedupre/weibo-scraper`) Actor

Collect public Weibo posts, profiles, follower lists, feed posts, hot-search topics, and comments in structured dataset rows. Search by terms or use public post and user IDs or URLs, with date limits, promotion filtering, and optional Chinese-language sentiment scores.

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

## Pricing

from $0.70 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 for public posts, profiles, and trends

For researchers, marketers, journalists, product teams, and developers, Weibo Scraper collects public Weibo data into structured dataset rows. Choose one workflow to search posts, open posts or profiles, collect follower and following accounts, read a public feed, check hot-search topics, or collect comments. The rows keep source IDs, links, text, times, profile details, counts, media links, and optional sentiment fields when the source provides them.

- Start a general public Weibo collection with **[Weibospider](https://apify.com/maximedupre/weibo-scraper/examples/weibospider)**.
- Find public posts by keyword with **[Weibo Search](https://apify.com/maximedupre/weibo-scraper/examples/weibo-search)**.
- Fetch one public post from its ID or URL with **[Weibo Post Scraper](https://apify.com/maximedupre/weibo-scraper/examples/weibo-post-scraper)**.
- Look up a public Weibo profile with **[Weibo Profile Scraper](https://apify.com/maximedupre/weibo-scraper/examples/weibo-profile-scraper)**.
- Collect public comments for a post with **[Weibo Comments Scraper](https://apify.com/maximedupre/weibo-scraper/examples/weibo-comments-scraper)**.
- Read current hot-search topics with **[Weibo Hot Search](https://apify.com/maximedupre/weibo-scraper/examples/weibo-hot-search)**.

#### 📦 Weibo rows for posts, profiles, comments, and hot search

The dataset has four row shapes: posts, profiles, comments, and hot-search topics. Each row has a `recordType` value so you can tell its shape. Fields stay close to the public Weibo source, and optional fields appear when Weibo provides them.

The Actor saves the first eligible occurrence of a source item. If another search term, post reference, user reference, or source page finds the same item later, that later match is ignored. A post's `searchTerm` describes the first match that saved that row.

#### ▶️ Run a Weibo collection

1. Choose one `resultType` in the Input tab.
2. Enter the matching search terms, post references, or user references.
3. Add dates, post filtering, sentiment, or a work limit when they fit your run.
4. Start the Actor and open the dataset link when the run finishes.

Each run uses one result type. Values for other result types are ignored. Public content that Weibo does not expose, including private or deleted content, is outside the Actor's scope.

#### ⚙️ Input

**Input fields**

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Required. Chooses one public result type: `searchPosts`, `post`, `profile`, `followers`, `following`, `feedPosts`, `hotTimeline`, `hotSearch`, or `comments`. Each run uses one type. |
| `searchTerms` | array of strings | Required for `searchPosts`. Enter one main keyword and optional equivalent Chinese or Latin terms for that same search. These values form one search, not separate jobs. Weibo may add recognized Chinese variants for some Latin brand searches. |
| `searchDateFrom` | string | Optional first date for `searchPosts`, in `YYYY-MM-DD` format. Dates use UTC. |
| `searchDateTo` | string | Optional last date for `searchPosts`, in `YYYY-MM-DD` format. Dates use UTC. |
| `postReferences` | array of strings | Required for `post` and `comments`. Enter one or more public Weibo post IDs or URLs. Keep long IDs exactly as the source gives them. |
| `userReferences` | array of strings | Required for `profile`, `followers`, `following`, and `feedPosts`. Enter one or more public Weibo user IDs or profile URLs. Each value is used for the selected result type. |
| `promotedPostFilter` | string | For `searchPosts`, `post`, `feedPosts`, and `hotTimeline`, keep `all`, only `organic`, or only `promoted` posts. This field is ignored for other result types. |
| `includeSentiment` | boolean | For `searchPosts`, `post`, `feedPosts`, `hotTimeline`, and `comments`, add Chinese-language sentiment polarity and scores. This field is ignored for other result types. |
| `maxItems` | integer | Optional work limit. Stops after this many returned items. Leave it empty to continue until the source is exhausted. The schema has no upper bound. |

**Example input**

This is the public input from a successful current-beta default search run:

```json
{
  "resultType": "searchPosts",
  "searchTerms": [
    "weibo"
  ],
  "promotedPostFilter": "all",
  "includeSentiment": false,
  "maxItems": 1
}
```

**Choosing references**

Use `searchTerms` for keyword search. Use `postReferences` for one or more public post IDs or URLs. Use `userReferences` for profile, follower, following, or feed requests. Long Weibo IDs are kept as strings so leading or large digits are not changed.

#### 🧾 Output

**Run output**

| Field | Type | What it does |
|---|---|---|
| `dataset` | string URL | Opens the collected Weibo rows for the run. |

The following tables cover every public dataset shape. A profile row is used for direct profile, follower, and following requests. A post row is used for search, direct post, feed, and hot-timeline requests.

**Post row**

| Field | Type | What it does |
|---|---|---|
| `recordType` | string | Marks this row as a `post`. |
| `postId` | string | Gives the exact Weibo post ID. |
| `postUrl` | string URL | Gives the public link to the post. |
| `text` | string | Gives the post text when Weibo provides it. |
| `publishedAt` | date-time string | Gives the post publication time in UTC. |
| `author` | object | Holds public details for the post author. |
| `author.userId` | string | Gives the author's exact Weibo user ID. |
| `author.username` | string | Gives the author's Weibo username. |
| `author.displayName` | string | Gives the author's public display name. |
| `author.profileUrl` | string URL | Gives the public link to the author's profile. |
| `author.bio` | string | Gives the author's public bio when provided. |
| `author.location` | string | Gives the author's public profile location when provided. |
| `author.verified` | boolean | Says whether Weibo marks the author as verified. |
| `author.verificationType` | string | Gives the verification label when provided. |
| `author.followersCount` | integer | Gives the follower count shown by Weibo when provided. |
| `author.followingCount` | integer | Gives the following count shown by Weibo when provided. |
| `author.postsCount` | integer | Gives the post count shown by Weibo when provided. |
| `repostCount` | integer | Gives the repost count shown by Weibo when provided. |
| `commentCount` | integer | Gives the comment count shown by Weibo when provided. |
| `likeCount` | integer | Gives the like count shown by Weibo when provided. |
| `shareCount` | integer | Gives the share count shown by Weibo when provided. |
| `isPromoted` | boolean | Says whether Weibo marks the post as promoted when that distinction is provided. |
| `topics` | array of strings | Lists topics attached to the post when provided. |
| `mentions` | array of strings | Lists accounts mentioned in the post when provided. |
| `postingSource` | string | Gives the posting source shown by Weibo when provided. |
| `location` | string | Gives the location attached to the post when provided. |
| `imageUrls` | array of strings | Lists public image links attached to the post. |
| `videoUrls` | array of strings | Lists public video links attached to the post. |
| `sentiment` | object | Holds Chinese-language sentiment data when requested and available. |
| `sentiment.polarity` | string | Gives `positive`, `neutral`, or `negative` sentiment. |
| `sentiment.score` | number | Gives the sentiment score assigned to the post text. |
| `quotedPost` | object | Holds embedded quoted or original post context when provided. |
| `quotedPost.postId` | string | Gives the exact ID of the embedded post. |
| `quotedPost.postUrl` | string URL | Gives the public link to the embedded post. |
| `quotedPost.text` | string | Gives the embedded post text when provided. |
| `quotedPost.publishedAt` | date-time string | Gives the embedded post publication time in UTC when provided. |
| `searchTerm` | string | Gives the search term that first caused this post row to be saved. |

**Example post row**

This unshortened row came from a successful current-beta `searchPosts` run. Its keys and values are shown as returned.

```json
{
  "recordType": "post",
  "postId": "5337711192048450",
  "postUrl": "https://m.weibo.cn/detail/5337711192048450",
  "publishedAt": "2026-08-30T12:29:41.000Z",
  "author": {
    "displayName": "剋剋啊",
    "userId": "7425586997",
    "username": "剋剋啊",
    "profileUrl": "https://weibo.com/u/7425586997",
    "bio": "今天发生了什么新鲜事～",
    "location": "其他",
    "verified": true,
    "verificationType": "微博剪辑视频博主",
    "followersCount": 196172,
    "followingCount": 269,
    "postsCount": 14616
  },
  "text": "首先给不和稀泥的帽子点赞\n\n当初她发布的这个事件的视频，在抖那边转发有13万多，图一\n\n微博这里有个博主发的转发是1万多，图二\n这个转发页能看到转发较多的几位，最高的是4000多。\n\n这个结果算是从轻处置了。\n\n想到了之前同样发生在这里一位大V造谣男子尾随她的事，当时引起的讨论也不少，那个当事人 ...全文",
  "repostCount": 107,
  "commentCount": 402,
  "likeCount": 2352,
  "shareCount": 0,
  "isPromoted": false,
  "postingSource": "微博剪辑视频博主",
  "location": "发布于 浙江",
  "imageUrls": [
    "https://wx1.sinaimg.cn/large/0086x0odgy1igm4kzv0oej30wy1h1gxw.jpg",
    "http://wx1.sinaimg.cn/bmiddle/0086x0odgy1igm4kzv0oej30wy1h1gxw.jpg",
    "https://wx1.sinaimg.cn/thumbnail/0086x0odgy1igm4kzv0oej30wy1h1gxw.jpg",
    "https://wx1.sinaimg.cn/orj360/0086x0odgy1igm4kzv0oej30wy1h1gxw.jpg",
    "https://wx1.sinaimg.cn/mw2000/0086x0odgy1igm4kzv0oej30wy1h1gxw.jpg",
    "https://wx2.sinaimg.cn/orj360/0086x0odgy1igm4mimnicj30v03317pj.jpg",
    "https://wx2.sinaimg.cn/mw2000/0086x0odgy1igm4mimnicj30v03317pj.jpg",
    "https://wx3.sinaimg.cn/orj360/0086x0odly1igm4nww60rj30u01hcmyh.jpg",
    "https://wx3.sinaimg.cn/large/0086x0odly1igm4nww60rj30u01hcmyh.jpg",
    "https://wx2.sinaimg.cn/orj360/0086x0odgy1igm4rtzo4uj30zo0f0ack.jpg",
    "https://wx2.sinaimg.cn/mw2000/0086x0odgy1igm4rtzo4uj30zo0f0ack.jpg",
    "https://wx3.sinaimg.cn/orj360/0086x0odgy1igm4rub77mj30zo0dzac2.jpg",
    "https://wx3.sinaimg.cn/mw2000/0086x0odgy1igm4rub77mj30zo0dzac2.jpg",
    "https://wx3.sinaimg.cn/orj360/0086x0odgy1igm4rtngzzj30zo108qb5.jpg",
    "https://wx3.sinaimg.cn/mw2000/0086x0odgy1igm4rtngzzj30zo108qb5.jpg"
  ],
  "videoUrls": [
    "https://f.video.weibocdn.com/o0/grMvZ2WUlx08ApzcaX9601041200oRmM0E010.mp4?label=mp4_hd&template=540x960.24.0&ori=0&ps=1BVp4ysnknHVZu&Expires=1788406100&ssig=Si4cRwSCJs&KID=unistore,video",
    "https://f.video.weibocdn.com/o0/7xDUTbvhlx08Apzb9GUE01041200EJTL0E010.mp4?label=mp4_720p&template=720x1280.24.0&ori=0&ps=1BVp4ysnknHVZu&Expires=1788406100&ssig=c6PvKmEzot&KID=unistore,video"
  ],
  "searchTerm": "转发微博"
}
```

**Profile and network-member row**

Direct profile, follower, and following requests use this shape. `relationship` is present when the row comes from a follower or following request.

| Field | Type | What it does |
|---|---|---|
| `recordType` | string | Marks this row as a `profile`. |
| `userId` | string | Gives the exact Weibo user ID. |
| `username` | string | Gives the Weibo username when provided. |
| `displayName` | string | Gives the public display name. |
| `profileUrl` | string URL | Gives the public link to the profile. |
| `bio` | string | Gives the public bio when provided. |
| `location` | string | Gives the public profile location when provided. |
| `verified` | boolean | Says whether Weibo marks the profile as verified. |
| `verificationType` | string | Gives the verification label when provided. |
| `followersCount` | integer | Gives the follower count shown by Weibo when provided. |
| `followingCount` | integer | Gives the following count shown by Weibo when provided. |
| `postsCount` | integer | Gives the post count shown by Weibo when provided. |
| `relationship` | string | Says `follower` or `following` for a network request. |

**Example profile row**

This genuine row came from a successful current-beta profile run.

```json
{
  "recordType": "profile",
  "userId": "7996410850",
  "displayName": "咩咩放映机",
  "profileUrl": "https://weibo.com/u/7996410850",
  "username": "咩咩放映机",
  "bio": "咩咩放映机（羚羊嫡长机版）——FOREVER FOR LAY",
  "location": "其他",
  "verified": true,
  "verificationType": "娱乐博主 超话粉丝钻咖（张艺兴超话）",
  "followersCount": 51025,
  "followingCount": 95,
  "postsCount": 6654
}
```

**Comment row**

| Field | Type | What it does |
|---|---|---|
| `recordType` | string | Marks this row as a `comment`. |
| `commentId` | string | Gives the exact Weibo comment ID. |
| `postId` | string | Gives the exact ID of the post that owns the comment. |
| `postUrl` | string URL | Gives the public link to the post that owns the comment. |
| `text` | string | Gives the comment text. |
| `publishedAt` | date-time string | Gives the comment publication time in UTC. |
| `author` | object | Holds public details for the comment author. |
| `author.userId` | string | Gives the comment author's exact Weibo user ID. |
| `author.username` | string | Gives the comment author's Weibo username. |
| `author.displayName` | string | Gives the comment author's public display name. |
| `author.profileUrl` | string URL | Gives the public link to the comment author's profile. |
| `author.verified` | boolean | Says whether Weibo marks the comment author as verified. |
| `author.location` | string | Gives the comment author's public profile location when provided. |
| `likeCount` | integer | Gives the comment like count shown by Weibo when provided. |
| `sentiment` | object | Holds Chinese-language sentiment data when requested and available. |
| `sentiment.polarity` | string | Gives `positive`, `neutral`, or `negative` sentiment. |
| `sentiment.score` | number | Gives the sentiment score assigned to the comment text. |

**Example comment row**

This genuine row came from a successful current-beta comments run with sentiment requested.

```json
{
  "recordType": "comment",
  "commentId": "5338876928591207",
  "postId": "5338875284163355",
  "postUrl": "https://m.weibo.cn/detail/5338875284163355",
  "text": "咩机 这个复制下来超字数了 只能一条一条🍊",
  "publishedAt": "2026-09-02T17:41:54.000Z",
  "author": {
    "displayName": "cold_as_hell",
    "userId": "7744860191",
    "username": "cold_as_hell",
    "profileUrl": "https://weibo.com/u/7744860191",
    "verified": false,
    "location": "海外 印尼"
  },
  "likeCount": 0,
  "sentiment": {
    "polarity": "neutral",
    "score": 0
  }
}
```

**Hot-search topic row**

| Field | Type | What it does |
|---|---|---|
| `recordType` | string | Marks this row as a `hotSearchTopic`. |
| `topic` | string | Gives the hot-search topic text shown by Weibo. |
| `rank` | integer | Gives the current hot-search rank. |
| `heat` | number | Gives the current topic heat value shown by Weibo. |
| `category` | string | Gives the topic category shown by Weibo. |
| `topicUrl` | string URL | Gives the public link to the hot-search topic. |

**Example hot-search topic row**

This genuine row came from a successful current-beta hot-search run.

```json
{
  "recordType": "hotSearchTopic",
  "topic": "俄罗斯机器人遭推搡后飞踢顾客",
  "rank": 1,
  "heat": 1144508,
  "category": "5001",
  "topicUrl": "https://m.weibo.cn/search?containerid=100103type%3D1%26t%3D10%26q%3D%23%E4%BF%84%E7%BD%97%E6%96%AF%E6%9C%BA%E5%99%A8%E4%BA%BA%E9%81%AD%E6%8E%A8%E6%90%A1%E5%90%8E%E9%A3%9E%E8%B8%A2%E9%A1%BE%E5%AE%A2%23&stream_entry_id=31&isnewpage=1&extparam=seat%3D1%26lcate%3D5001%26c_type%3D31%26band_rank%3D1%26flag%3D0%26cate%3D5001%26dgr%3D0%26realpos%3D1%26q%3D%2523%25E4%25BF%2584%25E7%25BD%2597%25E6%2596%25AF%25E6%259C%25BA%25E5%2599%25A8%25E4%25BA%25BA%25E9%2581%25AD%25E6%258E%25A8%25E6%2590%25A1%25E5%2590%258E%25E9%25A3%259E%25E8%25B8%25A2%25E9%25A1%25BE%25E5%25AE%25A2%2523%26stream_entry_id%3D31%26filter_type%3Drealtimehot%26pos%3D0%26display_time%3D1788402188%26pre_seqid%3D178840218892003450614109&launchid=10000360-page_H5"
}
```

#### 💳 Pricing

Pricing is pay per event. A charge applies when the corresponding public row is successfully returned and saved. The exact price depends on your account tier and appears in the Pricing tab.

| Buyer-facing event | When it applies |
|---|---|
| Post | One public Weibo post is saved to your dataset. |
| Comment | One public Weibo comment is saved to your dataset. |
| Profile | One public Weibo user profile is saved to your dataset. |
| Follower account | One public account that follows the selected Weibo user is saved to your dataset. |

#### 🔌 Integrations

Open the dataset in Apify or read it through the Apify API. Use the source links and IDs in your own analysis workflow.

https://www.youtube.com/watch?v=bNACk1\_S\_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Which result type should I choose for each job?

Choose `searchPosts` for keyword results, `post` for direct post references, `profile` for profile details, `followers` or `following` for a user's network, `feedPosts` for a public feed, `hotTimeline` for current hot-timeline posts, `hotSearch` for current hot-search topics, and `comments` for comments on public posts.

##### Can I enter several search terms in one run?

Yes. Enter a main term and equivalent Chinese or Latin terms in `searchTerms`. They form one search, not separate search jobs. Use another run for a different search.

##### How does the Actor handle the same source item found more than once?

The first eligible occurrence is saved. If another submitted term or reference finds the same source item later, that later match is ignored. The saved post keeps the first matching `searchTerm`.

##### What happens when Weibo does not provide a field?

Optional fields are omitted from the row when Weibo does not provide them. The Actor keeps public source values and does not fill in missing facts.

##### How do promoted-post and sentiment options work?

`promotedPostFilter` applies to search, direct post, feed, and hot-timeline requests. `includeSentiment` adds Chinese-language polarity and scores to supported post and comment rows. Both fields are ignored for other result types.

##### Can I collect private or deleted Weibo content?

No. The Actor is for publicly accessible Weibo content. Private, deleted, login-only, or otherwise unavailable content is outside the supported scope.

##### What happens if I leave `maxItems` empty?

The Actor returns all available results until the source is exhausted. The schema does not set a fixed maximum, and the source may expose fewer results.

##### Do I need a Weibo login or source API key?

No buyer-supplied Weibo credential is needed for publicly accessible content. The Actor does not promise access to private or login-only data.

### 📝 Changelog

**v0.0** (03-09-2026)

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~weibo-scraper/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [Douyin Analytics Scraper](https://apify.com/maximedupre/douyin-analytics-scraper): Compare Weibo hot-search topics with current Douyin trend ranks and heat values.
- [Zhihu Search Scraper: Q\&A](https://apify.com/maximedupre/zhihu): Collect longer public Chinese Q\&A and article discussions by keyword or URL.
- [RedNote User Posts Scraper](https://apify.com/maximedupre/rednote-user-posts-scraper): Review public RedNote and Xiaohongshu post cards from creator profiles.
- [Twitter Scraper](https://apify.com/maximedupre/twitter-scraper): Collect public X posts, profiles, network members, and regional trends for cross-platform monitoring.
- [Reddit Comments Search Scraper](https://apify.com/maximedupre/reddit-comments-search-scraper): Search public Reddit comments for product, brand, or topic discussions.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `resultType` (type: `string`):

Choose the kind of public Weibo data to collect. Each run uses one result type.

## `searchTerms` (type: `array`):

Required for Search posts. Enter one main keyword. Add equivalent Chinese or Latin terms for the same search to improve recall. Weibo can also add recognized Chinese variants for some Latin-language brand searches. These values are used as one search, not as separate search jobs.

## `searchDateFrom` (type: `string`):

Optional first date for Search posts. Use YYYY-MM-DD. Dates use UTC.

## `searchDateTo` (type: `string`):

Optional last date for Search posts. Use YYYY-MM-DD. Dates use UTC.

## `postReferences` (type: `array`):

Required for Get a post and Get post comments. Enter one or more public Weibo post IDs or URLs. Keep long IDs exactly as the source gives them.

## `userReferences` (type: `array`):

Required for Get a profile, Get followers, Get following, and Get feed posts. Enter one or more public Weibo user IDs or profile URLs. Each value is used for the selected result type.

## `promotedPostFilter` (type: `string`):

For Search posts, Get a post, Get feed posts, and Get hot timeline posts, choose which posts to keep. This field is ignored for other result types.

## `includeSentiment` (type: `boolean`):

For Search posts, Get a post, Get feed posts, Get hot timeline posts, and Get post comments, add Chinese-language sentiment polarity and scores. This field is ignored for other result types.

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

Optional work limit. Stop after this many returned items. Leave it empty to continue until the source is exhausted.

## Actor input object example

```json
{
  "resultType": "searchPosts",
  "searchTerms": [
    "weibo"
  ],
  "promotedPostFilter": "all",
  "includeSentiment": false,
  "maxItems": 1
}
```

# Actor output Schema

## `dataset` (type: `string`):

Open the collected Weibo results.

# 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 = {
    "resultType": "searchPosts",
    "searchTerms": [
        "weibo"
    ],
    "maxItems": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/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 = {
    "resultType": "searchPosts",
    "searchTerms": ["weibo"],
    "maxItems": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/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 '{
  "resultType": "searchPosts",
  "searchTerms": [
    "weibo"
  ],
  "maxItems": 1
}' |
apify call maximedupre/weibo-scraper --silent --output-dataset

```

## MCP server setup

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