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 "text": "The app keeps crashing whenever I upload a photo.",
15 "rating": 1,
16 "date": "2026-06-01",
17 "version": "4.1"
18 },
19 {
20 "id": "r2",
21 "text": "Still crashes after the latest update and support never replies.",
22 "rating": 1,
23 "date": "2026-06-15",
24 "version": "4.2"
25 },
26 {
27 "id": "r3",
28 "text": "Photo upload is slow and sometimes shows an error.",
29 "rating": 2,
30 "date": "2026-07-01",
31 "version": "4.2"
32 },
33 {
34 "id": "r4",
35 "text": "I was charged after cancelling my subscription.",
36 "rating": 1,
37 "date": "2026-07-05",
38 "version": "4.2"
39 },
40 {
41 "id": "r5",
42 "text": "Please add an export button. The navigation is confusing.",
43 "rating": 3,
44 "date": "2026-07-08",
45 "version": "4.2"
46 },
47 {
48 "id": "r6",
49 "text": "The app crashes on startup and I cannot login.",
50 "rating": 1,
51 "date": "2026-07-10",
52 "version": "4.2"
53 }
54 ]
55};
56
57
58const run = await client.actor("webdata_labs/review-pain-miner-api").call(input);
59
60
61console.log('Results from dataset');
62console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
63const { items } = await client.dataset(run.defaultDatasetId).listItems();
64items.forEach((item) => {
65 console.dir(item);
66});
67
68