1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "id": "tt1",
14 "uniqueId": "creatorfast",
15 "followerCount": 320000,
16 "followingCount": 420,
17 "heartCount": 9200000,
18 "videoCount": 610,
19 "likes": 48000,
20 "comments": 2200,
21 "shares": 8100,
22 "views": 780000
23 },
24 {
25 "id": "tt2",
26 "uniqueId": "creatorflat",
27 "followerCount": 510000,
28 "followingCount": 850,
29 "heartCount": 6800000,
30 "videoCount": 1900,
31 "likes": 15000,
32 "comments": 500,
33 "shares": 900,
34 "views": 420000
35 }
36 ],
37 "previousItems": [
38 {
39 "id": "tt1",
40 "uniqueId": "creatorfast",
41 "followerCount": 285000,
42 "followingCount": 410,
43 "heartCount": 7900000,
44 "videoCount": 580,
45 "likes": 39000,
46 "comments": 1900,
47 "shares": 6700,
48 "views": 650000
49 }
50 ]
51};
52
53
54const run = await client.actor("quanmatrix/tiktok-creator-growth-quality-intelligence").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64