1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "HYBRID",
10 "subreddits": [
11 "technology",
12 "gaming",
13 "personalfinance",
14 ],
15 "seedTopics": ["AI agents"],
16 "timeWindow": "7_DAYS",
17 "postsPerSource": 100,
18 "sortSources": [
19 "HOT",
20 "RISING",
21 ],
22 "minimumPostsPerTopic": 3,
23 "minimumAuthorsPerTopic": 2,
24 "minimumSubredditsPerTopic": 1,
25 "minimumTrendTier": "ACTIVE",
26 "maxTopics": 25,
27 "maxEvidencePosts": 5,
28 "proxyConfiguration": { "useApifyProxy": True },
29}
30
31
32run = client.actor("coregent/reddit-trending-topics-finder").call(run_input=run_input)
33
34
35print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
36for item in client.dataset(run.default_dataset_id).iterate_items():
37 print(item)
38
39