1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "videoRefs": ["https://www.youtube.com/watch?v=FQbNtLOVlwU"],
10 "mode": "auto",
11 "channelDiscoveryMode": "current_live",
12 "maxVideosPerChannel": 1,
13 "lookbackDays": 30,
14 "includeUpcomingLives": False,
15 "maxMessagesPerVideo": 3,
16 "maxTotalItems": 3,
17 "maxTimePerVideoSecs": 120,
18 "includeNormalMessages": True,
19 "includeSuperChats": True,
20 "includeMembershipEvents": True,
21 "includeGiftEvents": True,
22 "includeSystemEvents": True,
23 "includePlaceholders": False,
24 "includeSummary": False,
25 "startOffsetSecs": 0,
26 "endOffsetSecs": 0,
27 "liveCollectSecs": 10,
28 "pollIntervalMs": 2000,
29 "language": "en",
30 "regionCode": "US",
31 "includeMetadata": True,
32}
33
34
35run = client.actor("dataspryva/youtube-live-stream-and-replay-chat-extractor").call(run_input=run_input)
36
37
38print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
39for item in client.dataset(run.default_dataset_id).iterate_items():
40 print(item)
41
42