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": {
27 "useApifyProxy": True,
28 "apifyProxyGroups": ["RESIDENTIAL"],
29 },
30}
31
32
33run = client.actor("scrapepilotapi/booking-scraper").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