1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "places": [
12 {
13 "place_id": "ChIJExamplePositive1",
14 "title": "Example Coffee House",
15 "category": "Coffee shop",
16 "rating": 4.8,
17 "review_count": 1240,
18 "complete_address": {
19 "city": "Berlin",
20 "country": "Germany"
21 },
22 "user_reviews": [
23 {
24 "name": "Anna",
25 "rating": 5,
26 "text": "Best flat white in the neighborhood. Staff remember my name.",
27 "published_at": "2026-05-01",
28 "response_from_owner": null
29 },
30 {
31 "name": "Ben",
32 "rating": 5,
33 "text": "Great pastries, always fresh. Cozy atmosphere too.",
34 "published_at": "2026-04-15",
35 "response_from_owner": null
36 },
37 {
38 "name": "Chris",
39 "rating": 4,
40 "text": "Excellent coffee, gets crowded on Saturdays but worth the wait.",
41 "published_at": "2026-03-20",
42 "response_from_owner": null
43 }
44 ]
45 }
46 ]
47};
48
49
50const run = await client.actor("santamaria-automations/review-intelligence-analyzer").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