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 "id": "R1",
14 "productId": "EXAMPLE-BLENDER",
15 "rating": 5,
16 "date": "2026-10-01",
17 "reviewer": "a1",
18 "text": "I received this blender for free in exchange for a 5-star review. Works great!"
19 },
20 {
21 "id": "R2",
22 "productId": "EXAMPLE-BLENDER",
23 "rating": 5,
24 "date": "2026-10-02",
25 "reviewer": "a2",
26 "text": "My brother owns the company, but honestly this is the best blender I've ever used."
27 },
28 {
29 "id": "R3",
30 "productId": "EXAMPLE-BLENDER",
31 "rating": 5,
32 "date": "2026-10-03",
33 "reviewer": "a3",
34 "text": "This blender is powerful and quiet, crushes ice in seconds and cleans up easily in the dishwasher. Highly recommend it to anyone."
35 },
36 {
37 "id": "R4",
38 "productId": "EXAMPLE-BLENDER",
39 "rating": 5,
40 "date": "2026-10-03",
41 "reviewer": "a4",
42 "text": "This blender is powerful and quiet, crushes ice in seconds and cleans up easily in the dishwasher. Highly recommend it to everyone."
43 },
44 {
45 "id": "R5",
46 "productId": "EXAMPLE-BLENDER",
47 "rating": 5,
48 "date": "2026-10-04",
49 "reviewer": "a5",
50 "text": "Terrible. Broke after two days and the lid leaks."
51 },
52 {
53 "id": "R6",
54 "productId": "EXAMPLE-BLENDER",
55 "rating": 4,
56 "date": "2026-10-05",
57 "reviewer": "a6",
58 "text": "Solid blender for smoothies. A bit loud on high, but the jar is sturdy and easy to clean."
59 },
60 {
61 "id": "R7",
62 "productId": "EXAMPLE-BLENDER",
63 "rating": 2,
64 "date": "2026-10-06",
65 "reviewer": "a7",
66 "text": "The motor smells hot after a minute. Returning it."
67 }
68 ]
69};
70
71
72const run = await client.actor("ultimatemc/review-integrity-checker").call(input);
73
74
75console.log('Results from dataset');
76console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
77const { items } = await client.dataset(run.defaultDatasetId).listItems();
78items.forEach((item) => {
79 console.dir(item);
80});
81
82