1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "usernames": [
12 "NASA"
13 ],
14 "include": [
15 "profileInfo"
16 ],
17 "maxPostsPerProfile": 3,
18 "includeReplies": false,
19 "includeRetweets": false,
20 "includeHighlights": false,
21 "onlyWithMedia": false,
22 "mediaType": "any",
23 "onlyVerified": false,
24 "verifiedType": "any",
25 "minFollowers": 0,
26 "maxFollowers": 0,
27 "minAccountAgeDays": 0,
28 "withWebsiteOnly": false,
29 "activeWithinDays": 0,
30 "enrichEngagement": false,
31 "proxyConfiguration": {
32 "useApifyProxy": false
33 }
34};
35
36
37const run = await client.actor("nimbryxo-studio/x-twitter-profile-and-post-engagement-extractor").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47