1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "enableYouTube": true,
12 "youtubeUrls": [
13 "https://www.youtube.com/@TED"
14 ],
15 "enableYouTubeTranscripts": false,
16 "enableYouTubeComments": false,
17 "youtubeMaxComments": 20,
18 "enableInstagram": false,
19 "enableInstagramReels": true,
20 "enableInstagramPosts": true,
21 "enableInstagramAnalytics": true,
22 "enableInstagramComments": false,
23 "instagramMaxComments": 20,
24 "enableTikTok": false,
25 "enableTikTokComments": false,
26 "tiktokMaxComments": 20,
27 "enableReddit": false,
28 "enableRedditComments": false,
29 "redditMaxComments": 20,
30 "enableRedditProfiles": false,
31 "enableLinkedIn": false,
32 "contentLimitPerSource": 10,
33 "maxItems": 30,
34 "minimumBaselineItems": 8,
35 "minimumOutlierScore": 2,
36 "includeAllContent": false,
37 "aiAnalysis": false,
38 "topOutliersPerSource": 5,
39 "proxyConfiguration": {
40 "useApifyProxy": true,
41 "apifyProxyGroups": [
42 "RESIDENTIAL"
43 ]
44 }
45};
46
47
48const run = await client.actor("rigelbytes/social-media-content-outlier").call(input);
49
50
51console.log('Results from dataset');
52console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58