1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "search": "New York",
10 "startUrls": [],
11 "maxItems": 10,
12 "scrapeAdditionalHotelData": True,
13 "propertyType": "none",
14 "sortBy": "distance_from_search",
15 "minimumRating": "",
16 "starsCountFilter": "any",
17 "currency": "USD",
18 "language": "en-gb",
19 "checkIn": "",
20 "checkOut": "",
21 "flexWindow": "0",
22 "rooms": 1,
23 "adults": 2,
24 "children": 0,
25 "minMaxPrice": "0-999999",
26 "proxyConfiguration": { "useApifyProxy": False },
27}
28
29
30run = client.actor("scrapebase/bookingscraper").call(run_input=run_input)
31
32
33print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
34for item in client.dataset(run["defaultDatasetId"]).iterate_items():
35 print(item)
36
37