Kuaishou (China)
Kuaishou Batch Video API
Look up as many as 20 Kuaishou (China) videos in a single request — caption, play / like / comment / share / collect counts, duration, publish time, cover and MP4 URL for each — as JSON. Costs 40 credits per call, flat, whatever the list length: this is by far the dearest call on the platform, so it only pays off against the 2-credit single-video endpoint from about 20 ids down. The list is hard-capped at 20 and a longer one is rejected before you are billed.
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_idsarray<string>requiredKuaishou photo (video) ids, 1 to 20 entries, each non-empty. More than 20 is a 400, not a truncation. Use the NUMERIC id form here (5228960823332207296) — that is what the batch upstream indexes on. If your ids came out of a feed, take them from that feed's share_info, or from originalPhotoId on a previous batch response, because the feed's own photo_id field arrives rounded.
Example: ["5228960823332207296", "5196309727975443273"]
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
# 40 credits FLAT, 1 or 20 ids. Below ~20 ids the 2-credit video endpoint
# is cheaper, so fill the batch before you send it.
ids = ["5228960823332207296", "5196309727975443273"]
assert len(ids) <= 20, "the API rejects more than 20"
batch = client.kuaishou.videos_batch(photo_ids=ids)
for photo in batch["data"].get("photos", []):
print(photo["originalPhotoId"], photo["view_count"], photo["caption"])
# Fewer rows than ids sent = some ids are dead. The call still cost 40.
print(len(batch["data"].get("photos", [])), "of", len(ids))Response