Weibo comments API

Based on the 2026-10-25 specification snapshot

Quick answer

POST /weibo/pushs/task with a post URL starts an asynchronous task that collects that post's comments. order_type takes hot, time or both; crawl_second_layer=true adds second-layer replies; get_all=true turns off the duplicate check so every comment is collected. Poll GET /weibo/pushs/task/{task_id}; once DONE it returns the comments and total_count, up to 1000 per page. Each comment links back to its post through post_id and carries the author, content, a sentiment label and timestamps. Data is collected by web crawlers from content publicly published on Weibo.

What teams use it for

  • See how readers reacted to a brand announcement, product launch or news post, not just what the post said.
  • Compare the sentiment labels of comments across several posts on the same topic.
  • Pair with the repost API to separate people who replied from people who passed the post on.

Endpoints

Base URL: https://api.infominer.io/api/v2. Send your API key in the auth-header request header.

MethodPathWhat it does
POST /weibo/pushs/task Creates a comment task from a post URL, with sort order and optional second-layer replies.
GET /weibo/pushs/task/{task_id} Polls a comment task; once DONE it returns comments, up to 1000 per page.

Request parameters

POST /weibo/pushs/task

ParameterInTypeRequiredDefault / allowedDescription
post_url body string Yes Weibo post URL, for example https://m.weibo.cn/detail/{id}.
crawl_second_layer body boolean No false Also collect second-layer replies.
get_all body boolean No false Turn off the duplicate check and collect every comment.
order_type body string No default hot; allowed hot | time | both Comment sort order.

GET /weibo/pushs/task/{task_id}

ParameterInTypeRequiredDefault / allowedDescription
task_id path string Yes Task ID returned when the task was created.
page query integer No 1 Page number, starting at 1.
pageSize query integer No 1000 Comments per page, max 1000.

Response fields

DataFieldsEndpoint
Comments id, post_id, author, author_id, content, push_type, sentiment, tm, tm_crawler, region GET /weibo/pushs/task/{task_id}

Code examples

curl: create the task

curl -X POST https://api.infominer.io/api/v2/weibo/pushs/task \
  -H "auth-header: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"post_url": "https://m.weibo.cn/detail/0000000000000001", "order_type": "time", "crawl_second_layer": true}'

curl: poll the task by ID

curl "https://api.infominer.io/api/v2/weibo/pushs/task/$TASK_ID?page=1&pageSize=1000" \
  -H "auth-header: YOUR_API_KEY"

Python (requests): create, poll, read

import time
import requests

BASE_URL = "https://api.infominer.io/api/v2"
HEADERS = {"auth-header": "YOUR_API_KEY"}

# 1. Create the task
resp = requests.post(
    f"{BASE_URL}/weibo/pushs/task",
    headers=HEADERS,
    json={
        "post_url": "https://m.weibo.cn/detail/0000000000000001",
        "order_type": "time",
        "crawl_second_layer": True,
    },
    timeout=30,
)
resp.raise_for_status()
task = resp.json()

# 2. Poll until the task leaves INIT / RUNNING
for _ in range(120):
    resp = requests.get(
        f"{BASE_URL}/weibo/pushs/task/{task['id']}",
        headers=HEADERS,
        params={
            "page": 1,
            "pageSize": 1000,
        },
        timeout=30,
    )
    resp.raise_for_status()
    result = resp.json()
    status = result.get("status") or result.get("task", {}).get("status")
    if status not in ("INIT", "RUNNING"):
        break
    time.sleep(15)
else:
    raise SystemExit("task still running; poll it again later")

if status == "FAILED":
    raise SystemExit("task failed")
if status != "DONE":
    print("task ended with status", status, "- results may be incomplete")

# 3. Read the records (use page / pageSize to fetch further pages)
for row in result.get("data", []):
    print(row["post_id"], row["author"], row["content"][:60])

Sample response

Illustrative data written by hand: accounts are sample_user_n and IDs are obviously fake. Fields follow the 2026-10-25 specification snapshot; the sample shows a subset, and the full list is in the table above.

Poll response once the task is DONE (illustrative data)

{
  "task": {
    "id": "00000000-0000-4000-8000-000000000001",
    "status": "DONE"
  },
  "total_count": 2,
  "data": [
    {
      "id": "0000000000000101",
      "post_id": "0000000000000001",
      "author": "sample_user_3",
      "author_id": "0000000000000003",
      "tm": 1781065800,
      "tm_crawler": 1781150400,
      "content": "这家店的浅焙豆子确实不错,周末想去试试",
      "sentiment": "Positive"
    },
    {
      "id": "0000000000000102",
      "post_id": "0000000000000001",
      "author": "sample_user_4",
      "author_id": "0000000000000004",
      "tm": 1781067600,
      "tm_crawler": 1781150400,
      "content": "请问营业时间到几点?",
      "sentiment": "Neutral"
    }
  ]
}

Limits and notes

  • Comments are read up to 1000 per page.
  • crawl_second_layer defaults to false; set it to true for second-layer replies.
  • Comment tasks run a duplicate check by default; set get_all to true to collect every comment.
  • Volume per post and refresh frequency are confirmed per project scope.
Collection: web crawlers collect content publicly published on each platform. Whether this suits your use depends on the purpose and jurisdiction and is for the buyer's legal team to assess; we can provide a description of sources and collection methods.

More Weibo API pages

Request a trial

In the request form below, mention Weibo and tell us the keywords to track (Chinese, or English for a translation subscription), whether you need comments, reposts and repost chains, and the expected volume. We confirm the scope and reply with the arrangements for the trial and API key.

Fill in the form to request a trial. We confirm the scope and reply with trial and integration arrangements.

Fill in the request form

FAQ

How do I get the replies to Weibo comments?
Set crawl_second_layer to true when you create the comment task. It defaults to false.
Which URL format does post_url take?
The specification example uses the mobile post URL, https://m.weibo.cn/detail/{id}.
How do comments link to their post?
Every comment record has a post_id field pointing at the post it belongs to, so comments from many tasks can be joined back to their posts.
How is the data collected? Is this the official Weibo API?
By web crawlers, from content publicly published on Weibo. LargitData is not affiliated with Weibo and this is not Weibo's own API. Whether this suits your use depends on the purpose and jurisdiction and is for your legal team to assess; we can provide a description of sources and collection methods.