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 "postcode": "3000"
17 }
18 ],
19 "urls": [
20 "https://www.view.com.au/for-sale/vic/in-melbourne-3000/"
21 ],
22 "detailUrls": [
23 "https://www.view.com.au/property/vic/kew-east-3102/24-normanby-road-kew-east-vic-3102-14802144/"
24 ],
25 "proxyConfiguration": {
26 "useApifyProxy": true,
27 "apifyProxyGroups": [
28 "RESIDENTIAL"
29 ],
30 "apifyProxyCountry": "AU"
31 }
32};
33
34
35const run = await client.actor("abotapi/view-com-au-scraper").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45