1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "locations": ["東京"],
11 "keywords": [],
12 "urls": [
13 "https://travel.rakuten.co.jp/HOTEL/70818/70818.html",
14 "https://travel.rakuten.co.jp/yado/tokyo/",
15 ],
16 "sortBy": "recommended",
17 "sortResultsBy": "site_order",
18 "fetchDetails": True,
19 "fetchReviews": False,
20 "maxReviews": 20,
21 "maxItems": 20,
22 "maxPages": 0,
23 "incrementalMode": False,
24 "emitUnchanged": False,
25 "emitExpired": False,
26 "proxy": { "useApifyProxy": True },
27}
28
29
30run = client.actor("abotapi/rakuten-travel-scraper").call(run_input=run_input)
31
32
33print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
34for item in client.dataset(run.default_dataset_id).iterate_items():
35 print(item)
36
37