1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "operation": "search",
10 "country": "za",
11 "listingType": "for-sale",
12 "locations": [
13 "Cape Town",
14 "Sandton",
15 ],
16 "maxResults": 100,
17 "includeDetails": False,
18 "minPrice": 0,
19 "maxPrice": 0,
20 "minBedrooms": 0,
21 "maxBedrooms": 0,
22 "minBathrooms": 0,
23 "propertyType": "",
24 "sortBy": "default",
25 "searchUrls": [],
26 "listingUrls": [],
27}
28
29
30run = client.actor("sian.agency/property24-property-scraper").call(run_input=run_input)
31
32
33print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
34for item in client.dataset(run.default_dataset_id).iterate_items():
35 print(item)
36
37