1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "reviews": [
9 {
10 "text": "The room was spotless and the location right by the harbor was perfect. Breakfast had great variety.",
11 "rating": 5,
12 },
13 {
14 "text": "Staff at reception were friendly, but check-in took almost 40 minutes. Frustrating after a long flight.",
15 "rating": 3,
16 },
17 {
18 "text": "Walls are paper thin, we heard every footstep from the corridor all night. Could not sleep.",
19 "rating": 2,
20 },
21 {
22 "text": "Amazing breakfast and the pool area was clean, but the room smelled of smoke despite being non-smoking.",
23 "rating": 3,
24 },
25 {
26 "text": "Best value for money in the area. Comfortable bed, hot shower, and the staff recommended great restaurants.",
27 "rating": 5,
28 },
29 ] }
30
31
32run = client.actor("enezli/tripadvisor-review-intelligence").call(run_input=run_input)
33
34
35print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
36for item in client.dataset(run["defaultDatasetId"]).iterate_items():
37 print(item)
38
39