1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "apiKey": "",
10 "channelUrls": ["https://www.youtube.com/@mkbhd"],
11 "deduplicate": True,
12 "includeReplies": True,
13 "maxCommentsPerVideo": 100,
14 "maxRepliesPerComment": 20,
15 "maxVideosPerChannel": 5,
16 "maxVideosPerSearch": 3,
17 "onlyNew": False,
18 "outputFormat": "full",
19 "proxyMode": "auto",
20 "searchTerms": ["AI tools"],
21 "sortBy": "newest",
22 "stateStoreName": "youtube-comments-monitor-state",
23 "videoUrls": ["https://www.youtube.com/watch?v=_x58r9TBois"],
24}
25
26
27run = client.actor("commanding_hotdog/youtube-comments-monitor").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