1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "reviews": [
9 {
10 "text": "Food was delicious and the patio is lovely, but we waited 25 minutes just to be seated with a half-empty dining room.",
11 "rating": 3,
12 },
13 {
14 "text": "The staff were so warm and welcoming, remembered our names from last time. This is why we keep coming back.",
15 "rating": 5,
16 },
17 {
18 "text": "Prices have crept up a lot and portions got smaller. Not the value it used to be.",
19 "rating": 2,
20 },
21 {
22 "text": "Tables were sticky and the restroom clearly had not been cleaned. Great food ruined by poor hygiene.",
23 "rating": 2,
24 },
25 {
26 "text": "Fast, friendly service and the best coffee in the neighborhood. Cozy atmosphere, perfect for working.",
27 "rating": 5,
28 },
29 ] }
30
31
32run = client.actor("enezli/yelp-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