1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "maxItems": 10,
10 "operation": "comprar",
11 "propertyType": "viviendas",
12 "places": ["Barcelona"],
13 "roomsMin": "any",
14 "roomsMax": "any",
15 "bathroomsMin": "any",
16 "minEnergyRating": "any",
17 "priceDropsOnly": False,
18 "advertiser": "any",
19 "withContactOnly": False,
20 "onlyNewListings": False,
21 "sort": "RELEVANCE",
22}
23
24
25run = client.actor("normdata/habitaclia-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