1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "productName": "Acme Cloud",
12 "reviews": [
13 {
14 "id": "r1",
15 "text": "Easy to use and intuitive, but reports are slow and sometimes crash.",
16 "rating": 3,
17 "date": "2026-03-01"
18 },
19 {
20 "id": "r2",
21 "text": "Please add a native Salesforce integration.",
22 "rating": 3,
23 "date": "2026-04-01"
24 },
25 {
26 "id": "r3",
27 "text": "The pricing is expensive for what we get.",
28 "rating": 2,
29 "date": "2026-05-01"
30 },
31 {
32 "id": "r4",
33 "text": "We switched from RivalCo because setup was simple.",
34 "rating": 5,
35 "date": "2026-06-01"
36 },
37 {
38 "id": "r5",
39 "text": "Support response time is slow and the app keeps crashing.",
40 "rating": 1,
41 "date": "2026-07-01"
42 },
43 {
44 "id": "r6",
45 "text": "Great product, very user friendly.",
46 "rating": 5,
47 "date": "2026-08-01"
48 }
49 ],
50 "competitorNames": [
51 "RivalCo"
52 ]
53};
54
55
56const run = await client.actor("egeusta/saas-voice-of-customer-battlecard").call(input);
57
58
59console.log('Results from dataset');
60console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
61const { items } = await client.dataset(run.defaultDatasetId).listItems();
62items.forEach((item) => {
63 console.dir(item);
64});
65
66