1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "location": "Kuala Lumpur",
11 "urls": [
12 "https://www.iproperty.com.my/property-for-sale",
13 "https://www.iproperty.com.my/property-for-rent",
14 "https://www.iproperty.com.my/property-for-sale/in-kuala-lumpur-58jok",
15 "https://www.iproperty.com.my/property-for-sale?page=2",
16 "https://www.iproperty.com.my/property-for-sale/in-kuala-lumpur-58jok?page=2",
17 "https://www.iproperty.com.my/property-for-sale?sort=price&order=desc&propertyTypeGroup=N&minPrice=500000&maxPrice=900000&bedroom=3",
18 "https://www.iproperty.com.my/property-for-sale?keyword=Mont%20Kiara",
19 "https://www.iproperty.com.my/terrace-for-sale",
20 "https://www.iproperty.com.my/apartment-condo-service-residence-for-sale",
21 "https://www.iproperty.com.my/commercial-property-for-sale",
22 "https://www.iproperty.com.my/property/bangsar/khaya-residences/sale-501740698/",
23 "https://www.iproperty.com.my/property/sale-501740698/",
24 "https://www.iproperty.com.my/new-property/property/johor-bahru/residensi-maxim-pelangi-the-address-johor-bahru/sale-501752866/",
25 ],
26 "maxItems": 20,
27 "proxy": {
28 "useApifyProxy": True,
29 "apifyProxyGroups": ["RESIDENTIAL"],
30 "apifyProxyCountry": "MY",
31 },
32 "incrementalMode": False,
33 "emitUnchanged": False,
34 "emitExpired": False,
35 "ignoreFieldsForChanges": [],
36}
37
38
39run = client.actor("abotapi/iproperty-com-my-scraper").call(run_input=run_input)
40
41
42print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
43for item in client.dataset(run.default_dataset_id).iterate_items():
44 print(item)
45
46