1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "reviews": [
12 {
13 "review_id": "example-1",
14 "rating": 5,
15 "review_title": "Battery lasts all week",
16 "review_body": "Charged it once on Monday and it was still going on Sunday, the strap is comfortable too.",
17 "review_date_iso": "2026-03-02T00:00:00.000Z",
18 "is_verified_purchase": true
19 },
20 {
21 "review_id": "example-2",
22 "rating": 4,
23 "review_title": "Fine for the price",
24 "review_body": "Does what it says, though the app is a little slow to sync after the first update.",
25 "review_date_iso": "2026-03-04T00:00:00.000Z",
26 "is_verified_purchase": true
27 },
28 {
29 "review_id": "example-3",
30 "rating": 1,
31 "review_title": "Stopped working",
32 "review_body": "Worked for two weeks then the screen went blank and support offered only a refund.",
33 "review_date_iso": "2026-03-05T00:00:00.000Z",
34 "is_verified_purchase": true
35 },
36 {
37 "review_id": "example-4",
38 "rating": 5,
39 "review_title": "Great gift",
40 "review_body": "Bought this for my brother and he uses it every day for running and sleep tracking.",
41 "review_date_iso": "2026-03-09T00:00:00.000Z",
42 "is_verified_purchase": true
43 },
44 {
45 "review_id": "example-5",
46 "rating": 4,
47 "review_title": "Good value",
48 "review_body": "Solid build and accurate step counts compared with my old tracker over three weeks.",
49 "review_date_iso": "2026-03-11T00:00:00.000Z",
50 "is_verified_purchase": true
51 },
52 {
53 "review_id": "example-6",
54 "rating": 5,
55 "review_title": "Love it",
56 "review_body": "Love it works great highly recommend to everyone looking for a simple tracker today.",
57 "review_date_iso": "2026-03-12T00:00:00.000Z",
58 "is_verified_purchase": false
59 },
60 {
61 "review_id": "example-7",
62 "rating": 5,
63 "review_title": "Love it",
64 "review_body": "Love it works great highly recommend to everyone looking for a simple tracker today.",
65 "review_date_iso": "2026-03-12T00:00:00.000Z",
66 "is_verified_purchase": false
67 },
68 {
69 "review_id": "example-8",
70 "rating": 5,
71 "review_title": "Honest review",
72 "review_body": "I received this item for free in exchange for my honest review. It tracks steps well.",
73 "review_date_iso": "2026-03-13T00:00:00.000Z",
74 "is_verified_purchase": false
75 },
76 {
77 "review_id": "example-9",
78 "rating": 3,
79 "review_title": "Okay",
80 "review_body": "Average screen brightness outdoors but the heart-rate reading matched my chest strap.",
81 "review_date_iso": "2026-03-15T00:00:00.000Z",
82 "is_verified_purchase": true
83 },
84 {
85 "review_id": "example-10",
86 "rating": 2,
87 "review_title": "Not as described",
88 "review_body": "Looks different from the photos and the charging cable is shorter than expected.",
89 "review_date_iso": "2026-03-18T00:00:00.000Z",
90 "is_verified_purchase": true
91 },
92 {
93 "review_id": "example-11",
94 "rating": 4,
95 "review_title": "Works well",
96 "review_body": "Pairs quickly with my phone and notifications arrive without delay, very happy.",
97 "review_date_iso": "2026-03-21T00:00:00.000Z",
98 "is_verified_purchase": true
99 },
100 {
101 "review_id": "example-12",
102 "rating": 2,
103 "review_title": "Disappointed",
104 "review_body": "Arrived with a scratched case and the first sync failed three times in a row.",
105 "review_date_iso": "2026-03-24T00:00:00.000Z",
106 "is_verified_purchase": true
107 }
108 ]
109};
110
111
112const run = await client.actor("khadinakbar/reviewmeta-alternative").call(input);
113
114
115console.log('Results from dataset');
116console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
117const { items } = await client.dataset(run.defaultDatasetId).listItems();
118items.forEach((item) => {
119 console.dir(item);
120});
121
122