1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "channel": "for-sale",
13 "locations": [
14 "perth~region"
15 ],
16 "urls": [
17 "https://reiwa.com.au/for-sale/perth~region/",
18 "https://reiwa.com.au/for-sale/perth~region/?page=2",
19 "https://reiwa.com.au/for-sale/baldivis/",
20 "https://reiwa.com.au/for-sale/baldivis/houses/",
21 "https://reiwa.com.au/for-sale/baldivis/?minPrice=400000&maxPrice=700000&bedrooms=3&sortBy=price-asc",
22 "https://reiwa.com.au/rental-properties/perth/",
23 "https://reiwa.com.au/sold/baldivis/",
24 "https://reiwa.com.au/sold/baldivis/?page=2",
25 "https://reiwa.com.au/commercial/for-sale/perth/",
26 "https://reiwa.com.au/commercial/for-lease/perth/",
27 "https://reiwa.com.au/business/for-sale/perth/",
28 "https://reiwa.com.au/rural/for-sale/south-west~region/",
29 "https://reiwa.com.au/real-estate-agents/baldivis/",
30 "https://reiwa.com.au/real-estate-agent/adam-dineley-13546-0-567762/",
31 "https://reiwa.com.au/real-estate-agency/opal-realty-14506-0/",
32 "https://reiwa.com.au/1-canter-lane-baldivis-5049038/",
33 "https://reiwa.com.au/the-wa-market/resources/?types=news&page=1",
34 "https://reiwa.com.au/news/perth-vacancy-rate-drops-to-lowest-level-in-nearly-two-years/"
35 ],
36 "maxItems": 20,
37 "maxPages": 0,
38 "proxy": {
39 "useApifyProxy": true
40 },
41 "ignoreFieldsForChanges": []
42};
43
44
45const run = await client.actor("abotapi/reiwa-com-au-scraper").call(input);
46
47
48console.log('Results from dataset');
49console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55