微博
微博热门排行时间线 API
获取某一时间窗口内的热门微博。每次请求消耗 1 积分。
POST/api/v1/weibo/rankings/hot-timeline
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/jsonranking_typestringrequired例如 "hour"、"day"
Example: hour
since_idstring上一次响应返回的分页游标(cursor)。请求第一页时不传。
max_idstring上一次响应返回的分页游标(cursor)。请求第一页时不传。
countinteger每页返回的条数,取值 1-50。
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
result = client.weibo.request("/api/v1/weibo/rankings/hot-timeline", {"ranking_type": "hour"})
print(result)Response
"since_id": "0",
"max_id": "2",
"total": 100
},
"response_time": 1668
}