1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "reviews": [
9 {
10 "locationName": "Harbor Cafe",
11 "rating": 1,
12 "publishedAt": "2026-10-20",
13 "text": "Long wait and the staff were rude.",
14 },
15 {
16 "locationName": "Harbor Cafe",
17 "rating": 2,
18 "publishedAt": "2026-10-18",
19 "text": "Wrong order and slow service.",
20 },
21 {
22 "locationName": "Harbor Cafe",
23 "rating": 5,
24 "publishedAt": "2026-10-05",
25 "text": "Great coffee.",
26 },
27 {
28 "locationName": "Harbor Cafe",
29 "rating": 5,
30 "publishedAt": "2026-09-10",
31 "text": "Lovely place.",
32 },
33 {
34 "locationName": "Harbor Cafe",
35 "rating": 4,
36 "publishedAt": "2026-09-12",
37 "text": "Good.",
38 },
39 {
40 "locationName": "Harbor Cafe",
41 "rating": 5,
42 "publishedAt": "2026-09-15",
43 "text": "Friendly.",
44 },
45 {
46 "locationName": "Central Gym",
47 "rating": 1,
48 "publishedAt": "2026-10-22",
49 "text": "Dirty showers and a bad smell.",
50 },
51 {
52 "locationName": "Central Gym",
53 "rating": 2,
54 "publishedAt": "2026-10-15",
55 "text": "Locker room is filthy.",
56 },
57 {
58 "locationName": "Central Gym",
59 "rating": 4,
60 "publishedAt": "2026-10-10",
61 "text": "Good equipment.",
62 },
63 {
64 "locationName": "Park Dental",
65 "rating": 5,
66 "publishedAt": "2026-10-21",
67 "text": "Quick and clean.",
68 },
69 {
70 "locationName": "Park Dental",
71 "rating": 4,
72 "publishedAt": "2026-10-12",
73 "text": "Fine visit.",
74 },
75 {
76 "locationName": "Park Dental",
77 "rating": 2,
78 "publishedAt": "2026-10-02",
79 "text": "Billing mistake, charged twice.",
80 },
81 ] }
82
83
84run = client.actor("practical_ai_lab_jp/pal-maps-reviews-response-prioritizer").call(run_input=run_input)
85
86
87print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
88for item in client.dataset(run.default_dataset_id).iterate_items():
89 print(item)
90
91