1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "locations": ["Berlin"],
11 "propertyType": "hostel",
12 "startUrls": [
13 { "url": "https://www.hostelworld.com/hostels/p/703/circus-hostel/" },
14 { "url": "https://www.hostelworld.com/st/hostel/703/circus-hostel/" },
15 { "url": "https://www.hostelworld.com/hostels/europe/germany/berlin/" },
16 { "url": "https://www.hostelworld.com/hotels/europe/germany/berlin/?page=2" },
17 ],
18 "propertyIds": [],
19 "currency": "EUR",
20 "proxy": { "useApifyProxy": True },
21 "ignoreFieldsForChanges": [],
22}
23
24
25run = client.actor("abotapi/hostelworld-scraper").call(run_input=run_input)
26
27
28print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
29for item in client.dataset(run.default_dataset_id).iterate_items():
30 print(item)
31
32