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 "location": "Austin, TX",
13 "sort": "relevance",
14 "urls": [
15 "https://www.homes.com/austin-tx/",
16 "https://www.homes.com/austin-tx/sold/",
17 "https://www.homes.com/property/12821-ranft-cove-del-valle-tx/m6kdhgkklwzy3/",
18 "https://www.homes.com/austin-tx/p2/",
19 "https://www.homes.com/austin-tx/homes-for-rent/",
20 "https://www.homes.com/austin-tx/open-houses/",
21 "https://www.homes.com/austin-tx/under-800k/",
22 "https://www.homes.com/austin-tx/3-bedroom/",
23 "https://www.homes.com/austin-tx/newest/",
24 "https://www.homes.com/austin-tx/foreclosure/",
25 "https://www.homes.com/austin-tx/houses-for-sale/"
26 ],
27 "listingType": "for_sale",
28 "fetchDetails": false,
29 "maxItems": 20,
30 "maxPages": 0,
31 "proxy": {
32 "useApifyProxy": true
33 },
34 "incrementalMode": false,
35 "emitUnchanged": false,
36 "emitExpired": false,
37 "compactUpdates": false,
38 "ignoreFieldsForChanges": [],
39 "maxNotifyListings": 50
40};
41
42
43const run = await client.actor("abotapi/homes-com-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