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 "placeId": "demo-cafe-1",
14 "locationName": "Demo Cafe",
15 "publishedAt": "2026-09-20",
16 "rating": 5
17 },
18 {
19 "placeId": "demo-cafe-1",
20 "locationName": "Demo Cafe",
21 "publishedAt": "2026-08-02",
22 "rating": 4
23 },
24 {
25 "placeId": "demo-cafe-1",
26 "locationName": "Demo Cafe",
27 "publishedAt": "2026-03-15",
28 "rating": 4
29 },
30 {
31 "placeId": "demo-gym-2",
32 "locationName": "Demo Gym",
33 "publishedAt": "2025-05-11",
34 "rating": 3
35 },
36 {
37 "placeId": "demo-gym-2",
38 "locationName": "Demo Gym",
39 "publishedAt": "2025-01-30",
40 "rating": 4
41 }
42 ],
43 "referenceDate": "2026-10-01"
44};
45
46
47const run = await client.actor("practical_ai_lab_jp/pal-maps-review-recency-audit").call(input);
48
49
50console.log('Results from dataset');
51console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57