微博 帖子评论
检索由MID标识的微博帖子的评论,支持可选的maxId游标分页以及时间或热度排序。用于查看受众讨论、继续翻阅评论区或支持审核和反馈分析。
/v1/weibo/get_post_comments_v1
$0.02
- 价格
- $0.02 / 次成功调用,失败不收费
- 接口 ID
weibo.get_post_comments_v1
参数
-
midstring 必填微博帖子 mid。
示例
5338970373226793 -
sortstring 可选结果集的排序顺序。
可用值:
TIME: 时间HOT: 热门
示例
TIME -
max_idstring 可选由先前响应返回的分页游标。
代码示例
curl -G "https://api.mofa-ai.com/v1/weibo/get_post_comments_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'mid=5338970373226793' \
--data-urlencode 'sort=TIME'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/weibo/get_post_comments_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"mid": "5338970373226793",
"sort": "TIME",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/weibo/get_post_comments_v1");
url.search = new URLSearchParams({
mid: "5338970373226793",
sort: "TIME",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
响应示例
请求参数 {"mid": "5338970373226793", "sort": "TIME"}
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "weibo.get_post_comments_v1",
"cost_usd": 0.02,
"data": {
"code": 0,
"data": {
"ok": 1,
"data": [
{
"id": 5338994019926748,
"mid": "5338994019926748",
"rid": "0_0_0_163414082480157947_0_0_0",
"text": "希望中埃友谊长存",
"user": {
"id": 7747944241,
"url": "",
"svip": 0,
"vvip": 0,
"idstr": "7747944241",
"domain": "",
"gender": "m",
"mbrank": 0,
"mbtype": 0,
"pc_new": 0,
"v_plus": 0,
"weihao": "",
"location": "辽宁",
"verified": false,
"avatar_hd": "https://tvax2.sinaimg.cn/crop.0.0.1080.1080.1024/008slAeBly8h0duoe5g71j30u00u0di1.jpg?KID=imgbed,tva&Expires=1794106681&ssig=A%2FH9cgNTSm",
"follow_me": false,
"following": false,
"icon_list": [],
"description": "",
"profile_url": "/u/7747944241",
"screen_name": "普莱斯加雷泽诺夫",
"avatar_large": "https://tvax2.sinaimg.cn/crop.0.0.1080.1080.180/008slAeBly8h0duoe5g71j30u00u0di1.jpg?KID=imgbed,tva&Expires=1794106681&ssig=F215aBuuWa",
"planet_video": true,
"user_ability": 2097152,
"friends_count": 409,
"verified_type": -1,
"statuses_count": 21,
"followers_count": 53,
"cover_image_phone": "https://ww1.sinaimg.cn/crop.0.0.640.640.640/549d0121tw1egm1kjly3jj20hs0hsq4f.jpg",
"profile_image_url": "https://tvax2.sinaimg.cn/crop.0.0.1080.1080.50/008slAeBly8h0duoe5g71j30u00u0di1.jpg?KID=imgbed,tva&Expires=1794106681&ssig=23A6wmmvQ%2B",
"followers_count_str": "53",
"status_total_counter": {
"like_cnt": "60",
"total_cnt": "60",
"repost_cnt": "0",
"comment_cnt": "0",
"total_cnt_format": 60
}
},
"idstr": "5338994019926748",
"liked": false,
"max_id": 0,
"rootid": 5338994019926748,
"source": "来自 辽宁",
"cmt_ext": "level_type:1",
"pic_num": 0,
"comments": [],
"isExpand": false,
"since_id": 0,
"text_raw": "希望中埃友谊长存",
"rootidstr": "5338994019926748",
"created_at": "Thu Sep 03 09:27:11 +0800 2026",
"hasvisible": false,
"like_counts": 3,
"next_cursor": 0,
"source_type": 4,
"url_objects": [],
"allow_follow": false,
"degrade_type": "normal",
"floor_number": 41,
"readtimetype": "comment",
"total_number": 0,
"biz_mark_type": 0,
"disable_reply": 0,
"item_category": "comment",
"report_scheme": "sinaweibo://mpdialog?scheme=sinaweibo%3A%2F%2Fwbox%3Fid%3Dt8wto09182%26page%3Dpages%2Fcomplaint%2Fcomplaint%26comment%3D%25E5%25B8%258C%25E6%259C%259B%25E4%25B8%25AD%25E5%259F%2583%25E5%258F%258B%25E8…",
"analysis_extra": "author_uid:2656274875|mid:5338970373226793|rid:163414082480157947",
"comment_bubble": {
"id": "tie_0001",
"name": "铁粉专属",
"icon_url": "https://h5.sinaimg.cn/upload/100/1720/2023/06/14/commentbubble_tie_66A6FF.png",
"end_color": "#1A66A6FF",
"obtain_type": 3,
"start_color": "#0066A6FF",
"end_color_dark": "#3366A6FF",
"start_color_dark": "#0066A6FF"
},
"restrict_state": 0,
"previous_cursor": 0,
"restrictOperate": 0,
"source_allowclick": 0,
"match_ai_play_picture": false
},
{
"id": 5338989760086349,
"mid": "5338989760086349",
"rid": "0_0_0_163414082480157947_0_0_0",
"text": "友好交流,共同发展。",
"user": {
"id": 7962202207,
"url": "",
"svip": 1,
"vvip": 0,
"idstr": "7962202207",
"domain": "",
"gender": "f",
"mbrank": 3,
"mbtype": 12,
"pc_new": 0,
"v_plus": 0,
"weihao": "",
"location": "其他",
"verified": false,
"avatar_hd": "https://tvax1.sinaimg.cn/crop.0.0.1080.1080.1024/008GQAwfly8ienakyvksqj30u00u0q4z.jpg?KID=imgbed,tva&Expires=1794106681&ssig=wjtchSx3Ps",
"follow_me": false,
"following": false,
"icon_list": [
{
"data": {
"svip": 1,
"vvip": 0,
"mbrank": 3,
"mbtype": 12
},
"type": "vip"
}
],
"description": "我们发现不是孩子不优秀,是自己要求孩子完美的心遮住了看见孩子优秀的眼睛。",
"profile_url": "/u/7962202207",
"screen_name": "华夏之彦",
"avatar_large": "https://tvax1.sinaimg.cn/crop.0.0.1080.1080.180/008GQAwfly8ienakyvksqj30u00u0q4z.jpg?KID=imgbed,tva&Expires=1794106681&ssig=5gih1%2FtN2c",
"planet_video": false,
"user_ability": 2359296,
"friends_count": 211,
"verified_type": -1,
"statuses_count": 344,
"followers_count": 88,
"cover_image_phone": "https://wx3.sinaimg.cn/crop.0.0.640.640.640/002TLsr9ly1iabh433qorj61o01o04q402.jpg;https://ww1.sinaimg.cn/crop.0.0.640.640.640/549d0121tw1egm1kjly3jj20hs0hsq4f.jpg",
"profile_image_url": "https://tvax1.sinaimg.cn/crop.0.0.1080.1080.50/008GQAwfly8ienakyvksqj30u00u0q4z.jpg?KID=imgbed,tva&Expires=1794106681&ssig=RcPIsGzvIj",
"followers_count_str": "88",
"status_total_counter": {
"like_cnt": "179",
"total_cnt": "207",
"repost_cnt": "1",
"comment_cnt": "27",
"total_cnt_format": 207
}
},
"idstr": "5338989760086349",
"liked": false,
"max_id": 0,
"rootid": 5338989760086349,
"source": "来自 河北",
"cmt_ext": "level_type:1",
"pic_num": 0,
"comments": [],
"isExpand": false,
"since_id": 0,
"text_raw": "友好交流,共同发展。",
"rootidstr": "5338989760086349",
"created_at": "Thu Sep 03 09:10:15 +0800 2026",
"hasvisible": false,
"like_counts": 3,
"next_cursor": 0,
"source_type": 4,
"url_objects": [],
"allow_follow": false,
"degrade_type": "normal",
"floor_number": 37,
"readtimetype": "comment",
…
示例较长,此处截断显示。
在线试用
登录后可以在这里直接调用此接口,按价格从余额扣费,失败不收费。新账户赠送 $0.50 试用额度。
微博的其他接口
-
关键词搜索
$0.02通过关键词在所需的小时日时间范围内搜索微博帖子,支持基于页码的分页、热门或时间排序,以及图片、视频、音乐或链接的筛选。用于查找有时间限制的帖子,以进行话题研究或监控。
/v1/weibo/search_all_v2
-
帖子详情
$0.02检索通过帖子ID标识的微博帖子详情。用于查找已知帖子,以进行内容审查、存档或相关互动分析。
/v1/weibo/get_weibo_detail_v1
-
用户资料
$0.02检索通过UID标识的微博用户资料。用于查找已知账号,以进行创作者研究、资料审查或后续检索该用户的帖子和视频。
/v1/weibo/get_user_detail_v3
-
用户粉丝
$0.02检索由UID标识的微博用户的粉丝账号页面。用于浏览该账号的粉丝受众或继续翻阅粉丝列表。
/v1/weibo/get_fans_v1
-
用户关注者
$0.02检索由UID标识的微博用户关注的账号页面。用于检查该账号的关注网络或继续翻阅关注列表。
/v1/weibo/get_followers_v1
-
用户发布帖子
$0.02检索由UID标识的微博用户发布的帖子,使用页码和第一页后必需的sinceId游标。用于浏览账号的发布历史或继续翻阅帖子feed。
/v1/weibo/get_user_post_v1
-
用户视频列表
$0.02检索由UID标识的微博用户的视频瀑布流,可使用先前响应中的可选游标。用于浏览已知账号发布的视频或继续翻阅视频feed。
/v1/weibo/get_user_video_list_v1
-
电视视频详情
$0.02检索由冒号分隔的对象ID (OID) 标识的微博TV视频详情。用于查找已知的TV视频以进行内容审核、编目或后续处理。
/v1/weibo/tv_component_v1
-
热搜
$0.02检索当前的微博热搜排名。用于识别热门话题以进行新闻监测、内容规划或及时话题发现。
/v1/weibo/hot_search_v1
-
搜索用户发布帖子
$0.02搜索特定微博用户发布的帖子,使用关键词、可选的日期范围和基于页面的分页。用于从已知账号查找历史帖子以进行话题研究或活动回顾。
/v1/weibo/search_profile_v1