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 "title": "Example Bakery",
14 "placeId": "example-1",
15 "stars": 2,
16 "text": "Waited 25 minutes for two croissants and nobody apologised. The bread is good, but the service on Saturday morning is chaos.",
17 "publishedAtDate": "2026-10-20T09:12:00Z",
18 "reviewId": "demo-1"
19 },
20 {
21 "title": "Example Bakery",
22 "placeId": "example-1",
23 "stars": 5,
24 "text": "Best sourdough in town and the staff remembered my order.",
25 "publishedAtDate": "2026-10-21T08:30:00Z",
26 "reviewId": "demo-2"
27 },
28 {
29 "title": "Example Bakery",
30 "placeId": "example-1",
31 "stars": 1,
32 "text": "Bestelde een taart voor zaterdag, bij het afhalen was ze er niet. Geen excuses, geen oplossing.",
33 "publishedAtDate": "2026-10-22T15:40:00Z",
34 "reviewId": "demo-3"
35 }
36 ]
37};
38
39
40const run = await client.actor("olliolli/review-digest").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50