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 "dealType": "sale",
13 "propertyType": "apartment",
14 "city": "tbilisi",
15 "tbilisiDistricts": [],
16 "microDistricts": [],
17 "metroStations": [],
18 "keyword": "",
19 "priceCurrency": "GEL",
20 "rooms": [],
21 "bedrooms": [],
22 "buildingStatus": [],
23 "condition": [],
24 "projectType": [],
25 "bathrooms": [],
26 "heating": [],
27 "hotWater": [],
28 "parking": [],
29 "wallMaterial": [],
30 "amenities": [],
31 "sellerType": "any",
32 "only3dTours": false,
33 "exchangeOffered": false,
34 "maxResults": 100,
35 "includeDetails": false,
36 "listingUrls": []
37};
38
39
40const run = await client.actor("sian.agency/myhome-ge-property-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