1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "subreddits": [
12 "technology"
13 ],
14 "users": [],
15 "keywords": [],
16 "domains": [],
17 "postUrls": [],
18 "include": [
19 "posts",
20 "comments",
21 "userProfile",
22 "subredditProfile",
23 "keywordSummary",
24 "indicators",
25 "relatedSubreddits"
26 ],
27 "sort": "new",
28 "time": "all",
29 "maxItemsPerSource": 40,
30 "maxCommentsPerPost": 3000,
31 "deepComments": true,
32 "filterKeywords": [],
33 "indicatorKinds": [
34 "cve",
35 "ipv4",
36 "hash",
37 "wallet",
38 "email",
39 "phone",
40 "domain",
41 "mentioned_user",
42 "mentioned_subreddit"
43 ],
44 "outputFormat": "full",
45 "postMetrics": true,
46 "competitorNames": [],
47 "customLabels": [],
48 "ai": [],
49 "aiLabels": [],
50 "aiMaxItems": 2000,
51 "apiRequestsPerMinute": 80,
52 "proxyConfiguration": {
53 "useApifyProxy": true
54 }
55};
56
57
58const run = await client.actor("ntriqpro/reddit-user-subreddit-osint").call(input);
59
60
61console.log('Results from dataset');
62console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
63const { items } = await client.dataset(run.defaultDatasetId).listItems();
64items.forEach((item) => {
65 console.dir(item);
66});
67
68