快手(中国)
快手用户主页 API
按用户 id 获取快手(中国)创作者的完整主页:昵称、简介、头像、性别、IP 属地省份,以及粉丝数、作品数和累计获赞数,以 JSON 返回。每次消耗 10 积分,是该平台单个对象查询中最贵的一个;快手按接口计费(1、2、10 或 40 积分),从不按平台统一计费。仅支持 kuaishou.com,不支持快手国际版 Kwai(kwai.com)。
POST/api/v1/kuaishou/profile
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/jsonuser_idstringrequired快手用户 id,不能为空。该接口两种 id 形式都支持:数字形式(5518803932)和字母数字形式(3xcuu5habgc8z29)。如果手上只有分享链接,请先调用分享链接解析接口,消耗 1 积分即可拿到 id。
Example: 5518803932
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
# 10 积分。请先解析分享链接(1 积分),不要猜 id。
profile = client.kuaishou.profile(user_id="5518803932")
counts = profile["data"]["userProfile"]["ownerCount"]
print(counts["fan"], counts["photo"], counts["total_photo_like"])Response
"result": 1,
},
"response_time": 1821,
"credits_used": 10,
"credits_remaining": 4820
}