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": "ig1",
14 "username": "creator_alpha",
15 "followersCount": 182000,
16 "followsCount": 610,
17 "postsCount": 740,
18 "biography": "fitness nutrition running coach",
19 "avgLikes": 9200,
20 "avgComments": 340,
21 "verified": true
22 },
23 {
24 "id": "ig2",
25 "username": "creator_beta",
26 "followersCount": 48000,
27 "followsCount": 2200,
28 "postsCount": 410,
29 "biography": "lifestyle travel deals",
30 "avgLikes": 900,
31 "avgComments": 35,
32 "verified": false
33 }
34 ],
35 "previousItems": [
36 {
37 "id": "ig1",
38 "username": "creator_alpha",
39 "followersCount": 165000,
40 "followsCount": 600,
41 "postsCount": 710,
42 "biography": "fitness and running",
43 "avgLikes": 7600,
44 "avgComments": 300,
45 "verified": true
46 }
47 ]
48};
49
50
51const run = await client.actor("quanmatrix/instagram-creator-brand-fit-intelligence").call(input);
52
53
54console.log('Results from dataset');
55console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
56const { items } = await client.dataset(run.defaultDatasetId).listItems();
57items.forEach((item) => {
58 console.dir(item);
59});
60
61