1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "transactionType": "sale",
10 "propertyType": "apartment",
11 "location": "madrid_capital",
12 "sortBy": "relevance",
13 "advertiserType": "all",
14 "maxListings": 126,
15 "maxPages": 2,
16 "fetchDetails": True,
17 "timeBudgetSecs": 180,
18 "proxyConfiguration": {
19 "useApifyProxy": True,
20 "apifyProxyGroups": ["RESIDENTIAL"],
21 "apifyProxyCountry": "ES",
22 },
23}
24
25
26run = client.actor("logiover/pisos-com-property-scraper").call(run_input=run_input)
27
28
29print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
30for item in client.dataset(run.default_dataset_id).iterate_items():
31 print(item)
32
33