1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "records": [
12 {
13 "platform": "Weibo",
14 "contentId": "example-weibo",
15 "title": "AI wearable launch",
16 "topic": "AI wearable",
17 "creator": "Brand Example",
18 "engagement": 1400,
19 "engagementDelta": 240,
20 "rank": 3,
21 "rankDelta": 2
22 },
23 {
24 "platform": "RedNote",
25 "contentId": "example-rednote",
26 "title": "AI wearable hands-on",
27 "topic": "AI wearable",
28 "creator": "Creator Example",
29 "engagement": 1000,
30 "engagementDelta": 190,
31 "rank": 5,
32 "rankDelta": 2
33 }
34 ]
35};
36
37
38const run = await client.actor("quanmatrix/china-cross-platform-trend-kol-intelligence").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48