1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "propertyType": "RESIDENTIAL",
12 "locations": [
13 "Helsinki"
14 ],
15 "residentialPropertyTypes": [],
16 "roomCounts": [],
17 "newBuildingSearchCriteria": "ALL_PROPERTIES",
18 "sellerType": "ALL",
19 "bidType": "ALL",
20 "publishingTimeSearchCriteria": "ANY_DAY",
21 "heatingSystems": [],
22 "overallConditions": [],
23 "ownershipTypes": [],
24 "plotHoldingTypes": [],
25 "residentialFloorCountTypes": [],
26 "floorPositionInHighrise": [],
27 "saunaType": "ANY",
28 "hasBalcony": false,
29 "hasElevator": false,
30 "travelTimeMinutes": 30,
31 "travelTimeTransportMethod": "WALKING",
32 "hasShore": false,
33 "hasVideo": false,
34 "hasUpcomingShowing": false,
35 "hasPremiereShowing": false,
36 "hasShowingToday": false,
37 "hasShowingTomorrow": false,
38 "sortBy": "newest",
39 "maxItems": 30
40};
41
42
43const run = await client.actor("crawlerbros/etuovi-scraper").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53