Weibo API: keyword search, comments, repost chains and English translation
Based on the 2026-10-25 specification snapshot
Quick answer
The Weibo API collects keyword search results, the comments and reposts of a single post, and can trace a repost upward through its chain (depth 3 by default, up to 10), all as asynchronous tasks. Translation works by keyword subscription: subscribe with English keywords, the system backfills the last 30 days of posts and adds English machine translation, and you read translated posts, comments and reposts through /weibo/translate/search, /weibo/translate/pushs and /weibo/translate/reposts. Data is collected by web crawlers from content publicly published on Weibo.
Data you get
Fields follow the 2026-10-25 specification snapshot. The snapshot does not enumerate search-result post fields, so rows marked "illustrative sample" are taken from the sample data below; confirm the production fields against your trial data. The snapshot also does not mark linking fields such as post_id and parent_id as required, so confirm their presence with trial data.
| Data | Fields | Endpoint |
|---|---|---|
| Keyword search 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} |
| Post comments | id, post_id, author, author_id, content, push_type, sentiment, tm, tm_crawler, region | GET /weibo/pushs/task/{task_id} |
| Post reposts | id, parent_id, url, author, author_id, content, datetime, tm, like_count, comment_count, share_count, sentiment, region | GET /weibo/reposts/task/{task_id} |
| Repost chain (start post toward the original) | data, depth, post_url, status, task | GET /weibo/repost/parent/task/{task_id} |
| Public account timeline | profile, timelines, task | GET /weibo/users/task/{task_id} |
| Translated posts | data, total_count | POST /weibo/translate/search |
| Translated comments | id, post_id, author, author_id, content, push_type, sentiment, tm, tm_crawler, region | POST /weibo/translate/pushs |
| Translated reposts | id, parent_id, url, author, author_id, title, content, sentiment, tm, tm_crawler, region | POST /weibo/translate/reposts |
Endpoints
Base URL: https://api.infominer.io/api/v2. Send your API key in the auth-header request header. Parameters marked * are required.
| Method | Path | What it does | Main parameters |
|---|---|---|---|
| POST | /weibo/search/task |
Creates a keyword search task with an optional date range and page limit. | keyword* end_date max_pages start_date |
| GET | /weibo/search/task/{task_id} |
Polls a search task; once DONE it returns the posts and total_count, paged. | task_id* page pageSize |
| POST | /weibo/pushs/task |
Creates a comment task from a post URL, with sort order and optional second-layer replies. | post_url* crawl_second_layer get_all order_type |
| GET | /weibo/pushs/task/{task_id} |
Polls a comment task; once DONE it returns comments, up to 1000 per page. | task_id* page pageSize |
| POST | /weibo/reposts/task |
Creates a repost collection task from a post URL. | post_url* |
| GET | /weibo/reposts/task/{task_id} |
Polls a repost task; once DONE it returns repost records, each with parent_id. | task_id* page pageSize |
| POST | /weibo/repost/parent/task |
Traces a repost upward through its chain, fetching parent posts not yet stored. | post_url* depth |
| GET | /weibo/repost/parent/task/{task_id} |
Polls a repost-chain task; when DONE or PARTIAL it returns the chain retrieved so far and its post count. | task_id* |
| POST | /weibo/users/task |
Creates a public account timeline task for an account ID and date range. | author_id* endDate* startDate* |
| GET | /weibo/users/task/{task_id} |
Polls a timeline task; once DONE it returns the profile and the timelines. | task_id* |
| POST | /weibo/translate/search |
Queries translated posts for subscribed keywords by date range, sort order and page. | endDate* page* sorted* startDate* dateType keywords pageSize request_id |
| POST | /weibo/translate/pushs |
Returns the translated comments of one post by post_id. | post_id* page pageSize |
| POST | /weibo/translate/reposts |
Returns the translated reposts of one original post by post_id. | post_id* page pageSize request_id |
How to get the data
- POST /weibo/search/task with keyword (required) and optional start_date, end_date and max_pages. The response carries the task id and a status (INIT in the snapshot example).
- Poll GET /weibo/search/task/{task_id}. When the status is DONE the same response carries the posts (data) and total_count, paged with page and pageSize (up to 100); at FAILED, stop and handle the failure.
- For posts you want to go deeper on, create a comment task with POST /weibo/pushs/task (order_type hot, time or both; crawl_second_layer adds second-layer replies) or a repost task with POST /weibo/reposts/task, then poll each one.
- To find where a repost came from, POST /weibo/repost/parent/task with post_url and depth. Parent posts not yet in the database are fetched automatically, and a DONE or PARTIAL task returns the chain retrieved so far, ordered from the starting post toward the original.
- Translation: during onboarding we set up your English keyword subscription; the system backfills the last 30 days of posts and translates them into English. Then query translated posts with POST /weibo/translate/search by date range and sort order, and use post_id to read translated comments and reposts.
curl examples
Create a keyword search 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}'
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"
Query translated posts (subscribed keywords)
curl -X POST https://api.infominer.io/api/v2/weibo/translate/search \
-H "auth-header: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keywords": "coffee OR latte", "startDate": "2026-06-01 00:00:00", "endDate": "2026-06-30 23:59:59", "dateType": "post_time", "sorted": "tm", "page": 1, "pageSize": 50}'
Sample JSON
Illustrative data written by hand: accounts are sample_user_n and IDs are obviously fake. These are not real posts.
Task creation response (Illustrative data)
{
"id": "00000000-0000-4000-8000-000000000001",
"keyword": "手冲咖啡",
"status": "INIT"
}
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
}
]
}
How posts and comments link
Comment and repost tasks are both created from the post URL (post_url). Comment records link to their post through the post_id field, and repost records link to the post they reposted through parent_id. The repost-chain task runs the other way: from one repost it follows parent links toward the original and stops when no parent link remains or the depth limit is reached, so reaching the original is not guaranteed. It returns an array ordered from the starting post toward the original, with depth giving the number of posts retrieved. The translation endpoints keep the same links: translated comments have a post_id field and translated reposts a parent_id field.
History and limits
- Translation is a keyword subscription: after you subscribe English keywords, the system backfills the last 30 days of posts with English machine translation. Only posts covered by subscribed keywords are translated; arbitrary posts are not translated on demand.
- English keywords are converted into Chinese search terms before collection, and the translation is machine translation.
- Repost-chain depth defaults to 3 and can go up to 10.
- Page-size caps: 100 for search results and reposts, 1000 for comments; 1000 for translated comments and 100 for translated reposts.
- How far back keyword search can go, volume per task and refresh frequency are confirmed per project scope.
Delivery format
All endpoints return JSON. Task endpoints carry the data in the poll response once DONE; the translation endpoints are queries that return data and total_count directly. Batch files or other delivery methods are confirmed per project scope.
Request a trial
Tick Weibo in the form below 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.
FAQ
- Can I query the Weibo API with English keywords?
- Yes, through a keyword subscription. During onboarding you subscribe English keywords; the system backfills the last 30 days of matching posts with English machine translation, and you query them through /weibo/translate/search. Queries read translated records that already exist and do not trigger translation of arbitrary posts; the coverage available to you is confirmed at onboarding.
- How do I trace where a Weibo repost came from?
- Call POST /weibo/repost/parent/task with the repost URL and a depth (3 by default, up to 10). When the task completes it returns the chain retrieved, ordered from that repost toward the original, stopping when no parent link remains or the depth limit is reached.
- Can comments include second-layer replies?
- Yes. Set crawl_second_layer to true when you create the comment task. It defaults to false.
- How is the Weibo data collected?
- By web crawlers, from content publicly published on Weibo. 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.
- How far back does Weibo data go?
- Translated data is backfilled for the last 30 days when you subscribe. The range for keyword search tasks is confirmed per project scope.