Weibo 微博 Scraper — Hot Search, Trends, Posts & Comments
Pricing
from $3.00 / 1,000 weibo post extracteds
Weibo 微博 Scraper — Hot Search, Trends, Posts & Comments
Zero-cookie Weibo (微博) scraper with automatic visitor session bootstrap. Extract real-time Top 50 Hot Search, Trending Topics, Hot Feed posts, post details + comments, public user profiles, and keyword trend signals. 512MB pure HTTP, MCP ready.
Pricing
from $3.00 / 1,000 weibo post extracteds
Rating
0.0
(0)
Developer
方圆 方
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 hours ago
Last modified
Categories
Features
Share
Weibo Trends, Posts, Comments & Profiles Scraper
Collect public Weibo hot-search rankings, topic bands, hot-feed samples, individual posts and comments, profiles, and keyword suggestions in one structured dataset. This Actor uses pure HTTP with 512 MB default memory (configured range: 256–1024 MB); it does not start a browser.
Actor ID: flowery_bluebird_jay/weibo-trends-posts-scraper.
It attempts automatic visitor SUB/SUBP session setup when you do not supply a cookie. Weibo may still require a valid account session, restrict an endpoint, or block the request. “No supplied cookie” is a convenience, not a guarantee of anonymous access. This repository has offline regression coverage; no throughput, availability, or current Store ranking benchmark is claimed.
What each mode returns
| Mode | Output | Boundaries and defaults |
|---|---|---|
hot_search | hot_search, trending_topic, optional hot_feed_post | Up to min(50,maxItems) hot searches, min(10,maxItems) topic-band rows, and min(10,maxItems) feed posts. Optional component failures are logged. |
hot_feed | hot_feed_post | Up to maxItems posts. Optional keywords match text, hashtags, or author names in a bounded feed sample. |
post_detail | post_detail, optional comment | One detail per supplied target; attempts optional long-text expansion. Empty targets try one current hot-feed post. Comments are capped separately per post. |
profile | profile | One public profile per target. Empty targets use UID 1195230310. Optional profile-detail fields may be blank. |
keyword_signals | keyword_signal, matching hot_feed_post | Suggestions per keyword, plus up to min(15,maxItems) matching feed posts. Empty keywords default to 华为 and AI. This is not full-site keyword search. |
maxItems is not a global dataset limit. For example, hot-search components can produce up to 70 rows; explicit post/profile target lists and keyword suggestions have their own bounds. Feed filtering scans at most five pages and may return no matches. Comments and feed pages are deduplicated by numeric identity, with bounded pagination and stale-cursor termination.
Complete input example
The example below is an illustrative post-detail fixture, not a claim that this example post exists. Replace the post URL with your target. The complete machine-readable fixture is tests/fixtures/input.json.
{"mode": "post_detail","maxItems": 25,"includeHotFeedSample": true,"keywords": ["AI"],"postInputs": ["https://weibo.com/1195230310/AbCd12345"],"includeComments": true,"maxCommentsPerPost": 20,"profileInputs": ["1195230310"],"cookieString": "","requestDelayMs": 400,"proxyConfiguration": {"useApifyProxy": false}}
| Input | Default | Validation / behavior |
|---|---|---|
mode | hot_search | One of the five modes above. |
maxItems | 25 | Integer 1–200; per-component behavior is described above. |
includeHotFeedSample | true | Boolean; used by hot_search. |
keywords | [] | At most 50 strings, each at most 200 characters; defaults apply in keyword_signals. |
postInputs | [] | At most 200 strings, each at most 2048 characters. |
includeComments | true | Boolean; used by post_detail. |
maxCommentsPerPost | 20 | Integer 1–100. |
profileInputs | [] | At most 200 strings, each at most 2048 characters; profile default applies when empty. The UI prefill suggests the default UID. |
cookieString | "" | Optional secret, single-line Cookie header, at most 16384 characters. Never put cookies in datasets or shared examples. |
requestDelayMs | 400 | Integer 100–5000; request pacing adds 0–140 ms jitter. |
proxyConfiguration | {"useApifyProxy":false} | Apify Proxy or custom proxyUrls settings; useApifyProxy must be boolean. Nonempty custom proxyUrls are forwarded even when useApifyProxy is false. Proxy costs are separate. |
Numbers must be JSON integers and switches must be JSON booleans; strings such as "20" or "false" are rejected. Null values are rejected for configured fields. Blank list entries are ignored and duplicate targets/keywords are removed. Invalid field types and limits fail before requests begin. An invalid individual post/profile target produces an unbilled error row so other targets can continue.
Post targets accept a bare 6–20 character alphanumeric mblogid or numeric post ID, or full http(s) URLs shaped as weibo.com/<uid>/<mblogid>, /detail/<id>, or /status/<id>. Mobile m.weibo.cn detail/status links are accepted too. Profile targets accept 5–15 digit UIDs and /u/<uid> or /<uid> URLs. Non-Weibo hosts, credentials in URLs, custom ports, and unrelated paths are rejected. Display-name profile URLs are not supported.
Complete output example
Every row has status, record_type, and a UTC ISO scraped_at. Fields vary by record type; absent optional values are normally "", 0, or []. Source timestamp strings are preserved, not converted. The synthetic detail-and-comment result for the input fixture is:
[{"status": "ok","record_type": "post_detail","post_id": "500000000000001","mblogid": "AbCd12345","url": "https://weibo.com/1195230310/AbCd12345","title_or_word": "#AI# Example public post.","text": "#AI# Example public post.","hashtags": ["AI"],"created_at": "Example source timestamp","source_device": "Web","ip_location": "Example region","likes": 2,"comments_count": 1,"reposts_count": 3,"engagement_total": 6,"hot_score": 6,"author_name": "Example account","author_uid": "1195230310","author_verified": false,"author_avatar_url": "","image_urls": [],"image_count": 0,"video_url": "","scraped_at": "2026-11-27T00:00:00+00:00","source_input": "https://weibo.com/1195230310/AbCd12345"},{"status": "ok","record_type": "comment","post_id": "500000000000001","comment_id": "500000000000002","mblogid": "AbCd12345","author_name": "Example commenter","author_uid": "1234567890","text": "Example comment.","title_or_word": "Example comment.","likes": 1,"replies_count": 0,"ip_location": "","created_at": "Example source timestamp","scraped_at": "2026-11-27T00:00:00+00:00"}]
tests/fixtures/output.json contains that complete pair. tests/fixtures/all_record_types.json contains full synthetic examples for every success type and an error row.
| Record type | Additional fields |
|---|---|
hot_search | rank, title_or_word, word_scheme, category, label, hot_score, is_ad, url |
trending_topic | rank, title_or_word, summary, category, hot_score, mentions_count, reads_count, author_name, cover_url, url |
hot_feed_post, post_detail | All post fields shown above; source_input is added for explicit/auto-selected post details only. |
comment | All comment fields shown above. |
profile | uid, author_name, title_or_word, description, verified, verified_reason, followers_count, friends_count, statuses_count, gender, location, ip_location, sunshine_credit, account_created_at, avatar_url, url, source_input |
keyword_signal | source_keyword, rank, title_or_word, category, hot_score, discuss_count, url |
| Error row | status: "error", a record type, error, scraped_at, and source_input or source_keyword; comment errors also identify the post. |
Hot scores are source counters with different meanings by type, not one comparable sentiment or popularity metric. Post hot_score equals likes + comments + reposts. A profile's fields and a feed author's metadata differ; feed rows do not contain a full profile extraction.
Configured pay-per-event plan
These are the exact suggested local plan events and rates in .actor/pay_per_event_plan.json. Confirm the Actor's deployed Store pricing before a paid run. The table multiplies event counts only; it excludes proxy traffic and any separate platform charges.
| Exact event | USD / 1 event | USD / 100 events | USD / 1,000 events |
|---|---|---|---|
apify-actor-start | $0.005 | $0.50 | $5.00 |
post-scraped (primary) | $0.003 | $0.30 | $3.00 |
hot-topic-scraped | $0.001 | $0.10 | $1.00 |
comment-scraped | $0.0005 | $0.05 | $0.50 |
profile-scraped | $0.003 | $0.30 | $3.00 |
The start event is platform-managed; the source does not manually charge it. Hot-search, topic-band, and keyword-suggestion rows use hot-topic-scraped. Feed/detail rows use post-scraped. Comments and profiles use their corresponding events. Each successful row is pushed to the dataset before one explicit event charge. Error rows and empty results have no extraction-event charge; a platform start charge can still apply. A billing-service error is logged without duplicating a delivered row. Dataset delivery failure aborts before billing that row.
For illustration, one start + one post + 20 comments totals $0.018 under this file's rates. Actual totals depend on all emitted record types. For the start row of the table, 100 events means 100 run starts, not 100 results in one run.
Python: Apify Client
Install apify-client in your own environment and set APIFY_TOKEN. This example uses a live workflow rather than the synthetic fixture URL.
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ["APIFY_TOKEN"])run = client.actor("flowery_bluebird_jay/weibo-trends-posts-scraper").call(run_input={"mode": "hot_search", "maxItems": 10, "includeHotFeedSample": False},memory_mbytes=512,)if run["status"] != "SUCCEEDED":raise RuntimeError(f"Actor ended with {run['status']}")for row in client.dataset(run["defaultDatasetId"]).iterate_items():print(row)
Node.js: Apify Client
Install apify-client, set APIFY_TOKEN, and run this as an ES module.
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('flowery_bluebird_jay/weibo-trends-posts-scraper').call({ mode: 'hot_search', maxItems: 10, includeHotFeedSample: false },{ memory: 512 },);if (run.status !== 'SUCCEEDED') throw new Error(`Actor ended with ${run.status}`);const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items); // Follow listItems pagination when the dataset exceeds one page.
These are integration templates; SDK packages and credentials are not installed or exercised by the offline test suite.
n8n / Make HTTP workflow
Use an HTTP Request node in n8n or HTTP module in Make, with Authorization: Bearer <APIFY_TOKEN> stored in the platform's credential store. Do not expose tokens in public workflow exports.
- POST
https://api.apify.com/v2/acts/flowery_bluebird_jay~weibo-trends-posts-scraper/runs?memory=512,Content-Type: application/json, with the Actor input as JSON, for example{"mode":"hot_search","maxItems":10,"includeHotFeedSample":false}. - Save
data.idfrom the response. Wait using the workflow's delay/sleep node, then GEThttps://api.apify.com/v2/actor-runs/{RUN_ID}with the same authorization header. Repeat while the run isREADYorRUNNING; handle failures, aborts, and timeouts explicitly. Set a finite workflow polling deadline. - Once
data.statusisSUCCEEDED, savedata.defaultDatasetIdand GEThttps://api.apify.com/v2/datasets/{DATASET_ID}/items?format=json&clean=true&offset=0&limit=1000. Paginate with increasing offsets until no more rows arrive. Useformat=csvfor a CSV export. - Inspect
statuson each dataset row. A successful run can contain per-target error rows, and a successful empty run is a valid outcome. Map successful rows to your destination and route errors to review.
Claude Desktop / Cursor: local MCP configuration
A companion local MCP server is required; it is not bundled with this Actor. With that server present and its weibo_trends_posts tool configured, add the following to Claude Desktop's MCP config or Cursor's .cursor/mcp.json. Replace the absolute path and use a private token value or your client's supported secret mechanism.
{"mcpServers": {"apify-cn": {"command": "node","args": ["/ABSOLUTE/PATH/apify_cn_mcp_server/src/server.mjs"],"env": {"APIFY_TOKEN": "YOUR_APIFY_TOKEN"}}}}
Restart the client, confirm the server advertises weibo_trends_posts, then ask: “Use weibo_trends_posts with mode=hot_search, maxItems=10, and includeHotFeedSample=false; report the returned rows and any errors.” Match the server's advertised tool schema for the actual argument shape. The APIFY_TOKEN is for Apify, separate from an optional Weibo cookie. This configuration has not been tested against an installed companion server in this offline hardening pass.
Reliability and limitations
All HTTP paths, including visitor setup and long-text/profile-detail requests, use an 18-second timeout. There are at most three total attempts per request, with 1-second then 2-second exponential backoff only for HTTP 429, HTTP 5xx, or timeouts. Other HTTP failures, ordinary connection errors, invalid JSON/JSONP, and schema errors are not retried. Redirects are disabled so headers are not forwarded to another destination. Requests are limited to Weibo hosts.
Missing required response objects/arrays fail clearly; valid empty arrays return no fabricated rows. Malformed list entries are skipped, and missing optional nested fields are normalized safely. Optional enrichment can fail while retaining the base post/profile; topic-band and feed-sample failures are logged. Comments are accessible top-level comments, not a promise of every nested reply or the full historical thread. Media URLs are links only; files are not downloaded.
No private posts, login automation, CAPTCHA solving, historical completeness, engagement authenticity, sentiment inference, or anti-blocking guarantee is provided. Weibo can change undocumented endpoints and counters. A supplied cookie can expire; a proxy may not resolve an access restriction. Review applicable access permissions and platform terms for your use.
How does this compare with other solutions?
Choose this Actor when a small pure-HTTP workflow, explicit mixed-record pricing, and a consistent dataset fit your task. Other Store actors, browser workflows, custom crawlers, and authorized data APIs may offer different coverage, session handling, support, or historical access. This repository does not verify current competitor prices, ratings, uptime, or performance, so it makes no “cheapest,” percentage-savings, or speed superiority claim. Compare current deployed terms, a representative sample, and your required fields before committing to a workflow.
FAQ
Do I need a Weibo login? The Actor first attempts visitor setup without a supplied cookie. Some endpoints or targets may still require a valid session or remain unavailable.
Why did keyword search return no posts? It filters a maximum of five hot-feed pages, rather than querying all Weibo posts. Suggestions can still be returned independently.
Can maxItems=1 produce several rows? Yes. Hot-search components each have their own cap. Comments, explicit targets, and suggestions also have separate limits.
Do errors cost an extraction event? No. The source only explicitly charges successful delivered rows. The platform-managed run-start event may still apply even when no rows are found.
Why are profile or media fields blank? The upstream response may omit them or deny optional enrichment. Blank fields do not imply the underlying account has no such data.
Are fixtures live results or performance proof? No. They are synthetic contract examples. Tests mock all network and SDK calls; live acceptance and deployed billing remain separate checks.
Can I export JSON, CSV, or spreadsheets? The default dataset contains JSON rows; use Apify's dataset export facilities for available export formats. Mixed record types have different columns, so filter by record_type when analyzing them.
Local development and offline verification
The Dockerfile uses the Apify Python 3.11 image and installs the bounded dependencies in requirements.txt. Deployment/build is outside this offline validation. After installing dependencies in your own environment, local execution is python3 -m src.main --local --input input.json --output output_weibo.json; local mode does not use Actor dataset storage or PPE charging.
The test suite itself requires only Python's standard library. It stubs the optional Apify SDK and HTTP client, uses no external network, and removes its temporary output inside tests/.
$PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v