1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "maxItems": 10,
12 "twitterHandles": [
13 "elonmusk",
14 "sama",
15 "naval",
16 "paulg",
17 "garrytan",
18 "vitalikbuterin",
19 "jack",
20 "barackobama",
21 "billgates",
22 "justinbieber",
23 "taylorswift13",
24 "rihanna",
25 "selenagomez",
26 "cristiano",
27 "narendramodi",
28 "potus",
29 "cnn",
30 "bbcworld",
31 "nytimes",
32 "reuters",
33 "bloomberg",
34 "nasa",
35 "spacex",
36 "tesla",
37 "apple",
38 "google",
39 "microsoft",
40 "amazon",
41 "netflix",
42 "openai",
43 "ylecun",
44 "karpathy",
45 "sundarpichai",
46 "tim_cook",
47 "satyanadella",
48 "jeffbezos",
49 "shakira",
50 "kimkardashian",
51 "arianagrande",
52 "drake",
53 "beyonce",
54 "katyperry",
55 "arishlp",
56 "jeffdean",
57 "demishassabis",
58 "ilyasut",
59 "andrewyng",
60 "pmarca",
61 "balajis",
62 "palmerluckey"
63 ]
64};
65
66
67const run = await client.actor("parseforge/x-com-profiles-scraper").call(input);
68
69
70console.log('Results from dataset');
71console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
72const { items } = await client.dataset(run.defaultDatasetId).listItems();
73items.forEach((item) => {
74 console.dir(item);
75});
76
77