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 "netsec"
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 "deepComments": true,
31 "filterKeywords": [],
32 "indicatorKinds": [
33 "cve",
34 "ipv4",
35 "hash",
36 "wallet",
37 "email",
38 "phone",
39 "domain",
40 "mentioned_user",
41 "mentioned_subreddit"
42 ],
43 "outputFormat": "full",
44 "competitorNames": [],
45 "customLabels": [],
46 "ai": [],
47 "aiLabels": [],
48 "aiMaxItems": 2000,
49 "apiRequestsPerMinute": 80,
50 "proxyConfiguration": {
51 "useApifyProxy": true
52 }
53};
54
55
56const run = await client.actor("ntriqpro/reddit-user-subreddit-osint").call(input);
57
58
59console.log('Results from dataset');
60console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
61const { items } = await client.dataset(run.defaultDatasetId).listItems();
62items.forEach((item) => {
63 console.dir(item);
64});
65
66