1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "input": [
12 {
13 "polygon": [
14 [
15 28.9520687326739,
16 -81.9596345263672
17 ],
18 [
19 28.9544720326552,
20 -81.9939668017578
21 ],
22 [
23 28.9532703896359,
24 -82.0282990771485
25 ],
26 [
27 28.9244267751812,
28 -82.0406586962891
29 ],
30 [
31 28.8943728089739,
32 -82.0502717333985
33 ],
34 [
35 28.8643101397807,
36 -82.0571381884766
37 ],
38 [
39 28.8426596323051,
40 -82.0324189501953
41 ],
42 [
43 28.8390507762033,
44 -81.9967133837891
45 ],
46 [
47 28.8366448025959,
48 -81.9623811083985
49 ],
50 [
51 28.8462683632266,
52 -81.9294221240235
53 ],
54 [
55 28.8787413067622,
56 -81.9266755419922
57 ],
58 [
59 28.9112041026263,
60 -81.9266755419922
61 ],
62 [
63 28.942454975081,
64 -81.9266755419922
65 ],
66 [
67 28.956875276864,
68 -81.956887944336
69 ],
70 [
71 28.9520687326739,
72 -81.9596345263672
73 ]
74 ],
75 "page": 1,
76 "status": "forSale",
77 "sortSelection": "priced"
78 },
79 {
80 "polygon": [
81 [
82 28.9520687326739,
83 -81.9596345263672
84 ],
85 [
86 28.9544720326552,
87 -81.9939668017578
88 ],
89 [
90 28.9532703896359,
91 -82.0282990771485
92 ],
93 [
94 28.9244267751812,
95 -82.0406586962891
96 ],
97 [
98 28.8943728089739,
99 -82.0502717333985
100 ],
101 [
102 28.8643101397807,
103 -82.0571381884766
104 ],
105 [
106 28.8426596323051,
107 -82.0324189501953
108 ],
109 [
110 28.8390507762033,
111 -81.9967133837891
112 ],
113 [
114 28.8366448025959,
115 -81.9623811083985
116 ],
117 [
118 28.8462683632266,
119 -81.9294221240235
120 ],
121 [
122 28.8787413067622,
123 -81.9266755419922
124 ],
125 [
126 28.9112041026263,
127 -81.9266755419922
128 ],
129 [
130 28.942454975081,
131 -81.9266755419922
132 ],
133 [
134 28.956875276864,
135 -81.956887944336
136 ],
137 [
138 28.9520687326739,
139 -81.9596345263672
140 ]
141 ],
142 "page": 1,
143 "status": "forSale",
144 "sortSelection": "priced",
145 "price_min": 200000,
146 "price_max": 750000,
147 "beds_min": 2
148 }
149 ]
150};
151
152
153const run = await client.actor("axesso_data/zillow-search-by-polygon-scraper").call(input);
154
155
156console.log('Results from dataset');
157console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
158const { items } = await client.dataset(run.defaultDatasetId).listItems();
159items.forEach((item) => {
160 console.dir(item);
161});
162
163