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 "country": "panama-es",
13 "region": "",
14 "dealType": "sale",
15 "propertyType": "houses",
16 "searchUrls": [],
17 "listingUrls": [],
18 "listingIds": [],
19 "maxItems": 100,
20 "minPrice": 0,
21 "maxPrice": 0,
22 "currency": "any",
23 "minBedrooms": 0,
24 "minBathrooms": 0,
25 "minAreaSqm": 0,
26 "onlyWithCoordinates": false,
27 "onlyActive": true
28};
29
30
31const run = await client.actor("sian.agency/encuentra24-property-scraper").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41