1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "operation": "search",
12 "board": "rent",
13 "region": "any",
14 "city": "תל אביב יפו",
15 "propertyType": "",
16 "dealType": "",
17 "maxResults": 100,
18 "minPrice": 0,
19 "maxPrice": 0,
20 "minRooms": 0,
21 "maxRooms": 0,
22 "minFloor": 0,
23 "maxFloor": 0,
24 "keywords": "",
25 "isFurnished": false,
26 "hasAirConditioning": false,
27 "hasElevator": false,
28 "hasParking": false,
29 "hasBalcony": false,
30 "suitableForRoommates": false,
31 "flatmateGender": "",
32 "smokingPreference": "",
33 "hasBars": false,
34 "searchUrls": [],
35 "listingUrls": []
36};
37
38
39const run = await client.actor("sian.agency/homeless-property-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49