How to get transcripts from Kwai videos (Brazil's TikTok) with Python
Kwai is one of the biggest short-video apps in Brazil and Latin America, but unlike TikTok or YouTube there's no official API, and nothing that gives you what people actually say in the videos. In this tutorial you'll g
Kwai is one of the biggest short-video apps in Brazil and Latin America, but unlike TikTok or YouTube there's no official API, and nothing that gives you what people actually say in the videos.
In this tutorial you'll get, for any Kwai profile or hashtag:
- views, likes, comments count, shares, hashtags and author stats;
- the full spoken transcript of each video (Portuguese, Spanish, English and 90+ languages), with timestamps.
No Kwai account, no cookies, no browser automation.
What you need
- A free Apify account (you get monthly free credit).
- Python 3.9+ and
pip install apify-client. - Your Apify API token (Console β Settings β API & Integrations).
1. Try it without code
Open Kwai Video Scraper & Transcript, paste a profile like https://www.kwai.com/@cocinaoriental or a hashtag like receitas, and click Start. In a few seconds you get a table with each video and its transcript, which you can export to CSV, Excel or JSON.
2. Do it from Python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("zait_dioses/kwai-video-transcript-scraper").call(run_input={
"startUrls": [{"url": "https://www.kwai.com/@cocinaoriental"}],
"maxVideosPerProfile": 20,
"hashtags": ["receitas"],
"maxVideosPerHashtag": 20,
"transcribe": True,
"includeSegments": False,
})
for video in client.dataset(run["defaultDatasetId"]).iterate_items():
print(video["url"], video["viewCount"], video["transcriptLanguage"])
print(video["transcript"][:200], "\n")
Each item looks like this (shortened):
{
"url": "https://www.kwai.com/@cocinaoriental/video/5236992052920543570",
"caption": "ri demais #video #assista #explorar",
"viewCount": 610,
"likeCount": 18,
"durationSeconds": 168.8,
"author": { "kwaiId": "cocinaoriental", "followers": 1005 },
"transcript": "Surpreenda sua famΓlia com essa deliciosa receita de frango com batatasβ¦",
"transcriptLanguage": "pt",
"transcriptStatus": "ok"
}
3. Ideas for what to do with it
- Content research: find the hooks the top creators in a niche repeat in the first 5 seconds.
- LLM pipelines: send the transcripts to ChatGPT or Claude to summarize, tag or translate them.
- Brand monitoring: search the transcripts for your brand or product, even when it's not in the caption.
-
Repurposing: turn videos into blog posts or subtitles with
includeSegments: true.
Cost
You pay per result: $2 per 1,000 videos plus $0.01 per transcribed minute. Music-only videos are detected and skipped, so you don't pay to transcribe them, and failed transcriptions are never charged.
Wrapping up
That's it: Kwai data plus transcripts in a few lines of Python. If you need another field or find a bug, open an issue on the Actor page. I read all of them.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.