1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "keyword": [
10 "https://www.tripadvisor.com/Airline_Review-d8729069-Reviews-Emirates",
11 "https://www.tripadvisor.com/Hotel_Review-g186338-d193104-Reviews-The_Clermont_London_Charing_Cross-London_England.html",
12 ],
13 "text": "",
14 "lang": ["en"],
15 "rating": [
16 "1",
17 "2",
18 "3",
19 "4",
20 "5",
21 ],
22 "cabin": [
23 "BUSINESS",
24 "ECONOMY",
25 "FIRST",
26 "PREMIUM_ECONOMY",
27 ],
28 "segment": [
29 "Business",
30 "Couples",
31 "Family",
32 "Friends",
33 "Solo",
34 ],
35 "bestmonths": [
36 "1",
37 "10",
38 "11",
39 "12",
40 "2",
41 "3",
42 "4",
43 "5",
44 "6",
45 "7",
46 "8",
47 "9",
48 ],
49 "fromdate": "",
50 "cookie": "",
51 "proxy": {
52 "useApifyProxy": True,
53 "apifyProxyGroups": ["RESIDENTIAL"],
54 },
55}
56
57
58run = client.actor("canadesk/tripadvisor-reviews-bulk").call(run_input=run_input)
59
60
61print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
62for item in client.dataset(run["defaultDatasetId"]).iterate_items():
63 print(item)
64
65