Kuaishou (China)
Kuaishou Comment Replies API
Expand one comment thread on a Kuaishou (China) video: every reply under a root comment, with reply text, author, IP-location province, who they answered and like count, as JSON. Costs 1 credit per page, cursor-paginated, and count sizes the page up to 50. Check Video Comments first — it already ships the first replies to the hottest comments for free, so only pay for this when the map has no entry for the comment you want.
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_idstringrequiredKuaishou photo (video) id the root comment sits on, non-empty. It must be the same video the comment came from — a mismatched pair is not an error, it just returns nothing and still bills.
Example: 5218546261880462502
root_comment_idstringrequiredId of the top-level comment whose replies you want. Take it from rootComments[].comment_id on the Video Comments response. Only comments with subCommentCount greater than 0 have anything to fetch.
Example: 846691923381
cursorstringOpaque pagination cursor. Omit it for the first page, then pass back the pcursor value from the previous response. The response field is called pcursor, not next_cursor. A pcursor of "no_more" means there are no further pages.
Example: V1-1006-1-eyJwaG90b0lkIjoxMzU2NTA2ODIwNTMs…
countintegerReplies per page, 1 to 50 inclusive. Omit it to take Kuaishou's own default. Anything above 50 is rejected with a 400 before the request is billed.
Example: 50
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
photo_id = "5200813279900753026"
comments = client.kuaishou.video_comments(photo_id=photo_id) # 1 credit
preloaded = comments["data"].get("subCommentsMap", {})
for root in comments["data"].get("rootComments", []):
if not root.get("subCommentCount"):
continue
cid = str(root["comment_id"])
if cid in preloaded:
continue # free, already here
cursor = None
while True:
page = client.kuaishou.comment_replies( # 1 credit per page
photo_id=photo_id, root_comment_id=cid, cursor=cursor, count=50
)
for r in page["data"].get("subComments", []):
print(r["author_name"], "->", r.get("replyToUserName"), r["content"])
cursor = page["data"].get("pcursor") # NOT next_cursor
if not cursor or cursor == "no_more":
breakResponse