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 "placeId": "SAMPLE-PLACE-001",
14 "title": "Example Fixtures Harbor",
15 "postalCode": "10001",
16 "city": "Harborview",
17 "lastReviewDate": "2026-10-20"
18 },
19 {
20 "placeId": "SAMPLE-PLACE-002",
21 "title": "Example Fixtures Riverside",
22 "postalCode": "10002",
23 "city": "Harborview",
24 "lastReviewDate": "2025-12-15"
25 },
26 {
27 "placeId": "SAMPLE-PLACE-003",
28 "title": "Example Fixtures Uptown",
29 "postalCode": "10003",
30 "city": "Harborview",
31 "lastReviewDate": "2026-03-01"
32 },
33 {
34 "placeId": "SAMPLE-PLACE-003",
35 "title": "Example Fixtures Uptown",
36 "postalCode": "10003",
37 "city": "Harborview",
38 "lastReviewDate": "2026-02-01"
39 },
40 {
41 "placeId": "SAMPLE-PLACE-005",
42 "title": "Example Fixtures Lakeside",
43 "postalCode": "10005",
44 "city": "Harborview"
45 },
46 {
47 "placeId": "SAMPLE-PLACE-009",
48 "title": "Example Fixtures Airport",
49 "postalCode": "10009",
50 "city": "Harborview",
51 "lastReviewDate": "2026-09-01"
52 }
53 ],
54 "roster": [
55 {
56 "branchId": "BR-001",
57 "placeId": "SAMPLE-PLACE-001",
58 "owner": "Facilities North",
59 "escalateTo": "Regional Operations"
60 },
61 {
62 "branchId": "BR-002",
63 "placeId": "SAMPLE-PLACE-002",
64 "owner": "Facilities South",
65 "escalateTo": "Regional Operations"
66 },
67 {
68 "branchId": "BR-003",
69 "placeId": "SAMPLE-PLACE-003",
70 "owner": "Facilities North",
71 "escalateTo": "Regional Operations"
72 },
73 {
74 "branchId": "BR-004",
75 "placeId": "SAMPLE-PLACE-004",
76 "owner": "Facilities West",
77 "escalateTo": "Regional Operations"
78 },
79 {
80 "branchId": "BR-005",
81 "placeId": "SAMPLE-PLACE-005",
82 "owner": "Facilities South",
83 "escalateTo": "Regional Operations"
84 }
85 ],
86 "referenceDate": "2026-11-01"
87};
88
89
90const run = await client.actor("practical_ai_lab_jp/pal-maps-branch-exception-escalation-audit").call(input);
91
92
93console.log('Results from dataset');
94console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
95const { items } = await client.dataset(run.defaultDatasetId).listItems();
96items.forEach((item) => {
97 console.dir(item);
98});
99
100