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 "location": "New York, NY 10001",
14 "status": "forSale",
15 "startPage": 1,
16 "endPage": 2,
17 "sortSelection": "days"
18 },
19 {
20 "location": "Santa Monica, CA",
21 "status": "forRent",
22 "startPage": 1,
23 "beds_min": 2,
24 "price_max": 5000,
25 "output": "json"
26 },
27 {
28 "location": "New York, NY 10001",
29 "status": "forSale",
30 "startPage": 99
31 }
32 ]
33};
34
35
36const run = await client.actor("axesso_data/zillow-property-search-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46