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 "reviewId": "ex-101",
14 "employer": {
15 "shortName": "Northwind Labs (example)"
16 },
17 "reviewDateTime": "2026-08-03T10:00:00.000",
18 "ratingOverall": 4,
19 "pros": "Fair pay and flexible hours.",
20 "cons": "Promotions are slow."
21 },
22 {
23 "reviewId": "ex-102",
24 "employer": {
25 "shortName": "Northwind Labs (example)"
26 },
27 "reviewDateTime": "2026-08-09T10:00:00.000",
28 "ratingOverall": 4,
29 "pros": "Supportive manager, good benefits.",
30 "cons": "Too many meetings."
31 },
32 {
33 "reviewId": "ex-103",
34 "employer": {
35 "shortName": "Northwind Labs (example)"
36 },
37 "reviewDateTime": "2026-08-14T10:00:00.000",
38 "ratingOverall": 5,
39 "pros": "Remote friendly, smart colleagues.",
40 "cons": "Career growth could be faster."
41 },
42 {
43 "reviewId": "ex-104",
44 "employer": {
45 "shortName": "Northwind Labs (example)"
46 },
47 "reviewDateTime": "2026-08-20T10:00:00.000",
48 "ratingOverall": 3,
49 "pros": "Good benefits.",
50 "cons": "Pay is below market."
51 },
52 {
53 "reviewId": "ex-105",
54 "employer": {
55 "shortName": "Northwind Labs (example)"
56 },
57 "reviewDateTime": "2026-08-25T10:00:00.000",
58 "ratingOverall": 4,
59 "pros": "Great culture.",
60 "cons": "Some processes are slow."
61 },
62 {
63 "reviewId": "ex-106",
64 "employer": {
65 "shortName": "Northwind Labs (example)"
66 },
67 "reviewDateTime": "2026-08-29T10:00:00.000",
68 "ratingOverall": 4,
69 "pros": "Flexible schedule.",
70 "cons": "Not much training."
71 },
72 {
73 "reviewId": "ex-107",
74 "employer": {
75 "shortName": "Northwind Labs (example)"
76 },
77 "reviewDateTime": "2026-09-02T10:00:00.000",
78 "ratingOverall": 2,
79 "pros": "Colleagues are still great.",
80 "cons": "Layoffs this month and nobody knows who is next."
81 },
82 {
83 "reviewId": "ex-108",
84 "employer": {
85 "shortName": "Northwind Labs (example)"
86 },
87 "reviewDateTime": "2026-09-08T10:00:00.000",
88 "ratingOverall": 2,
89 "pros": "Benefits are fine.",
90 "cons": "After the reorg the workload doubled and there is no job security."
91 },
92 {
93 "reviewId": "ex-109",
94 "employer": {
95 "shortName": "Northwind Labs (example)"
96 },
97 "reviewDateTime": "2026-09-12T10:00:00.000",
98 "ratingOverall": 3,
99 "pros": "Smart colleagues.",
100 "cons": "Return to office mandate with two weeks notice."
101 },
102 {
103 "reviewId": "ex-110",
104 "employer": {
105 "shortName": "Northwind Labs (example)"
106 },
107 "reviewDateTime": "2026-09-17T10:00:00.000",
108 "ratingOverall": 2,
109 "pros": "Free snacks.",
110 "cons": "More layoffs announced and management does not communicate."
111 },
112 {
113 "reviewId": "ex-111",
114 "employer": {
115 "shortName": "Northwind Labs (example)"
116 },
117 "reviewDateTime": "2026-09-22T10:00:00.000",
118 "ratingOverall": 3,
119 "pros": "Good pay.",
120 "cons": "Stress is high since the layoffs."
121 },
122 {
123 "reviewId": "ex-112",
124 "employer": {
125 "shortName": "Northwind Labs (example)"
126 },
127 "reviewDateTime": "2026-09-27T10:00:00.000",
128 "ratingOverall": 2,
129 "pros": "Nice office.",
130 "cons": "Leadership has no clear direction."
131 }
132 ]
133};
134
135
136const run = await client.actor("ntriqpro/glassdoor-reviews-change-insights").call(input);
137
138
139console.log('Results from dataset');
140console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
141const { items } = await client.dataset(run.defaultDatasetId).listItems();
142items.forEach((item) => {
143 console.dir(item);
144});
145
146