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": "creator1",
14 "name": "Creator Alpha",
15 "followers": 420000,
16 "engagementRate": 5.8,
17 "growthPct": 22,
18 "verified": true,
19 "brandFitScore": 88
20 },
21 {
22 "id": "creator2",
23 "name": "Creator Beta",
24 "followers": 68000,
25 "engagementRate": 1.9,
26 "growthPct": 3,
27 "verified": false,
28 "brandFitScore": 62
29 }
30 ],
31 "previousItems": [
32 {
33 "id": "creator1",
34 "name": "Creator Alpha",
35 "followers": 360000,
36 "engagementRate": 4.9,
37 "growthPct": 14,
38 "verified": true,
39 "brandFitScore": 82
40 }
41 ]
42};
43
44
45const run = await client.actor("quanmatrix/x-creator-influence-authenticity-intelligence").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55