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 "reviewId": "RV101",
14 "business": "Cafe Alpha",
15 "topic": "service",
16 "category": "negative-unanswered",
17 "value": 1,
18 "rating": 1,
19 "date": "2026-10-12"
20 },
21 {
22 "reviewId": "RV102",
23 "business": "Cafe Alpha",
24 "topic": "waiting time",
25 "category": "negative-unanswered",
26 "value": 1,
27 "rating": 2,
28 "date": "2026-10-12"
29 },
30 {
31 "reviewId": "RV202",
32 "business": "Bistro Beta",
33 "topic": "food",
34 "category": "positive-answered",
35 "value": 1,
36 "rating": 5,
37 "date": "2026-10-12"
38 }
39 ],
40 "previousItems": [
41 {
42 "reviewId": "RV100",
43 "business": "Cafe Alpha",
44 "topic": "service",
45 "category": "negative-unanswered",
46 "value": 1,
47 "rating": 1,
48 "date": "2026-10-05"
49 },
50 {
51 "reviewId": "RV201",
52 "business": "Bistro Beta",
53 "topic": "food",
54 "category": "positive-answered",
55 "value": 1,
56 "rating": 5,
57 "date": "2026-10-05"
58 }
59 ]
60};
61
62
63const run = await client.actor("quanmatrix/google-maps-review-complaint-drift-analyzer").call(input);
64
65
66console.log('Results from dataset');
67console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
68const { items } = await client.dataset(run.defaultDatasetId).listItems();
69items.forEach((item) => {
70 console.dir(item);
71});
72
73