1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "search": {
12 "locations": [
13 "Austin, TX"
14 ],
15 "status": "for_sale",
16 "maxResults": 20,
17 "resultsPerPage": 20,
18 "offset": 0,
19 "includePropertyDetails": false,
20 "includeReadyToBuild": true,
21 "includeBoundary": false
22 },
23 "details": {
24 "propertyId": "4405180267",
25 "listingId": "",
26 "enrichSurroundings": false,
27 "enrichSimilarHomes": false,
28 "similarHomesLimit": 12
29 },
30 "mortgage": {
31 "mortgagePrice": 500000,
32 "mortgageDownPayment": 100000,
33 "mortgageTaxRate": 0.006,
34 "mortgageInterestRate": 0.065
35 }
36};
37
38
39const run = await client.actor("crawlio/realtor-property-listings-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49