1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "profiles": [
12 "charlidamelio",
13 "addisonre",
14 "bellapoarch",
15 "zachking",
16 "khaby.lame",
17 "willsmith",
18 "kyliejenner",
19 "therock",
20 "selenagomez",
21 "arianagrande",
22 "billieeilish",
23 "mrbeast",
24 "doja.cat",
25 "mileycyrus",
26 "jasonderulo",
27 "jlo",
28 "shakira",
29 "taylorswift",
30 "kimkardashian",
31 "rihanna",
32 "nickiminaj",
33 "cardib",
34 "badbunnypr",
35 "dualipa",
36 "edsheeran",
37 "brunomars",
38 "kendalljenner",
39 "mariahcarey",
40 "justinbieber",
41 "ninaagdal"
42 ],
43 "maxItems": 10
44};
45
46
47const run = await client.actor("parseforge/tiktok-profile-scraper").call(input);
48
49
50console.log('Results from dataset');
51console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57