1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "scrapeMode": "properties",
12 "propertyChannel": "buy",
13 "searchQueries": [
14 "Sydney CBD, NSW"
15 ],
16 "startUrls": [
17 {
18 "url": "https://www.realestate.com.au/buy/in-sydney+cbd,+nsw/list-1"
19 }
20 ],
21 "extractPropertyDetails": false,
22 "extractAgentDetails": false,
23 "extractAgentContact": false,
24 "agentSearchQueries": [
25 "Sydney CBD, NSW"
26 ],
27 "agentUrls": [
28 {
29 "url": "https://www.realestate.com.au/find-agent/sydney-cbd-nsw"
30 }
31 ],
32 "extractAgentProfile": false,
33 "maxItems": 10,
34 "proxyConfiguration": {
35 "useApifyProxy": true,
36 "apifyProxyGroups": [
37 "RESIDENTIAL"
38 ]
39 }
40};
41
42
43const run = await client.actor("rigelbytes/realestate-com-au-scraper").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53