1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "sortType": "new_posts",
10 "outputProfile": "analytics",
11 "commentsMode": "top",
12 "maxCommentsPerPost": 50,
13 "includeReactionBreakdown": True,
14 "incrementalMode": "new_only",
15 "refreshWindowDays": 7,
16 "maxGroupsConcurrency": 1,
17 "emitTrends": False,
18 "trendWindowDays": 30,
19 "enrichmentMode": "off",
20 "minDelay": 1,
21 "maxDelay": 10,
22 "proxy": { "useApifyProxy": True },
23}
24
25
26run = client.actor("mo_khairy/fb-multi-group-scraper").call(run_input=run_input)
27
28
29print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
30for item in client.dataset(run.default_dataset_id).iterate_items():
31 print(item)
32
33