微博
微博实时搜索 API
按关键词返回最新发布的微博。每次请求消耗 1 积分。
POST/api/v1/weibo/search/realtime
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonquerystringrequired搜索关键词,最多 200 个字符。
Example: yu7
pageinteger结果页码,从 1 开始,取值 1-50。
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
result = client.weibo.request("/api/v1/weibo/search/realtime", {"query": "yu7"})
print(result)Response
"result_count": 9,
"has_more": true,
"next_page": "/realtime?q=yu7&rd=realtime&tw=realtime&Refer=weibo_realtime&page=2"
},
"response_time": 1754
}