1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "records": [
9 {
10 "placeId": "sample-place-001",
11 "title": "Example Cafe",
12 "stars": 5,
13 "publishedAtDate": "2026-01-11T11:00:00Z",
14 "text": "Friendly staff and delicious food.",
15 },
16 {
17 "placeId": "sample-place-001",
18 "title": "Example Cafe",
19 "stars": 4,
20 "publishedAtDate": "2026-01-17T11:00:00Z",
21 "text": "Great service and clean tables.",
22 },
23 {
24 "placeId": "sample-place-001",
25 "title": "Example Cafe",
26 "stars": 4,
27 "publishedAtDate": "2026-02-03T11:00:00Z",
28 "text": "Good atmosphere and reasonable price.",
29 },
30 {
31 "placeId": "sample-place-001",
32 "title": "Example Cafe",
33 "stars": 3,
34 "publishedAtDate": "2026-02-09T11:00:00Z",
35 "text": "The wait time is slow.",
36 },
37 {
38 "placeId": "sample-place-001",
39 "title": "Example Cafe",
40 "stars": 2,
41 "publishedAtDate": "2026-03-10T11:00:00Z",
42 "text": "Long wait and noisy seating.",
43 },
44 {
45 "placeId": "sample-place-001",
46 "title": "Example Cafe",
47 "stars": 1,
48 "publishedAtDate": "2026-03-19T11:00:00Z",
49 "text": "Service was rude and the price is expensive.",
50 },
51 {
52 "placeId": "sample-place-002",
53 "title": "Example Bakery",
54 "stars": 4,
55 "publishedAtDate": "2026-01-13T11:00:00Z",
56 "text": "Fresh bread and friendly staff.",
57 },
58 {
59 "placeId": "sample-place-002",
60 "title": "Example Bakery",
61 "stars": 5,
62 "publishedAtDate": "2026-01-23T11:00:00Z",
63 "text": "Excellent value and delicious pastries.",
64 },
65 {
66 "placeId": "sample-place-002",
67 "title": "Example Bakery",
68 "stars": 4,
69 "publishedAtDate": "2026-02-08T11:00:00Z",
70 "text": "Clean shop, parking is easy.",
71 },
72 {
73 "placeId": "sample-place-002",
74 "title": "Example Bakery",
75 "stars": 5,
76 "publishedAtDate": "2026-02-14T11:00:00Z",
77 "text": "Great fresh quality.",
78 },
79 {
80 "placeId": "sample-place-002",
81 "title": "Example Bakery",
82 "stars": 5,
83 "publishedAtDate": "2026-03-05T11:00:00Z",
84 "text": "Fantastic service and fair price.",
85 },
86 {
87 "placeId": "sample-place-002",
88 "title": "Example Bakery",
89 "stars": 4,
90 "publishedAtDate": "2026-03-20T11:00:00Z",
91 "text": "Helpful staff and short wait.",
92 },
93 {
94 "placeId": "sample-place-001",
95 "title": "Example Cafe",
96 "stars": 2,
97 "publishedAtDate": "2026-04-03T11:00:00Z",
98 "text": "Long wait and slow service",
99 },
100 {
101 "placeId": "sample-place-001",
102 "title": "Example Cafe",
103 "stars": 1,
104 "publishedAtDate": "2026-04-09T11:00:00Z",
105 "text": "Wait was long and staff were rude",
106 },
107 {
108 "placeId": "sample-place-001",
109 "title": "Example Cafe",
110 "stars": 2,
111 "publishedAtDate": "2026-04-15T11:00:00Z",
112 "text": "Overpriced, delayed order",
113 },
114 {
115 "placeId": "sample-place-001",
116 "title": "Example Cafe",
117 "stars": 1,
118 "publishedAtDate": "2026-05-02T11:00:00Z",
119 "text": "Dirty tables and poor service",
120 },
121 {
122 "placeId": "sample-place-001",
123 "title": "Example Cafe",
124 "stars": 2,
125 "publishedAtDate": "2026-05-11T11:00:00Z",
126 "text": "Slow service and long wait",
127 },
128 {
129 "placeId": "sample-place-001",
130 "title": "Example Cafe",
131 "stars": 1,
132 "publishedAtDate": "2026-05-21T11:00:00Z",
133 "text": "Staff were rude and the price was too expensive",
134 },
135 {
136 "placeId": "sample-place-002",
137 "title": "Example Bakery",
138 "stars": 5,
139 "publishedAtDate": "2026-04-01T11:00:00Z",
140 "text": "Friendly service and fresh bread",
141 "responseFromOwnerText": "Thank you for the feedback.",
142 },
143 {
144 "placeId": "sample-place-002",
145 "title": "Example Bakery",
146 "stars": 5,
147 "publishedAtDate": "2026-04-07T11:00:00Z",
148 "text": "Excellent pastries and good value",
149 "responseFromOwnerText": "Thank you for the feedback.",
150 },
151 {
152 "placeId": "sample-place-002",
153 "title": "Example Bakery",
154 "stars": 5,
155 "publishedAtDate": "2026-04-12T11:00:00Z",
156 "text": "Helpful staff and short wait",
157 "responseFromOwnerText": "Thank you for the feedback.",
158 },
159 {
160 "placeId": "sample-place-002",
161 "title": "Example Bakery",
162 "stars": 4,
163 "publishedAtDate": "2026-05-03T11:00:00Z",
164 "text": "Lovely quality and friendly service",
165 "responseFromOwnerText": "Thank you for the feedback.",
166 },
167 {
168 "placeId": "sample-place-002",
169 "title": "Example Bakery",
170 "stars": 5,
171 "publishedAtDate": "2026-05-13T11:00:00Z",
172 "text": "Good parking and excellent bread",
173 "responseFromOwnerText": "Thank you for the feedback.",
174 },
175 {
176 "placeId": "sample-place-002",
177 "title": "Example Bakery",
178 "stars": 5,
179 "publishedAtDate": "2026-05-18T11:00:00Z",
180 "text": "Nice atmosphere and fresh pastries",
181 "responseFromOwnerText": "Thank you for the feedback.",
182 },
183 ] }
184
185
186run = client.actor("practical_ai_lab_jp/pal-maps-reviews-sentiment-trends").call(run_input=run_input)
187
188
189print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
190for item in client.dataset(run.default_dataset_id).iterate_items():
191 print(item)
192
193