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/sold/",
16 "https://www.homes.com/property/12821-ranft-cove-del-valle-tx/m6kdhgkklwzy3/"
17 ],
18 "listingType": "for_sale",
19 "fetchDetails": false,
20 "maxItems": 20,
21 "maxPages": 0,
22 "incrementalMode": false,
23 "emitUnchanged": false,
24 "emitExpired": false,
25 "proxy": {
26 "useApifyProxy": true
27 },
28 "maxNotifyListings": 50
29};
30
31
32const run = await client.actor("abotapi/homes-com-scraper").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42