Kuaishou (China)
Kuaishou Video API
Fetch one Kuaishou (China) video by photo id or URL — caption, play / like / comment / share counts, duration, resolution, publish time, cover image, the MP4 URL, and the author's own follower and video totals — as JSON. Costs 2 credits. Kuaishou is priced per endpoint (1, 2, 10 or 40), never per platform. This is kuaishou.com only; Kwai international (kwai.com) is not served.
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/jsonphoto_idstringKuaishou photo (video) id, non-empty. Both id forms work here: the alphanumeric form (3xtdqvdnqd3psuc) and the numeric form (5211790816292981090). Either photo_id or url must be sent.
Example: 3xtdqvdnqd3psuc
urlstring (url)A kuaishou.com or v.kuaishou.com video URL, as an alternative to photo_id. Must be a syntactically valid URL. Sent on its own it takes a different upstream route than the id form. Kwai international (kwai.com) URLs are not supported.
Example: https://v.kuaishou.com/GKTpYm
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
# 2 credits. photo_id or url - one of the two is required.
video = client.kuaishou.video(photo_id="3xtdqvdnqd3psuc")
photo = video["data"]["photo"]
# camelCase here, snake_case on the feed endpoints
print(photo["caption"], photo["viewCount"], photo["likeCount"])
print(photo["mainMvUrls"][0]["url"]) # MP4
print(video["data"]["counts"]["fanCount"]) # author followers, no profile callResponse