1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "district": "Madrid",
10 "districts": [],
11 "maxItems": 10,
12 "endPage": 50,
13 "startUrl": [],
14 "proxy": {
15 "useApifyProxy": True,
16 "apifyProxyGroups": ["RESIDENTIAL"],
17 },
18 "bedrooms": [],
19 "bathrooms": [],
20 "homeType": [],
21 "condition": [],
22 "propertyStatus": [],
23 "floorHeights": [],
24 "features": [],
25}
26
27
28run = client.actor("lukass/idealista-scraper").call(run_input=run_input)
29
30
31print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
32for item in client.dataset(run.default_dataset_id).iterate_items():
33 print(item)
34
35