1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "location": "roma-roma",
13 "operation": "sale",
14 "propertyType": "homes",
15 "country": "it",
16 "propertySubtype": "any",
17 "rooms": "any",
18 "bathrooms": "any",
19 "condition": "any",
20 "hasLift": false,
21 "hasTerrace": false,
22 "hasPool": false,
23 "hasGarden": false,
24 "hasGarage": false,
25 "hasStorageRoom": false,
26 "hasAirConditioning": false,
27 "hasBalcony": false,
28 "isNewDevelopment": false,
29 "isBankOwned": false,
30 "isAuction": false,
31 "isLuxury": false,
32 "hasSeaViews": false,
33 "isAccessible": false,
34 "sortBy": "relevance",
35 "onlyPriceDrops": false,
36 "onlyPrivateOwners": false,
37 "fetchDetails": false,
38 "maxDetails": 3,
39 "maxItems": 3,
40 "partitionLargeSearches": false
41};
42
43
44const run = await client.actor("vexaloom-labs/idealista-search-listings-price-and-feature").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54