1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://www.zillow.com/homedetails/17-Zelma-Dr-Greenville-SC-29617/11026031_zpid/"
14 },
15 {
16 "url": "https://www.zillow.com/apartments/san-antonio-tx/westpond/5XkVjF/"
17 },
18 {
19 "url": "https://www.zillow.com/community/greens-at-indian-river-preserve/39987_plid/"
20 },
21 {
22 "url": "https://www.zillow.com/b/Cashiers-NC/35.09787,-83.080475_ll/"
23 },
24 {
25 "url": "https://www.zillow.com/community/greens-at-indian-river-preserve/2072679238_zpid/"
26 }
27 ],
28 "addresses": [
29 "18 Zelma Dr, Greenville, SC 29617"
30 ],
31 "extractBuildingUnits": "all"
32};
33
34
35const run = await client.actor("maxcopell/zillow-detail-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