Weibo keyword search API
Based on the 2026-10-25 specification snapshot
Quick answer
POST /weibo/search/task starts an asynchronous crawl of Weibo search results for one keyword, optionally bounded by start_date, end_date and max_pages. Poll GET /weibo/search/task/{task_id}; once the status is DONE the same response carries the posts and total_count, up to 100 posts per page. In the illustrative sample each post has its URL, author, content, timestamp, metadata tags, a sentiment label and like, comment and share counts. Data is collected by web crawlers from content publicly published on Weibo.
What teams use it for
- Track how people on Weibo talk about a brand, product category or competitor, and pull the posts behind a spike.
- Build a dated set of posts on a topic for market research or academic work, with engagement counts to rank them.
- Pass the post URLs to the comments and repost endpoints to see how a single post was received and spread.
Endpoints
Base URL: https://api.infominer.io/api/v2. Send your API key in the auth-header request header.
| Method | Path | What it does |
|---|---|---|
| POST | /weibo/search/task |
Creates a keyword search task with an optional date range and page limit. |
| GET | /weibo/search/task/{task_id} |
Polls a search task; once DONE it returns the posts and total_count, paged. |
Request parameters
POST /weibo/search/task
| Parameter | In | Type | Required | Default / allowed | Description |
|---|---|---|---|---|---|
keyword |
body | string | Yes | Search keyword. | |
end_date |
body | string | No | Posts newer than this date are not collected (YYYY-MM-DD). | |
max_pages |
body | integer | No | Maximum number of result pages to crawl. | |
start_date |
body | string | No | Collection stops at posts older than this date (YYYY-MM-DD). |
GET /weibo/search/task/{task_id}
| Parameter | In | Type | Required | Default / allowed | Description |
|---|---|---|---|---|---|
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 | 100 |
Posts per page, max 100. |
Response fields
| Data | Fields | Endpoint |
|---|---|---|
| Posts (illustrative sample) | url, author, author_id, content, tm, datetime, metadata_tags, sentiment, like_count, comment_count, share_count | GET /weibo/search/task/{task_id} |
Code examples
curl: create the task
curl -X POST https://api.infominer.io/api/v2/weibo/search/task \
-H "auth-header: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "手冲咖啡", "start_date": "2026-06-01", "end_date": "2026-06-30", "max_pages": 3}'
curl: poll the task by ID
curl "https://api.infominer.io/api/v2/weibo/search/task/$TASK_ID?page=1&pageSize=100" \
-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/search/task",
headers=HEADERS,
json={
"keyword": "手冲咖啡",
"start_date": "2026-06-01",
"end_date": "2026-06-30",
"max_pages": 3,
},
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/search/task/{task['id']}",
headers=HEADERS,
params={
"page": 1,
"pageSize": 100,
},
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.get("url"), (row.get("content") or "")[: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)
{
"keyword": "手冲咖啡",
"status": "DONE",
"total_count": 2,
"task": {
"id": "00000000-0000-4000-8000-000000000001",
"status": "DONE"
},
"data": [
{
"source": "weiboblog",
"platform": "weibo",
"url": "https://m.weibo.cn/detail/0000000000000001",
"author": "sample_user_1",
"author_id": "0000000000000001",
"content": "周末在巷子里的咖啡店试了新豆子,酸度很柔和,推荐给喜欢浅焙的朋友 #手冲咖啡",
"tm": 1781056800,
"datetime": "2026-06-10 10:00:00",
"type": [],
"metadata_tags": [
"手冲咖啡"
],
"sentiment": "Positive",
"like_count": 12,
"comment_count": 3,
"share_count": 1
},
{
"source": "weiboblog",
"platform": "weibo",
"url": "https://m.weibo.cn/detail/0000000000000002",
"author": "sample_user_2",
"author_id": "0000000000000002",
"content": "整理了三间适合下午工作的咖啡店,插座和座位都在文末清单",
"tm": 1781060400,
"datetime": "2026-06-10 11:00:00",
"type": [],
"metadata_tags": [
"咖啡店",
"下午茶"
],
"sentiment": "Neutral",
"like_count": 5,
"comment_count": 0,
"share_count": 0
}
]
}
Limits and notes
- Search results are read up to 100 per page.
- start_date and end_date bound the crawl: collection stops at posts older than start_date, and posts newer than end_date are not collected.
- How far back search can go, volume per task and refresh frequency are confirmed per project scope.
More Weibo API pages
- Keyword search
- Comments
- Reposts and repost chains
- User timeline
- English translation
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 formFAQ
- Can I search Weibo with English keywords?
- Most Weibo posts are written in Simplified Chinese, so keywords are usually given in Chinese. If your team works in English, the Weibo English translation subscription converts English keywords into Chinese search terms and returns posts with English machine translation.
- How many posts does one search task return?
- max_pages caps how many result pages are crawled; volume per task is confirmed per project scope. Results are read up to 100 per page with page and pageSize.
- What happens if the task fails?
- Poll until the status leaves INIT or RUNNING. At DONE read the data; at FAILED stop and handle the failure, for example by creating the task again.
- 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.