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 "https://www.zillow.com/austin-tx/",
19 "https://www.zillow.com/austin-tx/2_p/",
20 "https://www.zillow.com/homes/for_rent/Austin,-TX/",
21 "https://www.zillow.com/homedetails/1600-Pennsylvania-Ave-NW-Washington-DC-20500/84074482_zpid/"
22 ],
23 "fetchDetails": false,
24 "maxItems": 20,
25 "maxPages": 0,
26 "proxy": {
27 "useApifyProxy": true,
28 "apifyProxyGroups": [
29 "RESIDENTIAL"
30 ],
31 "apifyProxyCountry": "US"
32 },
33 "incrementalMode": false,
34 "emitUnchanged": false,
35 "emitExpired": false,
36 "ignoreFieldsForChanges": []
37};
38
39
40const run = await client.actor("abotapi/zillow-scraper").call(input);
41
42
43console.log('Results from dataset');
44console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50