1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "locations": [
12 "vilniuje",
13 "kaune"
14 ],
15 "listingType": "sale",
16 "propertyCategory": "apartment",
17 "maxResults": 100,
18 "fetchDetails": false,
19 "priceMin": 0,
20 "priceMax": 0,
21 "pricePerSqmMax": 0,
22 "areaMin": 0,
23 "areaMax": 0,
24 "roomsMin": 0,
25 "roomsMax": 0,
26 "floorMin": 0,
27 "floorMax": 0,
28 "buildYearMin": 0,
29 "buildYearMax": 0,
30 "listedWithinDays": "0",
31 "sortBy": "Importance",
32 "searchUrls": []
33};
34
35
36const run = await client.actor("sian.agency/aruodas-property-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46