# Weibo Keyword Search Scraper (`opspilot.cc/weibo-keyword-search-scraper`) Actor

Search Weibo posts by keyword. 7 search\_type filters (综合/实时/用户/热门/视频/图片/精华) and 4 time\_scope filters. Page=1 only (~10 items) due to upstream login wall.

- **URL**: https://apify.com/opspilot.cc/weibo-keyword-search-scraper.md
- **Developed by:** [wang wei](https://apify.com/opspilot.cc) (community)
- **Categories:** Social media
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.10 / actor start

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?

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 Keyword Search Scraper

Search the Weibo public timeline by keyword with **7 type filters** and **4 time scopes**. Built for marketing monitoring, trend research, and public sentiment scraping.

**One run = one upstream request.** Pass a keyword and (optional) `searchType` / `timeScope` / `page`. Page is hard-capped at **1** because page=2+ triggers upstream's login wall (verified 2026-08-20). To collect more, run multiple times with different keywords.

- **Actor ID:** `rXAua7eiA6jxRogdF`
- **Build:** `0.1.5`
- **Source:** A hosted Chinese social data API provider (Weibo endpoints)

### What it does

| Input | Output |
|---|---|
| `keyword="美食推荐"` (defaults) + `searchType=1` + `page=1` | ~10 ranked post items matching the keyword, with rank, post\_id, mid, text, source, reposts/comments/attitudes counts, and a flat user profile. Raw upstream payload preserved in `rawData`. |

### Quick start

```json
{
  "keyword": "美食推荐",
  "searchType": 1,
  "timeScope": "",
  "page": 1
}
```

Output dataset has one item per post:

```json
{
  "rank": 1,
  "keyword": "美食推荐",
  "searchType": 1,
  "timeScope": null,
  "page": 1,
  "post_id": "5328347665010605",
  "mid": "5328347665010605",
  "created_at": "Wed Aug 05 00:22:22 +0800 2026",
  "text": "现在拍戏都这么拼吗 [允悲] 女演员工伤 偷胯婆的微博视频",
  "text_length": 57,
  "source": "iPhone 17 Pro Max",
  "pic_ids": [],
  "reposts_count": 142,
  "comments_count": 523,
  "attitudes_count": 1820,
  "user": {
    "user_id": 7491687377,
    "screen_name": "偷胯婆",
    "verified": true,
    "verified_type": 0,
    "followers_count": "2.3万"
  },
  "rawData": { /* full upstream mblog object */ }
}
```

### Input fields

| Field | Required | Default | Notes |
|---|---|---|---|
| `keyword` | yes | `美食推荐` | 1..100 characters. Must be a non-empty string. |
| `searchType` | no | `1` (综合) | One of: `1` 综合 / `61` 实时 / `3` 用户 / `60` 热门 / `64` 视频 / `63` 图片 / `21` 精华. All 7 are wired per §40 (every value the upstream supports must be exposed). |
| `timeScope` | no | `""` (不限) | One of: `""` 不限 / `hour` / `day` / `week` / `month`. |
| `page` | no | `1` | Hard-capped at 1 because page=2+ triggers upstream login wall (§39 maxItems must match upstream's one-page reality). |

### Pricing

Free users are limited to **5 runs per day**. Paid users (`APIFY_USER_IS_PAYING=1`) have unlimited runs. The Actor itself adds no markup — you pay the upstream provider per request plus the standard Apify compute unit cost.

### Output

The Actor pushes one item per post to the default dataset and writes a `SUMMARY` record to the default key-value store with run details (keyword, searchType, timeScope, page, total from upstream, nextPage token, searchRequestId, pageSize, free-run counter, etc.).

### Use it together with the other Weibo Actors

This Actor is the **step ② middle link** of the 3-Actor Weibo MVP-2 set. Use it together with:

| Where in the pipeline | Actor | Console | Use it to |
|---:|---|---|---|
| before / step ① | [Weibo Hot Search Scraper](https://console.apify.com/actors/TF51J1LwZ2AayIXzd) | [Console](https://console.apify.com/actors/TF51J1LwZ2AayIXzd) | step ① — fetch the realtime hot list, get `post_id` and `screen_name` of each trend |
| **after / step ②** | **Weibo Keyword Search Scraper** (you are here) | (step ② — middle link) | step ② — search posts by keyword with 7 type filters and 4 time scopes, get `post_id` of each result |
| after / step ③ | [Weibo Post Detail Scraper](https://console.apify.com/actors/vgIzEKOSpFKlEDVo5) | [Console](https://console.apify.com/actors/vgIzEKOSpFKlEDVo5) | step ③ — pull full post text + up to ~150 comments for each `post_id` |

**You are here:** **Weibo Keyword Search Scraper** — run this on its own for the upstream use case described above.

### Why this Actor exists

Apify has ~50,000 Actors and almost zero Weibo scrapers. This Actor is part of a planned **Weibo MVP-2** set (5 Actors covering hot search, keyword search, user profile, post detail + comments, and channel feed) that targets the gap.

### Source & credits

Data source: a hosted Chinese social data API provider (Weibo endpoints). The provider charges per upstream request; this Actor adds no markup.

### License

MIT

# Actor input Schema

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

One Weibo search keyword, for example: 美食推荐. The Actor is locked to one keyword per run; use multiple runs to search different keywords.

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

Filter by search type. Defaults to value 1 (综合). Pass as a string; the Actor parses it back to integer for the upstream API.

## `timeScope` (type: `string`):

Filter by post age. Empty string = no time filter (default).

## `page` (type: `integer`):

Page number. Hard-capped at 1 because page=2+ triggers the upstream login wall. Run multiple times with different keywords to collect more results.

## Actor input object example

```json
{
  "keyword": "美食推荐",
  "searchType": "1",
  "timeScope": "",
  "page": 1
}
```

# Actor output Schema

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

One normalized dataset item per Weibo post, with the original source record preserved in rawData.

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

Keyword, search type, time scope, page, total from upstream, next page token, search request id, free-run counter, error details.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("opspilot.cc/weibo-keyword-search-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("opspilot.cc/weibo-keyword-search-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 '{}' |
apify call opspilot.cc/weibo-keyword-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,opspilot.cc/weibo-keyword-search-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/rXAua7eiA6jxRogdF/builds/FOCRFlL9vijdnyXcM/openapi.json
