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 "locations": [
13 "Austin, TX"
14 ],
15 "listingType": "FOR_SALE",
16 "startUrls": [
17 "https://www.zillow.com/homes/for_sale/Austin,-TX/"
18 ],
19 "fetchDetails": false,
20 "maxItems": 20,
21 "maxPages": 0,
22 "incrementalMode": false,
23 "emitUnchanged": false,
24 "emitExpired": false,
25 "proxy": {
26 "useApifyProxy": true,
27 "apifyProxyGroups": [
28 "RESIDENTIAL"
29 ],
30 "apifyProxyCountry": "US"
31 }
32};
33
34
35const run = await client.actor("abotapi/zillow-scraper").call(input);
36
37
38console.log('Results from dataset');
39console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45