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 "transaction": "rent",
13 "propertyKind": "residence",
14 "listedBy": "any",
15 "locations": [
16 "Γλυφάδα"
17 ],
18 "propertyType": "",
19 "maxResults": 50,
20 "includeDetails": false,
21 "minPrice": 0,
22 "maxPrice": 0,
23 "minSizeSqm": 0,
24 "maxSizeSqm": 0,
25 "minBedrooms": 0,
26 "maxBedrooms": 0,
27 "minBathrooms": 0,
28 "minFloor": -1,
29 "maxFloor": -1,
30 "minConstructionYear": 0,
31 "maxConstructionYear": 0,
32 "minEnergyClass": "",
33 "maxEnergyClass": "",
34 "condition": "",
35 "onlyFurnished": false,
36 "onlyPetsAllowed": false,
37 "onlyWithParking": false,
38 "onlyWithElevator": false,
39 "onlyWithAirConditioning": false,
40 "onlyWithGarden": false,
41 "onlyWithPool": false,
42 "onlyWithView": false,
43 "onlyWithPhotos": false,
44 "onlyShortTermAvailable": false,
45 "keywords": "",
46 "addedInLastDays": 0,
47 "sortBy": "created_desc",
48 "outputLanguage": "el",
49 "listingUrls": [],
50 "searchUrls": []
51};
52
53
54const run = await client.actor("sian.agency/xe-property-scraper").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64