1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "locations",
10 "startUrls": [
11 { "url": "https://www.tripadvisor.com/Hotel_Review-g187147-d229968-Reviews-Hotel_Astra_Opera_Astotel-Paris_Ile_de_France.html" },
12 { "url": "https://www.tripadvisor.com/Restaurant_Review-g60827-d425227-Reviews-Geido-Brooklyn_New_York.html" },
13 ],
14 "searchTerms": [
15 "Paris",
16 "Dubai",
17 ],
18 "locations": [
19 "Paris",
20 "Dubai",
21 ],
22 "category": "all",
23 "includeReviews": True,
24 "maxReviewsPerPoi": 10,
25 "maxPois": 50,
26 "maxItems": 10,
27 "locale": "en-US",
28 "maxRetries": 5,
29 "maxConcurrency": 10,
30}
31
32
33run = client.actor("pro100chok/tripadvisor-all-in-one").call(run_input=run_input)
34
35
36print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
37for item in client.dataset(run["defaultDatasetId"]).iterate_items():
38 print(item)
39
40