# Weibo Trending Rankings Scraper (`automation-lab/weibo-public-hot-search-rankings`) Actor

Capture current Weibo public hot-search topics with original rank, heat, keyword link, label and UTC observation time for recurring Chinese trend snapshots.

- **URL**: https://apify.com/automation-lab/weibo-public-hot-search-rankings.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.98 / 1,000 item extracteds

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

## Weibo Trending Rankings Scraper

Capture a current **Weibo trending rankings** snapshot: public hot-search topic, original rank, Weibo-reported heat, keyword search link, optional label and UTC retrieval time. Run on demand or schedule daily to compare snapshots in your own dataset. No Weibo account is required.

### Who is it for?

- China-market researchers track which topics currently occupy top positions.
- Editorial teams compare middle-ranked topics with the headline top ten.
- Data analysts schedule a full snapshot, then join successive exports by topic and timestamp to identify movement.

### Why use this Actor?

The default dataset has one typed row per ranked topic, rather than an unstructured HTML page. Original Weibo ranks are retained when filters are used; filtering never renumbers them. A snapshot time on every row makes later exports comparable. The Actor does not scrape posts, comments, profiles, or historical topic traffic.

### What data does it collect?

| Field | Meaning |
| --- | --- |
| `topic` | Current Chinese topic text from Weibo |
| `rank` | Original one-based Weibo ranking position |
| `heat` | Weibo's reported heat number; not a post count |
| `keywordUrl` | Encoded Weibo search URL for the topic |
| `label` | Weibo's label if supplied, otherwise `null` |
| `retrievedAt` | UTC timestamp when the ranking response was processed |
| `sourceUrl` | Public Weibo hot-search page |

Promoted entries without a numeric rank are excluded. The source may have fewer ranked rows than `maxItems`; requesting more does not generate nonexistent records.

### Get started

1. Run with the default input to capture up to 50 currently ranked topics.
2. Choose `minRank: 11` and `maxRank: 25` to inspect the middle section rather than the most visible ten.
3. Limit dataset volume with the maximum-topics input; optionally use a heat threshold or topic-substring filter.
4. Download the default dataset as JSON or CSV, or schedule runs from Apify Console for fresh snapshots.

### Input parameters

| Input | Default | Purpose |
| --- | --- | --- |
| `maxItems` | 50 | Maximum rows, 1–100 |
| `minRank` | 1 | Minimum original rank, 1–100 |
| `maxRank` | 100 | Maximum original rank, 1–100 |
| `minHeat` | 0 | Minimum source heat, nonnegative integer |
| `keyword` | unset | Case-insensitive substring filter for current topic text |

Filters apply to the same current ranking, not a historical keyword search. An unmatched keyword yields zero results, not an invented record. Invalid bounds fail explicitly.

### Example input

```json
{"maxItems":10,"minRank":1,"maxRank":10}
```

For a full recurring snapshot, use `{"maxItems":100,"minRank":1,"maxRank":100}` and set a daily schedule. There is no built-in history, change detector or email alert: retain datasets from successive runs in your own workflow.

### Example output

This shape is based on a live public ranking response; titles and heat values change continuously:

```json
{"topic":"英语才是普通人的终极杠杆","rank":1,"heat":2259664,"keywordUrl":"https://s.weibo.com/weibo?q=%E8%8B%B1%E8%AF%AD%E6%89%8D%E6%98%AF%E6%99%AE%E9%80%9A%E4%BA%BA%E7%9A%84%E7%BB%88%E6%9E%81%E6%9D%A0%E6%9D%86","label":null,"retrievedAt":"2026-09-29T06:05:00.000Z","sourceUrl":"https://weibo.com/hot/search"}
```

The example timestamp is illustrative; each actual record contains the time of that run.

### How much does it cost to collect Weibo hot-search rankings?

The Actor uses pay-per-event: a one-time `start` charge on a successful nonempty snapshot and one `item` event per accepted result. Check the **Pricing** tab for the current account tier before running. At the BRONZE tier the current price is $0.00005 per nonempty run plus $0.001625 per accepted topic. For 10 topics the estimated charge is $0.01630; for 50 topics it is $0.08130. The FREE, SILVER and GOLD/PLATINUM/DIAMOND spend tiers differ; these tiers depend on qualifying monthly Store spend rather than the number of topics in one run. A 10-topic snapshot incurs one start plus ten item events; a 50-topic snapshot incurs one start plus fifty. Filters that return no rows incur no Actor-defined events, although platform compute may still apply. Charges are not based on raw response size or rejected/unranked entries. These are estimated Actor charges, not guaranteed invoices or payouts: refunds, fraud, disputes, taxes, corrections and contractual clawbacks can change a finalized payout. Platform compute and account terms can also affect total spend.

### Snapshot comparison tips

When you join daily results, use both topic and retrieval date. A topic can disappear, return later, or move several positions while its heat varies independently. Compare rank and heat separately; the Actor does not calculate growth rates. If a filter excludes a topic on one day, that absence is not proof the topic disappeared from the full public ranking. Use the unfiltered full-list input for reliable downstream differences.

### Scheduling and integrations

Schedule a full ranking input once per day in Apify Console, then export each default dataset as CSV to Google Sheets, Excel, a warehouse, or an automation workflow. Preserve `retrievedAt` when joining snapshots: rank changes between runs are not detected by the Actor itself. To follow up on individual topics, use `keywordUrl` or link public content workflows; these links can encounter Weibo's visitor challenge independently of the ranking API.

### API usage: cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/automation-lab~weibo-public-hot-search-rankings/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"maxItems":10,"minRank":1,"maxRank":10}'
```

Keep tokens in environment variables for real automations, rather than committing them to source files.

### API usage: JavaScript

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/weibo-public-hot-search-rankings').call({ maxItems: 10 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### API usage: Python

```python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/weibo-public-hot-search-rankings').call(run_input={'maxItems': 10})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### MCP use

Connect Apify MCP in Claude Code:

```bash
claude mcp add --transport http apify \
  'https://mcp.apify.com?tools=automation-lab/weibo-public-hot-search-rankings'
```

For Claude Desktop, Cursor, or VS Code clients supporting HTTP MCP, configure the remote server:

```json
{"mcpServers":{"apify":{"url":"https://mcp.apify.com?tools=automation-lab/weibo-public-hot-search-rankings"}}}
```

Example prompts: “Get the current top ten public Weibo hot-search topics, with ranks and heat” and “Capture the current topics in Weibo ranks 11–25.” Configure your client's Apify authentication securely.

### Limitations and troubleshooting

The ranking is a point-in-time public snapshot, not a search index, archive, or guaranteed complete list. It reflects the source's current numbers, which can change rapidly and are not independently audited. Weibo can challenge requests or change the JSON response without notice. A challenge, missing ranking, or malformed payload fails explicitly rather than returning a misleading empty snapshot. Retry after checking run logs; contact support with the run link if a previously working input fails repeatedly. No login, proxy selector, translation, post/comment access or historical backfill is supported.

### Legality and responsible use

Use public trend data in accordance with Weibo's terms and applicable laws. Do not infer private user behavior from a ranking, or treat heat as verified audience size. Respect access restrictions on the linked topic pages.

### FAQ

**Can I collect old rankings?** No. Each run captures only the source's currently visible ranking. Schedule future runs and keep their datasets to build your own series.

**Why are there fewer than 50 rows?** The source can include unranked promoted entries, or filters can remove topics. `maxItems` is an upper bound.

**Why did a run fail instead of outputting zero rows?** An empty or challenged upstream response is not a valid current snapshot. A deliberate keyword filter with no match succeeds with zero rows.

### Related Actors

For public Weibo posts and profiles, see [Weibo Posts and Profiles Scraper](https://apify.com/automation-lab/weibo-posts-profiles-scraper). For a comparable trending snapshot from another Chinese platform, see [Douyin Hot Search Trends Scraper](https://apify.com/automation-lab/douyin-hot-search-trends). These Actors serve different sources or record types.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/weibo-public-hot-search-rankings/changelog.md

# Actor input Schema

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

Return at most this many ranked topics, ordered by their original Weibo position.

## `minHeat` (type: `integer`):

Only include topics with a reported Weibo heat number at or above this value.

## `minRank` (type: `integer`):

Include original Weibo positions starting at this rank.

## `maxRank` (type: `integer`):

Include original Weibo positions up to this rank.

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

Optional case-insensitive substring filter over current topic text; not a historical search.

## Actor input object example

```json
{
  "maxItems": 10,
  "minHeat": 0,
  "minRank": 1,
  "maxRank": 100
}
```

# Actor output Schema

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

Default dataset with one row per current topic.

# 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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/weibo-public-hot-search-rankings").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 = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/weibo-public-hot-search-rankings").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 '{
  "maxItems": 10
}' |
apify call automation-lab/weibo-public-hot-search-rankings --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/weibo-public-hot-search-rankings"
        }
    }
}
```

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/IKQROJ23EQXtp0LAz/builds/3O22YwM2Ft4ph8wDe/openapi.json
