1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "location",
12 "locations": [
13 {
14 "suburb": "Melbourne",
15 "state": "VIC"
16 }
17 ],
18 "urls": [
19 "https://www.realcommercial.com.au/for-lease/in-melbourne,+vic+3000/",
20 "https://www.realcommercial.com.au/for-sale/offices/?locations=in-sydney,nsw",
21 "https://www.realcommercial.com.au/for-sale/offices/in-melbourne,+vic/",
22 "https://www.realcommercial.com.au/sold/in-sydney,+nsw/",
23 "https://www.realcommercial.com.au/leased/in-sydney,+nsw/",
24 "https://www.realcommercial.com.au/for-sale/in-melbourne,+vic?page=3",
25 "https://www.realcommercial.com.au/for-sale/?locations=in-sydney,nsw&propertyTypes=retail,offices&minPrice=100000&activeSort=price-desc&mapView=hybrid"
26 ],
27 "proxyConfiguration": {
28 "useApifyProxy": true,
29 "apifyProxyGroups": [
30 "RESIDENTIAL"
31 ],
32 "apifyProxyCountry": "AU"
33 },
34 "incrementalMode": false,
35 "emitUnchanged": false,
36 "emitExpired": false,
37 "ignoreFieldsForChanges": []
38};
39
40
41const run = await client.actor("abotapi/realcommercial-au-scraper").call(input);
42
43
44console.log('Results from dataset');
45console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
46const { items } = await client.dataset(run.defaultDatasetId).listItems();
47items.forEach((item) => {
48 console.dir(item);
49});
50
51