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 "product": "ExampleCRM",
14 "rating": 1,
15 "date": "2026-08-20",
16 "text": "Support never responds to our tickets.",
17 "url": "https://example.com/reviews/1"
18 },
19 {
20 "product": "ExampleCRM",
21 "rating": 2,
22 "date": "2026-08-20",
23 "text": "Terrible customer support response time."
24 },
25 {
26 "product": "ExampleCRM",
27 "rating": 2,
28 "date": "2026-08-20",
29 "text": "Support agent did not resolve the problem."
30 },
31 {
32 "product": "ExampleCRM",
33 "rating": 2,
34 "date": "2026-08-20",
35 "text": "The interface is confusing and hard to use."
36 },
37 {
38 "product": "ExampleCRM",
39 "rating": 2,
40 "date": "2026-08-20",
41 "text": "Navigation is difficult."
42 }
43 ],
44 "lookbackDays": 30,
45 "minMentions": 2,
46 "maxResults": 20
47};
48
49
50const run = await client.actor("signal_lab/review-pain-intelligence").call(input);
51
52
53console.log('Results from dataset');
54console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
55const { items } = await client.dataset(run.defaultDatasetId).listItems();
56items.forEach((item) => {
57 console.dir(item);
58});
59
60