微博

微博 API

按关键词分别搜索微博与账号,按数字 UID 读取账号资料与账号发布的微博,按链接读取单条微博详情与评论,并读取热搜词条。

请求发到 POST https://api.everyinfra.com/api/v1/social,platform 填 weibo,action 填下方列表里的能力名,例如 search。

  • 11 个能力
  • 每千次 $0.56 起
  • 失败和空结果都不收费
  • 24h 健康值 95%

平台运行状态

24h 健康值
95%
健康

30 天趋势

微博 能力清单

能力做什么单价空白行均为 $0.81 / 千次24 小时运行状态 · 全部正常
关键词搜索search用 search 收集帖子文本和互动快照,由调用方持续留存对比。健康 · 健康值 98%
主页或对象详情profile用 profile 查看账号资料,不把用户昵称或帖子 ID 当成 UID。$0.56 / 千次正常
评论comments用 comments 对准一条微博,避免含字母的短码被当成数字 ID。$0.56 / 千次正常
热榜trending用 trending 保存榜单快照,观察榜上话题及位置变化。$0.56 / 千次正常
内容详情post_detail用 post_detail 读单条微博的全文、阅读数、互动数和作者资料。正常
用户内容user_posts用 user_posts 按 UID 逐页读一个账号发的微博,可只看原创、视频或图片。正常
账号搜索user_search用 user_search 按昵称或关键词找微博账号,拿到 user_id 再查资料和微博。正常
转发列表reposts用 reposts 按微博链接读第一页转发,带转发语、时间和转发人。正常
评论回复comment_replies用 comment_replies 按评论 ID 读这条评论下的回复。正常
话题搜索topic_search用 topic_search 按关键词找微博话题,比较阅读数和讨论数。正常
在用户微博里搜索user_post_search用 user_post_search 在一个账号最近 12 个月的微博里搜关键词。正常

微博 每个接口分别做什么

下面逐个解释 action、必填参数、可选筛选项和允许值。 请求都发到 POST /api/v1/social, 切换 action 时,也要按对应接口调整参数。 同名参数在不同平台、不同接口中可能指向不同对象;请以该条说明中的格式和适用范围为准。

下方只展示平台官方资料,用于核对对象与术语,不表示平台对 EveryInfra 的授权或背书。 本接口接受的参数、字段与能力边界以各条说明为准,不与平台官方 API 直接等同。

所有能力都是同步调用。

能力必填参数可选参数单次条数单价空白行均为 $0.81 / 千次返回字段
searchkeyword—默认 20 · 最多 50id · url · text · posted_at · device · repost_count · comment_count · like_count · is_repost · author_id · author_name · author_bio · author_follower_count · author_following_count · author_verified · author_verified_reason · author_avatar_url · image_urls · video_url · platform
profileuser_id——$0.56 / 千次user_id · display_name · url · bio · gender · follower_count · following_count · post_count · is_verified · verified_reason · avatar_url · cover_image_url · company · created_at · platform
commentsurl—默认 20 · 最多 50$0.56 / 千次id · text · like_count · author_id · author_name · author_avatar_url · post_id · post_url · posted_at · platform
trending——默认 20 · 最多 200$0.56 / 千次rank · title · category · hot_value · label · is_hot · is_new · url · platform
post_detailurl——id · url · text · posted_at · device · repost_count · comment_count · like_count · view_count · is_repost · original_post_id · is_long_text · author_id · author_name · author_bio · author_follower_count · author_following_count · author_verified · author_verified_reason · author_avatar_url · image_urls · video_url · duration_sec · duration_seconds · platform · next_page_token
user_postsuser_idpage_token, post_type每页 20 条id · url · text · posted_at · device · repost_count · comment_count · like_count · view_count · is_repost · original_post_id · is_long_text · author_id · author_name · author_bio · author_follower_count · author_following_count · author_verified · author_verified_reason · author_avatar_url · image_urls · video_url · duration_sec · duration_seconds · platform · next_page_token
user_searchkeywordpage_token每页 20 条user_id · display_name · url · bio · follower_count · following_count · is_verified · verified_reason · avatar_url · next_page_token · platform
repostsurl—默认 20 · 最多 20id · url · text · posted_at · device · repost_count · comment_count · like_count · is_repost · original_post_id · author_id · author_name · author_bio · author_follower_count · author_following_count · author_verified · author_verified_reason · author_avatar_url · platform
comment_repliescomment_id—默认 20 · 最多 20id · text · like_count · posted_at · root_comment_id · reply_to_comment_id · ip_location · author_id · author_name · author_avatar_url · platform
topic_searchkeywordpage_token每页 20 条title · url · text · cover_image_url · discuss_count · read_count · next_page_token · platform
user_post_searchuser_id, keywordpage_token每页 50 条id · url · text · posted_at · device · repost_count · comment_count · like_count · is_repost · is_long_text · author_id · author_name · author_verified · author_avatar_url · image_urls · video_url · duration_sec · duration_seconds · platform · next_page_token

怎么调用 微博 主页或对象详情 API?

profile

使用 platform="weibo"、action="profile" 调用“主页或对象详情”能力;返回单个对象,主要包含 user_id、display_name、url、bio、gender、follower_count 等 15 个字段。

查看完整接口文档:参数、代码示例、响应样例与健康状态

微博 profile 的参数分别是什么意思?

user_id必填
profile 的微博数字 UID,也可传含 /u/数字UID 的主页链接;不要用昵称替代,profile 不提供该用户全部发帖。

微博官方将 uid / screen_name 区分为用户 ID / 昵称,friends_count 是关注数,followers_count 是粉丝数。官方接口的昵称查询选项不等于本页 user_id 支持昵称解析;字段是否返回以本页说明和实际返回为准。官方来源:微博:UID、昵称与关注数量的定义来源核查:

微博 返回字段与含义(4)
verified_reason
认证说明。
company
公司。
gender
性别。
cover_image_url
封面图。

怎么调用 微博 评论 API?

comments

使用 platform="weibo"、action="comments" 调用“评论”能力;返回列表,默认 20 条、单次最多 50 条,主要包含 id、text、like_count、author_id、author_name、author_avatar_url 等 10 个字段。

查看完整接口文档:参数、代码示例、响应样例与健康状态

微博 comments 的参数分别是什么意思?

url必填
comments 建议使用 /detail/纯数字帖子ID 的链接,或在 url 中直接填数字帖子 ID;含字母的微博短码链接不能用。

微博历史开发文档将 MID 与 ID 分开,并明确含字母的 MID 可采用 base62 编码。这里只引用标识区别,不保证该历史接口仍可调用;本页 comments 没有自动转换能力,优先使用数字帖子 ID 链接。官方来源:微博:base62 MID 与数字 ID 的转换说明来源核查:

微博 返回字段与含义(3)
author_avatar_url
作者头像。
post_id
微博 ID。
post_url
微博链接。

怎么调用 微博 内容详情 API?

post_detail

使用 platform="weibo"、action="post_detail" 调用“内容详情”能力;返回单个对象,主要包含 id、url、text、posted_at、device、repost_count 等 26 个字段。

查看完整接口文档:参数、代码示例、响应样例与健康状态

微博 post_detail 的参数分别是什么意思?

url必填
单条微博的链接:https://m.weibo.cn/detail/<微博ID>、https://weibo.com/<用户UID>/<微博ID 或字母短码>,也可以直接填数字微博 ID(user_posts、search 返回行的 id)。

微博开放平台的 statuses/show 以微博 ID 读取单条微博,返回正文、来源、转发数、评论数、表态数、作者资料,转发时另带被转发的原微博。这里只核对「一条微博由数字 ID 定位」和这些字段的含义;官方接口要求授权,且只返回授权用户自己发的微博,不证明本接口可读取的范围、链接格式或阅读数。官方来源:微博开放平台:按微博 ID 读取单条微博来源核查:

微博 返回字段与含义(14)
author_avatar_url
作者头像。
author_bio
作者简介;作者没填时没有。
author_following_count
作者关注数。
author_verified
作者是否加 V。
author_verified_reason
认证说明(如「XX公司CEO」),判断大V身份靠它;没认证时没有。
device
发布设备(如「iPhone客户端」)。
is_repost
是否为转发。
image_urls
图片列表;不带图的微博没有。
video_url
视频链接;不是视频微博时没有。
view_count
阅读数(post_detail):微博显示的这条微博被阅读的次数;多数微博不显示阅读数,这时没有这个字段;user_posts 的列表回包里没有。
original_post_id
转发微博时,被转发的原微博 ID(post_detail / user_posts);可作为 post_detail 的 url 传入读原微博。不是转发时没有这个键。
is_long_text
是不是长微博(post_detail / user_posts)。user_posts 上长微博的 text 只有开头一段(约 140 字)。
duration_sec
视频时长(秒,post_detail / user_posts 的视频微博)。
next_page_token
翻页令牌(user_search、user_posts、topic_search、user_post_search):作为下一次请求的 page_token 原样传回取下一页;同一页每行的值相同,响应顶层也有同一个 next_page_token。没有该字段即到底。

怎么调用 微博 用户内容 API?

user_posts

使用 platform="weibo"、action="user_posts" 调用“用户内容”能力;返回列表,每次一页、固定 20 条,更多用 next_page_token 翻页,主要包含 id、url、text、posted_at、device、repost_count 等 26 个字段。

查看完整接口文档:参数、代码示例、响应样例与健康状态

微博 user_posts 的参数分别是什么意思?

user_id必填
微博数字 UID,也可传含 /u/数字UID 的主页链接;不收昵称(先用 user_search 按昵称找到 user_id)。
page_token可选
翻页令牌。第一页不传;之后把上一页响应里的 next_page_token 原样传回取下一页,其余参数不变。每页最多 20 条、最新优先(条数不固定,只含这个账号自己发的微博),每页算一次调用;令牌 24 小时内有效,翻到底时响应里没有 next_page_token。
post_type可选
只看哪类微博:all 全部(默认)/ original 原创 / video 视频 / image 图片。

微博开放平台的 statuses/user_timeline 列出一个用户最新发表的微博,feature 参数按全部、原创、图片、视频、音乐筛选,与 post_type 的 all、original、image、video 对应(本接口不提供音乐)。官方接口升级后只能查授权用户自己,最多返回最新 5 条;它不证明本接口的每页条数、翻页深度或能读取任意账号。官方来源:微博开放平台:用户微博列表的类型筛选来源核查:

查看全部 4 个允许值

allimageoriginalvideo

微博 返回字段与含义(14)
author_avatar_url
作者头像。
author_bio
作者简介;作者没填时没有。
author_following_count
作者关注数。
author_verified
作者是否加 V。
author_verified_reason
认证说明(如「XX公司CEO」),判断大V身份靠它;没认证时没有。
device
发布设备(如「iPhone客户端」)。
is_repost
是否为转发。
image_urls
图片列表;不带图的微博没有。
video_url
视频链接;不是视频微博时没有。
view_count
阅读数(post_detail):微博显示的这条微博被阅读的次数;多数微博不显示阅读数,这时没有这个字段;user_posts 的列表回包里没有。
original_post_id
转发微博时,被转发的原微博 ID(post_detail / user_posts);可作为 post_detail 的 url 传入读原微博。不是转发时没有这个键。
is_long_text
是不是长微博(post_detail / user_posts)。user_posts 上长微博的 text 只有开头一段(约 140 字)。
duration_sec
视频时长(秒,post_detail / user_posts 的视频微博)。
next_page_token
翻页令牌(user_search、user_posts、topic_search、user_post_search):作为下一次请求的 page_token 原样传回取下一页;同一页每行的值相同,响应顶层也有同一个 next_page_token。没有该字段即到底。

怎么调用 微博 转发列表 API?

reposts

使用 platform="weibo"、action="reposts" 调用“转发列表”能力;返回列表,默认 20 条、单次最多 20 条,主要包含 id、url、text、posted_at、device、repost_count 等 19 个字段。

查看完整接口文档:参数、代码示例、响应样例与健康状态

微博 reposts 的参数分别是什么意思?

url必填
单条微博的链接:https://m.weibo.cn/detail/<微博ID>、https://weibo.com/<用户UID>/<微博ID 或字母短码>,也可以直接填数字微博 ID。
微博 返回字段与含义(8)
author_avatar_url
作者头像。
author_bio
作者简介;作者没填时没有。
author_following_count
作者关注数。
author_verified
作者是否加 V。
author_verified_reason
认证说明(如「XX公司CEO」),判断大V身份靠它;没认证时没有。
device
发布设备(如「iPhone客户端」)。
is_repost
是否为转发。
original_post_id
转发微博时,被转发的原微博 ID(post_detail / user_posts);可作为 post_detail 的 url 传入读原微博。不是转发时没有这个键。

怎么调用 微博 评论回复 API?

comment_replies

使用 platform="weibo"、action="comment_replies" 调用“评论回复”能力;返回列表,默认 20 条、单次最多 20 条,主要包含 id、text、like_count、posted_at、root_comment_id、reply_to_comment_id 等 11 个字段。

查看完整接口文档:参数、代码示例、响应样例与健康状态

微博 comment_replies 的参数分别是什么意思?

comment_id必填
一级评论的数字 ID(weibo comments 返回行的 id)。
微博 返回字段与含义(4)
author_avatar_url
作者头像。
root_comment_id
这条回复所在的一级评论 ID(comment_replies),和请求的 comment_id 一致。
reply_to_comment_id
这条回复是在回复哪条回复(comment_replies);直接回复一级评论时没有这个字段。
ip_location
发布时的 IP 属地(comment_replies),如「来自 广东」;微博没显示时没有。

怎么调用 微博 在用户微博里搜索 API?

user_post_search

使用 platform="weibo"、action="user_post_search" 调用“在用户微博里搜索”能力;返回列表,每次一页、固定 50 条,更多用 next_page_token 翻页,主要包含 id、url、text、posted_at、device、repost_count 等 20 个字段。

查看完整接口文档:参数、代码示例、响应样例与健康状态

微博 user_post_search 的参数分别是什么意思?

user_id必填
微博数字 UID,也可传含 /u/数字UID 的主页链接;不收昵称(先用 user_search 按昵称找到 user_id)。
keyword必填
在这个用户最近 12 个月发的微博里搜的关键词,例如 发布会。
page_token可选
翻页令牌。第一页不传;之后把上一页响应里的 next_page_token 原样传回取下一页,其余参数不变。每页最多 50 条,每页算一次调用;翻到底时响应里没有 next_page_token。
微博 返回字段与含义(9)
author_avatar_url
作者头像。
author_verified
作者是否加 V。
device
发布设备(如「iPhone客户端」)。
is_repost
是否为转发。
image_urls
图片列表;不带图的微博没有。
video_url
视频链接;不是视频微博时没有。
is_long_text
是不是长微博(post_detail / user_posts)。user_posts 上长微博的 text 只有开头一段(约 140 字)。
duration_sec
视频时长(秒,post_detail / user_posts 的视频微博)。
next_page_token
翻页令牌(user_search、user_posts、topic_search、user_post_search):作为下一次请求的 page_token 原样传回取下一页;同一页每行的值相同,响应顶层也有同一个 next_page_token。没有该字段即到底。
微博 search 调用流程一次 微博 search 调用的全过程:向 POST /api/v1/social 发送 platform="weibo"、action="search",以及必填参数 keyword;返回结构化 JSON,含 id、url、text、posted_at、device 等字段;返回列表,单次最多 50 条,计费 $0.81 / 千次,失败与空结果不计费。1 · 请求POST /api/v1/socialplatform: "weibo"action: "search"keywordEveryInfra$0.81 / 千次2 · 响应 · 列表idurltextposted_atdevice
一次 微博 search 调用的全过程:向 POST /api/v1/social 发送 platform="weibo"、action="search",以及必填参数 keyword;返回结构化 JSON,含 id、url、text、posted_at、device 等字段;返回列表,单次最多 50 条,计费 $0.81 / 千次,失败与空结果不计费。

微博 原始字段名

EveryInfra 统一字段名

左边是 微博 数据里原本的字段名,右边是我们统一后的。点任意一行看对应关系。106 个平台复用通用字段命名,减少重复适配; 切换平台仍需核对参数、字段集合、类型与空值含义。这里展示映射关系,不是目标的实时返回数据。

微博 的独有字段名(当前目录)

全站 106 个平台的当前目录中,这 7 个字段名只在 微博 出现。 这是字段命名的分布,不代表其他平台没有同类信息,也不保证每次响应都含这些字段;具体含义和返回条件仍需逐接口核对。

  • device
  • author_verified_reason
  • original_post_id
  • is_long_text
  • root_comment_id
  • reply_to_comment_id
  • discuss_count

返回字段含义

通用字段采用统一命名;切换平台时仍需核对目标格式、字段是否存在、类型、空值与平台特有含义。 机器可读版:/api/v1/social/fields

id
该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。
url
该记录在原平台上的可访问链接。
text
正文内容,已去除 HTML 标签,全文返回、不截断(个别平台的列表结果本身只有摘要,以该平台的字段说明为准)。
posted_at
发布时间,ISO 8601 格式、UTC 时区(如 2026-08-07T12:34:56+00:00)。平台只给非标准字符串时原样透传,解析前建议做容错。null 表示平台未公开。
device
发布设备(如「iPhone客户端」)。
repost_count
转发数(区别于引用转发)。null 表示不公开。
comment_count
评论数。null 表示不公开,不等于 0。
like_count
点赞数。null 表示该平台或该接口不公开此数据,不等于 0。
is_repost
是否为转发。
author_id
作者在原平台的唯一 ID。
author_name
作者昵称(显示名)。
author_bio
作者简介;作者没填时没有。
author_follower_count
作者粉丝数。null 表示不公开。
author_following_count
作者关注数。
author_verified
作者是否加 V。
author_verified_reason
认证说明(如「XX公司CEO」),判断大V身份靠它;没认证时没有。
author_avatar_url
作者头像。
image_urls
图片列表;不带图的微博没有。
video_url
视频链接;不是视频微博时没有。
platform
数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。
user_id
用户在原平台的唯一 ID。
display_name
显示名,可能与 username 不同。
bio
个人简介,账号自己填写的文本。可能含换行和 emoji。
gender
性别。
follower_count
粉丝数。null 表示不公开,不等于 0。
following_count
关注数。null 表示不公开,不等于 0。
post_count
发布内容总数。null 表示不公开,不等于 0。
is_verified
是否为平台认证账号(蓝V等)。null 表示无法判定。
verified_reason
认证说明。
avatar_url
头像图片链接。部分平台给的是带尺寸参数的 CDN 链接,可能有时效。
cover_image_url
封面图。
company
公司。
created_at
创建时间,格式同 posted_at。
post_id
微博 ID。
post_url
微博链接。
rank
热搜排名。
title
标题。平台无标题概念时(如纯文本帖)为 null。
category
分类名称,取值为原平台的分类体系,未做跨平台归一。
hot_value
热搜热度值。微博自有指标,只在榜单内可比。
label
热搜标签(爆/热/新)。
is_hot
是否为热门。
is_new
是否为新上榜。
view_count
阅读数(post_detail):微博显示的这条微博被阅读的次数;多数微博不显示阅读数,这时没有这个字段;user_posts 的列表回包里没有。
original_post_id
转发微博时,被转发的原微博 ID(post_detail / user_posts);可作为 post_detail 的 url 传入读原微博。不是转发时没有这个键。
is_long_text
是不是长微博(post_detail / user_posts)。user_posts 上长微博的 text 只有开头一段(约 140 字)。
duration_sec
视频时长(秒,post_detail / user_posts 的视频微博)。
duration_seconds
时长,单位秒。非视频/音频内容为 null。
next_page_token
翻页令牌(user_search、user_posts、topic_search、user_post_search):作为下一次请求的 page_token 原样传回取下一页;同一页每行的值相同,响应顶层也有同一个 next_page_token。没有该字段即到底。
root_comment_id
这条回复所在的一级评论 ID(comment_replies),和请求的 comment_id 一致。
reply_to_comment_id
这条回复是在回复哪条回复(comment_replies);直接回复一级评论时没有这个字段。
ip_location
发布时的 IP 属地(comment_replies),如「来自 广东」;微博没显示时没有。
discuss_count
话题讨论数(topic_search)。
read_count
话题阅读数(topic_search)。

请求填写示例

这里使用微博内容搜索词;单条详情的数字 ID 与字母短码不能直接混用。

以下为填写格式示意,并非成功调用记录。请替换 API Key 和尖括号中的目标,确认可选筛选项后再调用;示例不保证目标当前有数据。

weibo_search.sh
curl -X POST https://api.everyinfra.com/api/v1/social \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"weibo","action":"search","params":{"keyword":"城市骑行"}}'

记录字段预览(非真实响应)

仅展示 search 的记录字段,不包含外层响应、计费或任务状态。null 只作展示占位,不表示字段类型或实际空值;完整响应须以接口文档与实际调用为准。

fields.preview.json
{
  "id": null,
  "url": null,
  "text": null,
  "posted_at": null,
  "device": null,
  "repost_count": null,
  "comment_count": null,
  "like_count": null,
  "is_repost": null,
  "author_id": null,
  "author_name": null,
  "author_bio": null,
  "author_follower_count": null,
  "author_following_count": null,
  "author_verified": null,
  "author_verified_reason": null,
  "author_avatar_url": null,
  "image_urls": null,
  "video_url": null,
  "platform": null
}

常见用例

以下是基于现有接口的接入思路,不是开箱即用的分析或告警功能。字段以实际返回为准,缺失值不按零处理。

按关键词检索公开微博并区分转发

用 search 收集帖子文本和互动快照,由调用方持续留存对比。

查看 search 的 keyword 参数
  • keyword 搜公开帖子;id / url 定位微博,is_repost 区分转发标记,repost_count、comment_count、like_count 分别是转发、评论和点赞数量。
  • device 是公开的发布客户端信息,不是设备指纹;作者粉丝信息可能缺失,需另查 profile,不能将缺失值当作零粉丝或据搜索样本推断全网声量。

用微博数字 UID 核对账号档案

用 profile 查看账号资料,不把用户昵称或帖子 ID 当成 UID。

查看 profile 的 user_id 参数
  • user_id 填数字 UID 或含 /u/数字UID 的主页链接;display_name 是昵称,following_count 是关注数,follower_count 是粉丝数。
  • post_count 是发帖数量,不是返回了全部帖子;created_at 是账号注册时间,verified_reason 是平台认证说明,不是 EveryInfra 的资质审核。

用数字帖子 ID 读取微博评论

用 comments 对准一条微博,避免含字母的短码被当成数字 ID。

查看 comments 的 url 参数
  • url 优先填 /detail/纯数字帖子ID 的链接,也可在该字段填数字帖子 ID;当前只提取最后一段数字,不会自动将 base62 短码转换成帖子 ID。
  • id 是评论 ID,post_id 是被评论的微博 ID;text、author_name、like_count 与 posted_at 描述评论,不包含完整回复树,也不是发评论接口。

读取微博热搜条目而不是关键词搜索结果

用 trending 保存榜单快照,观察榜上话题及位置变化。

查看 trending 接口说明
  • trending 无需 keyword 或 user_id;rank 是返回的榜位,title 是热搜词,hot_value 是热度值,label / is_hot / is_new 是榜单标记。
  • 热度值不是搜索人数或阅读次数,url 指向热搜词页面而非单条微博;跨时间对比需要自行保存快照,接口没有历史日期查询参数。

微博详情 API 如何按链接或 ID 读一条微博?

用 post_detail 读单条微博的全文、阅读数、互动数和作者资料。

查看 post_detail 的 url 参数
  • url 填 m.weibo.cn/detail/<微博ID>、weibo.com/<UID>/<微博ID 或字母短码>,也可以直接填数字微博 ID(user_posts、search 返回行的 id)。
  • 返回 view_count 阅读数、repost_count、comment_count、like_count,长微博给全文;是转发时 is_repost 为 true,original_post_id 是原微博 ID,可以再传给 post_detail 读原文。作者带粉丝数和认证说明。

微博用户微博列表 API 如何逐页读一个账号自己发的微博?

用 user_posts 按 UID 逐页读一个账号发的微博,可只看原创、视频或图片。

查看 user_posts 的 post_type 参数
  • user_id 填数字 UID 或含 /u/数字UID 的主页链接,不收昵称(先用 user_search 找 user_id);post_type 选 all(默认)、original、video、image。
  • 每页最多 20 条、最新优先,条数不固定,只含这个账号自己发的微博;用 next_page_token 翻页。列表里的长微博 text 只有开头约 140 字(is_long_text 为 true),要全文和阅读数请把 id 交给 post_detail。

微博用户搜索 API 如何按昵称找账号 UID?

用 user_search 按昵称或关键词找微博账号,拿到 user_id 再查资料和微博。

查看 user_search 的 keyword 参数
  • keyword 填昵称或关键词(如 人民日报)。每行一个账号:user_id、display_name、bio、follower_count、following_count、is_verified 和 verified_reason 认证说明。
  • 每页人数不固定,第一页常只有最匹配的一两个账号,后面的页才多;用 next_page_token 翻页,没有它就到底。user_id 可以交给 profile、user_posts。

微博转发列表 API 如何看一条微博被谁转发?

用 reposts 按微博链接读第一页转发,带转发语、时间和转发人。

查看 reposts 的 url 参数
  • url 填 m.weibo.cn/detail/<微博ID>、weibo.com/<UID>/<微博ID 或字母短码>,或直接填数字微博 ID。只给第一页,大约 10 到 20 条,不能续页;没有转发的微博会返回错误。
  • 每条是一条转发微博:text 是转发语,is_repost 为 true,original_post_id 指向原微博;带 posted_at、互动数和转发人的粉丝数、认证说明。

微博评论回复 API 如何读一条评论下的楼中楼?

用 comment_replies 按评论 ID 读这条评论下的回复。

查看 comment_replies 的 comment_id 参数
  • comment_id 填 comments 返回行的 id(12 到 20 位数字);最多 20 条,只读第一页。
  • 每条有 text、like_count、posted_at、ip_location(如「来自 广东」)和作者字段;root_comment_id 等于查询的评论,reply_to_comment_id 指出它回复的是哪条回复,直接回复评论时没有。

微博话题搜索 API 如何按关键词找 #话题#?

用 topic_search 按关键词找微博话题,比较阅读数和讨论数。

查看 topic_search 的 keyword 参数
  • keyword 填品牌名、事件名等;每页最多 20 个,把 next_page_token 原样当 page_token 传回去续页,最后一页没有 next_page_token。
  • 每个话题有 title、url(话题搜索页)、text 导语、cover_image_url、read_count 阅读数和 discuss_count 讨论数。

微博用户内搜索 API 如何在一个账号的微博里找关键词?

用 user_post_search 在一个账号最近 12 个月的微博里搜关键词。

查看 user_post_search 的 keyword 参数
  • user_id 填数字 UID 或含 /u/数字UID 的主页链接,不收昵称;keyword 填要找的词。每页最多 50 条,把 next_page_token 原样当 page_token 传回去续页。
  • 每条有 id、text、posted_at、repost_count、comment_count、like_count、图片或视频和 is_repost;只查最近 12 个月,更早的微博用 user_posts 往后翻。

微博 教程与实战

先在本页核对 action、参数和字段,再按你的任务看下面的完整步骤或相关做法。文章里的示例和边界说明只作参考,以本页的参数和字段为准。

指南

多平台口碑监控蓝图:先记录采集范围,再判断负面变化

做多平台口碑监控:从目标清单、评论身份和增量游标开始,设计可追溯的采集流程;用离线样本演示去重和采集缺口怎么发现,关键判断一律保留人工复核。

阅读完整文章
指南

统一数据 API 入门:从能力目录到第一条可用结果

用 platform、action、params 接入多平台数据:读懂能力目录,完成最小请求,处理异步任务、部分结果与计费,并建立可追溯的数据记录。

阅读完整文章

微博 API 常见问题

微博 API 怎么调用?

调用 POST /api/v1/social,请求体传 platform="weibo"、action 和 params。以 search 为例,必填 keyword,没有可选参数。这里使用微博内容搜索词;单条详情的数字 ID 与字母短码不能直接混用。 微博 共 11 个 action,鉴权用 Authorization: Bearer <API Key>,同一把 Key 通 106 个平台。

微博 API 怎么收费?

每千次 $0.56 起,按能力不同(清单里逐条标了)。按本页最高能力单价、每次单目标估算,$1 免费额度约可用于 1,240 次 微博 调用。费用按所选能力与目标数量计算,多目标请求不要按单目标估算;参数错误、鉴权失败和空结果不计费。

微博 API 一次能返回多少条数据?

微博 有 9 个列表接口,包括 search、comments、trending、user_posts、user_search、reposts、comment_replies、topic_search、user_post_search。其余 2 个接口返回单个对象;对象内仍可能包含数组。数量参数要逐接口区分目标数、页数和记录数,不能将目录数值直接当作保证返回的条数;具体限制见对应参数与用例,不保证完整历史。

微博 API 返回哪些字段?

当前目录为 search 列出 id、url、text、posted_at、device、repost_count 等 20 个字段名。按全站当前目录统计,7 个字段名只在 微博 出现;这不表示其他平台没有同类信息。字段不保证每次齐全,嵌套位置、类型与空值须按各接口说明核对,同名字段不代表语义可互换。

「按关键词检索公开微博并区分转发」怎样接入 微博 API?

用 search 收集帖子文本和互动快照,由调用方持续留存对比。 keyword 搜公开帖子;id / url 定位微博,is_repost 区分转发标记,repost_count、comment_count、like_count 分别是转发、评论和点赞数量。 device 是公开的发布客户端信息,不是设备指纹;作者粉丝信息可能缺失,需另查 profile,不能将缺失值当作零粉丝或据搜索样本推断全网声量。

「用微博数字 UID 核对账号档案」怎样接入 微博 API?

用 profile 查看账号资料,不把用户昵称或帖子 ID 当成 UID。 user_id 填数字 UID 或含 /u/数字UID 的主页链接;display_name 是昵称,following_count 是关注数,follower_count 是粉丝数。 post_count 是发帖数量,不是返回了全部帖子;created_at 是账号注册时间,verified_reason 是平台认证说明,不是 EveryInfra 的资质审核。

「用数字帖子 ID 读取微博评论」怎样接入 微博 API?

用 comments 对准一条微博,避免含字母的短码被当成数字 ID。 url 优先填 /detail/纯数字帖子ID 的链接,也可在该字段填数字帖子 ID;当前只提取最后一段数字,不会自动将 base62 短码转换成帖子 ID。 id 是评论 ID,post_id 是被评论的微博 ID;text、author_name、like_count 与 posted_at 描述评论,不包含完整回复树,也不是发评论接口。

「读取微博热搜条目而不是关键词搜索结果」怎样接入 微博 API?

用 trending 保存榜单快照,观察榜上话题及位置变化。 trending 无需 keyword 或 user_id;rank 是返回的榜位,title 是热搜词,hot_value 是热度值,label / is_hot / is_new 是榜单标记。 热度值不是搜索人数或阅读次数,url 指向热搜词页面而非单条微博;跨时间对比需要自行保存快照,接口没有历史日期查询参数。

可以先免费试用 微博 API 吗?

可以。注册免费,在 GitHub 给 everyinfra/everyinfra-agent-plugins 和 everyinfra/seo-skills 两个仓库都点星,就能在控制台「余额与充值」领取 $1 额度(≈720 次数据调用),直接进赠送余额,不用输码,24 小⁠时内有效。请先选择 微博 的目标接口,用单目标请求核对结果;实际可调用次数取决于能力价格与目标数量,不保证覆盖全部 11 个能力。无需信用卡。

开始调用 微博 API

在 GitHub 给两个仓库点星领 $1 额度,注册后在控制台领取,24 小⁠时内有效,先选一个 微博 接口验证结果。

免费开始

自有访问统计常开;Google Analytics 仅在你点「同意分析」后启用。 隐私政策