1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "videos",
10 "videoUrls": ["https://www.tiktok.com/@tiktok/video/7673909736131038495"],
11 "usernames": ["tiktok"],
12 "maxVideosPerUser": 10,
13 "minCommentLikes": 0,
14 "commentsSinceDays": 0,
15 "maxRepliesPerComment": 5,
16 "replyPatienceSeconds": 10,
17 "maxCommentsPerVideo": 20,
18 "maxPagesPerVideo": 0,
19 "pagePatienceSeconds": 120,
20 "maxAttemptsPerPage": 0,
21 "concurrency": 20,
22 "maxNotifyListings": 50,
23 "proxy": { "useApifyProxy": True },
24}
25
26
27run = client.actor("abotapi/tiktok-comments-scraper").call(run_input=run_input)
28
29
30print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
31for item in client.dataset(run.default_dataset_id).iterate_items():
32 print(item)
33
34