1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "auto",
12 "searchQuery": "artificial intelligence",
13 "searchQueries": [],
14 "postUrls": [],
15 "sortBy": "relevance",
16 "datePosted": "",
17 "postedAfter": "",
18 "postedBefore": "",
19 "authorType": "",
20 "contentType": [
21 "articles",
22 "posts",
23 "documents",
24 "videos",
25 "images"
26 ],
27 "minReactions": 0,
28 "minComments": 0,
29 "excludeReposts": false,
30 "includeUnmatched": false,
31 "language": "en",
32 "countryCode": "auto",
33 "maxResults": 3,
34 "hydratePosts": true,
35 "includeVideoTranscript": false,
36 "monitorMode": false,
37 "emitNoResultsMarker": true,
38 "mentions": [],
39 "mentionsCompany": "",
40 "mentionsPerson": "",
41 "talksAbout": [],
42 "includeDocumentDetails": false,
43 "includeRepostCounts": false,
44 "enrichSdui": false
45};
46
47
48const run = await client.actor("vexaloom-labs/linkedin-keyword-and-hashtag-post-discovery").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